:root {
  --bg-color: #0d0d12;
  --card-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-color: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --primary-gradient: linear-gradient(135deg, #6e8efb, #a777e3);
  --secondary-gradient: linear-gradient(135deg, #ff9a9e, #fad0c4);
  --accent-color: #6e8efb;
  --blob-1: rgba(110, 142, 251, 0.2);
  --blob-2: rgba(167, 119, 227, 0.2);
  --blob-3: rgba(255, 154, 158, 0.2);
  --input-bg: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(13, 13, 18, 0.8);
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

body.light-mode {
  --bg-color: #f5f7ff;
  --card-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --text-color: #1a1a2e;
  --text-muted: rgba(26, 26, 46, 0.6);
  --input-bg: rgba(255, 255, 255, 0.9);
  --nav-bg: rgba(245, 247, 255, 0.8);
  --blob-1: rgba(110, 142, 251, 0.1);
  --blob-2: rgba(167, 119, 227, 0.1);
  --blob-3: rgba(255, 154, 158, 0.1);
  --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.4s ease, color 0.4s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body {
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Blobs */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  width: 50vw;
  height: 50vw;
  filter: blur(80px);
  border-radius: 50%;
  z-index: -1;
  animation: blob-float 15s infinite alternate ease-in-out;
}

.blob-1 {
  top: -10%;
  left: -10%;
  background: var(--blob-1);
}

.blob-2 {
  bottom: -10%;
  right: -10%;
  background: var(--blob-2);
  animation-delay: -5s;
}

.blob-3 {
  top: 40%;
  left: 30%;
  background: var(--blob-3);
  width: 30vw;
  height: 30vw;
  animation-delay: -10s;
}

@keyframes blob-float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(5%, 10%) scale(1.1); }
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 10%;
  position: sticky;
  top: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.logo span {
  color: #6e8efb;
  text-shadow: 0 0 15px rgba(110, 142, 251, 0.5);
}

#theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-toggle:hover {
  transform: scale(1.1);
  background: var(--input-bg);
}

.sun-icon { display: none; }
body.light-mode .sun-icon { display: none; }
body.light-mode .moon-icon { display: none; }
body.light-mode .sun-icon { display: block; }
body.dark-mode .sun-icon { display: none; }
body.dark-mode .moon-icon { display: block; }

/* Main Section */
main {
  max-width: 800px;
  margin: 4rem auto;
  padding: 0 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -2px;
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-weight: 300;
}

/* Cards */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.main-card {
  margin-bottom: 3rem;
}

.input-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

input[type="text"] {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  padding: 1.2rem 1.5rem;
  border-radius: 18px;
  color: var(--text-color);
  font-size: 1.1rem;
  outline: none;
  min-width: 250px;
}

input[type="text"]::placeholder {
  color: var(--text-muted);
}

#generate-btn {
  background: var(--primary-gradient);
  border: none;
  color: white;
  padding: 1.2rem 2.5rem;
  border-radius: 18px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(110, 142, 251, 0.3);
}

#generate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(110, 142, 251, 0.5);
}

#generate-btn:active { transform: translateY(0); }

/* Options */
.options {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.option-item {
  cursor: pointer;
}

.option-item input { display: none; }

.option-item span {
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  font-size: 0.95rem;
  color: var(--text-muted);
  display: inline-block;
}

.option-item input:checked + span {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  font-weight: 600;
}

/* Result Section */
#result-container {
  margin-top: 2rem;
  animation: slide-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hidden { display: none; }

@keyframes slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.result-card:hover {
  transform: scale(1.02);
}

.result-label {
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

#nickname-output {
  font-size: 2.8rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.click-to-copy {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.copy-success {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.show-toast { opacity: 1; }

footer {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 2.5rem; }
  .logo { font-size: 1.2rem; }
  input[type="text"] { font-size: 1rem; padding: 1rem; }
  #generate-btn { padding: 1rem 1.5rem; width: 100%; }
}
