/* Azeroth Forge: World of Warcraft Classic Forever Design System */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@300;400;500;600;700&family=MedievalSharp&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #0a0d12;
  --bg-secondary: #121721;
  --bg-card: rgba(22, 28, 40, 0.85);
  --bg-card-hover: rgba(28, 36, 52, 0.95);
  --border-gold: #c69b3d;
  --border-gold-glow: rgba(198, 155, 61, 0.35);
  --border-iron: #384252;
  --border-dark: rgba(255, 255, 255, 0.08);

  /* Faction Accents */
  --alliance-blue: #0078ff;
  --alliance-gold: #f3c242;
  --alliance-glow: rgba(0, 120, 255, 0.25);
  --horde-red: #c41e3a;
  --horde-iron: #7d2a2a;
  --horde-glow: rgba(196, 30, 58, 0.25);

  /* Magic Schools */
  --holy-gold: #f5cf6d;
  --shadow-purple: #9370db;
  --fire-orange: #ff5722;
  --frost-cyan: #00e5ff;
  --nature-green: #4caf50;
  --fel-green: #39ff14;
  --arcane-violet: #d05ce3;

  /* Typography */
  --font-heading: 'Cinzel', serif;
  --font-classic: 'MedievalSharp', cursive;
  --font-body: 'Outfit', sans-serif;

  /* Shadows & Glass */
  --shadow-ambient: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px var(--border-gold-glow);
  --glass-blur: blur(12px);
  --transition-smooth: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(198, 155, 61, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 10% 40%, rgba(0, 120, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 40%, rgba(196, 30, 58, 0.05) 0%, transparent 40%),
    linear-gradient(to bottom, #07090d, #0d1117 40%, #07090d);
  background-attachment: fixed;
  color: #e2e8f0;
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Header & Banner */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 18, 0.85);
  backdrop-filter: var(--glass-blur);
  border-bottom: 2px solid var(--border-gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-crest {
  width: 48px;
  height: 48px;
  background: radial-gradient(circle, #f3c242 0%, #8a6519 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff3c4;
  box-shadow: 0 0 15px rgba(243, 194, 66, 0.4);
  font-size: 1.5rem;
}

.brand-title h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #fff3c4, #f3c242 50%, #b8860b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(198, 155, 61, 0.2);
}

.brand-title p {
  font-size: 0.8rem;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(18, 23, 33, 0.8);
  padding: 0.35rem;
  border-radius: 8px;
  border: 1px solid var(--border-iron);
}

.nav-btn {
  background: transparent;
  color: #a0aec0;
  border: 1px solid transparent;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(198, 155, 61, 0.25), rgba(138, 101, 25, 0.4));
  color: #ffeb9c;
  border-color: var(--border-gold);
  box-shadow: 0 0 12px var(--border-gold-glow);
}

/* Quick Actions in Header */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-random {
  background: linear-gradient(135deg, #2b3547, #1b2331);
  color: #e2e8f0;
  border: 1px solid var(--border-iron);
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.btn-random:hover {
  border-color: var(--border-gold);
  color: #f3c242;
  box-shadow: 0 0 10px var(--border-gold-glow);
  transform: translateY(-1px);
}

/* Main Layout */
.main-wrapper {
  max-width: 1440px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 2rem;
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Glass Card */
.studio-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-iron);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: var(--shadow-ambient);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.studio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}

.card-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff3c4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* Faction Switcher */
.faction-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.faction-btn {
  padding: 1rem;
  border-radius: 8px;
  border: 2px solid var(--border-iron);
  background: rgba(18, 23, 33, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  transition: var(--transition-smooth);
}

.faction-btn .icon {
  font-size: 1.5rem;
}

.faction-btn.alliance:hover, .faction-btn.alliance.selected {
  border-color: var(--alliance-gold);
  background: linear-gradient(135deg, rgba(0, 120, 255, 0.2), rgba(18, 23, 33, 0.9));
  box-shadow: 0 0 15px var(--alliance-glow);
  color: #ffeb9c;
}

.faction-btn.horde:hover, .faction-btn.horde.selected {
  border-color: var(--horde-red);
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.25), rgba(18, 23, 33, 0.9));
  box-shadow: 0 0 15px var(--horde-glow);
  color: #ff9999;
}

/* Form Controls */
.control-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.control-group.full-width {
  grid-column: span 2;
}

.control-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control-label .badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.select-custom, .input-custom {
  background: #0f141d;
  color: #f1f5f9;
  border: 1px solid var(--border-iron);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}

.select-custom:focus, .input-custom:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 8px var(--border-gold-glow);
  background: #141b26;
}

/* Radio Pill Group */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-btn {
  background: #111622;
  border: 1px solid var(--border-iron);
  color: #94a3b8;
  padding: 0.45rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.pill-btn:hover {
  color: #fff;
  border-color: #64748b;
}

.pill-btn.active {
  background: linear-gradient(135deg, rgba(198, 155, 61, 0.3), rgba(138, 101, 25, 0.5));
  border-color: var(--border-gold);
  color: #fff3c4;
}

/* Live Synthesizer Sidebar */
.synthesizer-sidebar {
  position: sticky;
  top: 90px;
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.synth-box {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 0 25px rgba(198, 155, 61, 0.15), var(--shadow-ambient);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.synth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-iron);
  margin-bottom: 1rem;
}

.synth-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffeb9c;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.engine-pills {
  display: flex;
  gap: 0.25rem;
  background: #0b0f16;
  padding: 0.25rem;
  border-radius: 6px;
  border: 1px solid var(--border-iron);
  margin-bottom: 1rem;
}

.engine-btn {
  flex: 1;
  background: transparent;
  color: #718096;
  border: none;
  padding: 0.4rem 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.engine-btn:hover {
  color: #cbd5e1;
}

.engine-btn.active {
  background: #1e293b;
  color: #f3c242;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.prompt-display-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #080b0f;
  border: 1px solid var(--border-iron);
  border-radius: 8px;
  padding: 1rem;
  overflow-y: auto;
  position: relative;
  margin-bottom: 1rem;
}

.prompt-output {
  color: #e2e8f0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.token-highlight {
  color: #f3c242;
  font-weight: 600;
}

.synth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.btn-primary {
  background: linear-gradient(135deg, #c69b3d 0%, #8a6519 100%);
  color: #0d1117;
  border: 1px solid #ffd57a;
  padding: 0.8rem 1.25rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(198, 155, 61, 0.3);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e3b859 0%, #a47b25 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(198, 155, 61, 0.45);
}

.btn-secondary {
  background: #161f2e;
  color: #cbd5e1;
  border: 1px solid var(--border-iron);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: #1f2b3e;
  border-color: #64748b;
  color: #fff;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-iron);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
}

.gallery-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 15px var(--border-gold-glow);
}

.gallery-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}

.gallery-img-wrap.square {
  aspect-ratio: 1/1;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.04);
}

.gallery-tag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-gold);
  color: #ffeb9c;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-heading);
}

.gallery-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.gallery-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.35rem;
}

.gallery-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 1rem;
  line-height: 1.4;
  flex: 1;
}

.gallery-actions {
  display: flex;
  gap: 0.5rem;
}

.gallery-btn {
  flex: 1;
  background: #131924;
  color: #cbd5e1;
  border: 1px solid var(--border-iron);
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: var(--transition-smooth);
}

.gallery-btn:hover {
  border-color: var(--border-gold);
  color: #ffeb9c;
  background: #1a2332;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 10, 0.92);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-modal.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.lightbox-content {
  max-width: 1100px;
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  position: relative;
}

.lightbox-img-pane {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 6px;
}

.lightbox-info-pane {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  background: #111620;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #1e293b;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 10;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #1f2b3e, #0f1622);
  border: 2px solid var(--border-gold);
  color: #fff3c4;
  padding: 0.9rem 1.4rem;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 15px var(--border-gold-glow);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2000;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 1100px) {
  .main-wrapper {
    grid-template-columns: 1fr;
  }
  .synthesizer-sidebar {
    position: static;
    height: auto;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .control-grid {
    grid-template-columns: 1fr;
  }
  .control-group.full-width {
    grid-column: span 1;
  }
  .lightbox-content {
    grid-template-columns: 1fr;
  }
  .nav-tabs {
    flex-wrap: wrap;
  }
}
