/* ==========================================================================
   DAWN OF TITANS DATABASE - SPELL PROFILE & STAGE STYLES
   Obsidian & Gold Aesthetics | Responsive Dual-Column Matrix
   ========================================================================== */

:root {
  --bg-core: #070a10;
  --bg-surface: #0e1422;
  --bg-surface-elevated: #151e30;
  --bg-surface-hover: #1c2840;
  --border-subtle: #1e2b42;
  --border-gold: rgba(229, 184, 105, 0.4);
  --border-gold-bright: #e5b869;
  
  --gold-primary: #e5b869;
  --gold-light: #fbe2a7;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #38bdf8;
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

#SPELL {
  color: var(--text-primary);
  visibility: hidden;
}

/* Header & Entity Showcase Banner */
.profile_header_card {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
}

#SPELL_NAME {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: linear-gradient(135deg, #ffffff 30%, var(--gold-primary) 80%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Primary Dual-Column Grid */
.spell_grid_stage {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* Left Column: Artwork, Element Badge & Upgrade Stepper */
.spell_left_column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#SPELL_IMG_CONTAINER {
  height: 230px;
  width: 230px;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;
  background: radial-gradient(circle at center, #151e30 0%, #080c14 100%);
  border: 1px solid var(--border-gold);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(229, 184, 105, 0.12);
}

#SPELL_IMG {
  border-radius: var(--radius-lg);
  height: 100%;
  width: 100%;
  object-fit: cover;
  display: block;
}

/* Damage Element Badge */
#SPELL_DAMAGE_TYPE2 {
  background: rgba(10, 14, 24, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  cursor: pointer;
  position: absolute;
  bottom: 8px;
  right: 8px;
  height: 32px;
  width: 32px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
  padding: 3px;
  box-sizing: border-box;
}

#SPELL_DAMAGE_TYPE2:hover {
  transform: scale(1.15);
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(229, 184, 105, 0.4);
}

/* Controls & Upgrade Resource Box */
.spell_controls_card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 230px;
  margin: 0 auto;
}

#SPELL_GRAIN {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.resource_row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#GRAIN_IMG {
  height: 30px;
  width: 30px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

#GRAIN_VALUE {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
}

#SPELL_TIME {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* Stepper Buttons */
.spell_stepper_row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

#LEVEL_UP_BUTTON,
#LEVEL_DOWN_BUTTON {
  height: 38px;
  width: 38px;
  min-width: 38px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 7px;
  box-sizing: border-box;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

#LEVEL_UP_BUTTON:hover,
#LEVEL_DOWN_BUTTON:hover {
  border-color: var(--gold-primary);
  background: var(--bg-surface-hover);
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(229, 184, 105, 0.4);
}

#LEVEL_DOWN_BUTTON {
  transform: rotate(180deg);
}

#LEVEL_DOWN_BUTTON:hover {
  transform: rotate(180deg) scale(1.1);
}

/* Right Column: Spell Power & Properties Matrix */
.spell_right_column {
  min-width: 0;
}

.spell_stats_panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.table_section_header {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(30, 43, 66, 0.6);
}

.section_badge {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--gold-primary);
  text-transform: uppercase;
}

#SPELL_STATS {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

#SPELL_RATING {
  font-weight: 800;
  color: var(--gold-light);
  font-size: 14px;
}

#costBuildSpan {
  font-weight: 700;
  color: var(--gold-light);
  margin-right: 4px;
}

/* Mobile & Tablet Responsiveness */
@media screen and (max-width: 860px) {
  .spell_grid_stage {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .spell_left_column {
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }
  #SPELL_NAME {
    font-size: 20px;
    justify-content: center;
    text-align: center;
  }
  .spell_stats_panel {
    padding: 14px;
  }
}
