/* ═══════════════════════════════════════════════════════════════════════════════
   OLYMPUS RISING - NARRATIVE STORY STYLES
   Styled to match text-based adventure game aesthetic
   ═══════════════════════════════════════════════════════════════════════════════ */

.narrative-story-view {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Georgia', serif;
  color: #d4af37;
  background: linear-gradient(to bottom, rgba(10, 10, 20, 0.95), rgba(20, 15, 10, 0.95));
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

/* ─────────────────────────────────────────────────────────────────────────────
   CHARACTER STATS HEADER (Always visible at top like in example)
   ───────────────────────────────────────────────────────────────────────────── */

.story-stats-header {
  background: linear-gradient(135deg, rgba(40, 30, 20, 0.9), rgba(30, 20, 15, 0.9));
  border: 2px solid #8b6914;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
}

.story-character-portrait {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portrait-icon {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.3), rgba(139, 105, 20, 0.5));
  border: 2px solid #d4af37;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.character-name {
  font-size: 22px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.story-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  flex: 1;
  max-width: 600px;
}

.story-stat {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #8b6914;
  border-radius: 5px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
}

.story-stat:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: #d4af37;
  transform: translateY(-2px);
}

.story-stat .stat-label {
  font-size: 11px;
  color: #b8956a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.story-stat .stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.story-class-badge {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.3), rgba(155, 89, 182, 0.3));
  border: 2px solid #e74c3c;
  border-radius: 20px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 15px rgba(231, 76, 60, 0.4);
}

.class-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* ─────────────────────────────────────────────────────────────────────────────
   NARRATIVE CONTENT
   ───────────────────────────────────────────────────────────────────────────── */

.story-narrative-content {
  background: rgba(20, 15, 10, 0.8);
  border: 2px solid #8b6914;
  border-radius: 8px;
  padding: 30px;
  min-height: 400px;
}

.narrative-text-box {
  font-size: 18px;
  line-height: 1.8;
  color: #e6d7b8;
  text-align: left;
  margin-bottom: 30px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.narrative-text-box .highlight {
  color: #7bed9f;
  font-weight: bold;
  font-style: italic;
}

.narrative-text-box .class-highlight {
  color: #e74c3c;
  font-weight: bold;
  font-size: 20px;
  text-shadow: 0 0 10px rgba(231, 76, 60, 0.6);
}

/* ─────────────────────────────────────────────────────────────────────────────
   STORY CHOICES (Bracketed like in example)
   ───────────────────────────────────────────────────────────────────────────── */

.story-choices {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 25px;
}

.story-choice-btn {
  background: rgba(40, 30, 20, 0.7);
  border: 2px solid #8b6914;
  border-radius: 8px;
  padding: 15px 25px;
  font-size: 17px;
  font-family: 'Georgia', serif;
  color: #d4af37;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.story-choice-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
  transition: left 0.5s ease;
}

.story-choice-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: #d4af37;
  color: #ffd700;
  transform: translateX(5px);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.story-choice-btn:hover::before {
  left: 100%;
}

.story-choice-btn:active {
  transform: translateX(3px) scale(0.98);
}

/* ─────────────────────────────────────────────────────────────────────────────
   ITEM DISPLAY
   ───────────────────────────────────────────────────────────────────────────── */

.story-item-display {
  background: linear-gradient(135deg, rgba(70, 50, 30, 0.6), rgba(50, 35, 20, 0.6));
  border: 2px solid #8b6914;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
}

.item-icon {
  font-size: 48px;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.item-info {
  flex: 1;
}

.item-name {
  display: block;
  font-size: 20px;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 8px;
}

.item-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.item-stat {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #8b6914;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 14px;
  color: #7bed9f;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CLASS CHANGE EVENT
   ───────────────────────────────────────────────────────────────────────────── */

.story-class-change {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(155, 89, 182, 0.15));
  border: 2px solid #e74c3c;
  border-radius: 10px;
  padding: 25px;
  margin: 20px 0;
  text-align: center;
  box-shadow: 0 0 25px rgba(231, 76, 60, 0.3);
  animation: classChangePulse 2s ease-in-out infinite;
}

@keyframes classChangePulse {
  0%, 100% { box-shadow: 0 0 25px rgba(231, 76, 60, 0.3); }
  50% { box-shadow: 0 0 35px rgba(231, 76, 60, 0.6); }
}

.class-change-prompt h3 {
  font-size: 24px;
  color: #ffd700;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.class-change-prompt p {
  font-size: 16px;
  color: #e6d7b8;
  margin-bottom: 15px;
}

.class-bonuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.bonus-item {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #e74c3c;
  border-radius: 15px;
  padding: 6px 14px;
  font-size: 14px;
  color: #ff6b6b;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ABILITY SELECTION
   ───────────────────────────────────────────────────────────────────────────── */

.story-ability-selection {
  background: rgba(30, 20, 15, 0.9);
  border: 2px solid #8b6914;
  border-radius: 10px;
  padding: 25px;
  margin: 20px 0;
}

.ability-selection-header {
  text-align: center;
  margin-bottom: 25px;
}

.ability-selection-header h3 {
  font-size: 26px;
  color: #ffd700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}

.ability-hint {
  font-size: 15px;
  color: #ff6b6b;
  font-style: italic;
}

.abilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.ability-choice-card {
  background: rgba(40, 30, 20, 0.8);
  border: 3px solid #6b5620;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ability-choice-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ability-choice-card:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: #d4af37;
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.ability-choice-card:hover::before {
  opacity: 1;
}

.ability-choice-card.selected {
  background: rgba(212, 175, 55, 0.3);
  border-color: #ffd700;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.6), inset 0 0 15px rgba(255, 215, 0, 0.2);
}

.ability-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ability-icon {
  font-size: 32px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.ability-name {
  font-size: 20px;
  color: #ffd700;
  margin: 0;
  font-weight: bold;
}

.ability-description {
  color: #d4af37;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.ability-details {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ability-type,
.ability-element {
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid #8b6914;
  border-radius: 4px;
  color: #d4af37;
}

.ability-cost,
.ability-cooldown,
.ability-damage {
  font-size: 13px;
  color: #b8936b;
  margin-top: 5px;
}

.confirm-ability {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  background: linear-gradient(135deg, #8b6914, #6b5620);
  border: 2px solid #d4af37;
  color: #ffd700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Georgia', serif;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.confirm-ability:hover:not(:disabled) {
  background: linear-gradient(135deg, #d4af37, #8b6914);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
  transform: translateY(-2px);
}

.confirm-ability:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─────────────────────────────────────────────────────────────────────────────
   TALENT SELECTION (Like in example screenshots)
   ───────────────────────────────────────────────────────────────────────────── */

.story-talent-selection {
  background: rgba(30, 20, 15, 0.9);
  border: 2px solid #8b6914;
  border-radius: 10px;
  padding: 25px;
  margin: 20px 0;
}

.talent-header {
  text-align: center;
  margin-bottom: 20px;
}

.talent-header h3 {
  font-size: 24px;
  color: #ffd700;
  margin-bottom: 8px;
}

.talent-hint {
  font-size: 14px;
  color: #ff6b6b;
  font-style: italic;
}

.talents-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.talent-option {
  background: rgba(40, 30, 20, 0.7);
  border: 2px solid #6b5620;
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.talent-option:hover:not(.locked):not(.selected) {
  background: rgba(212, 175, 55, 0.2);
  border-color: #8b6914;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.talent-option.selected {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(139, 105, 20, 0.3));
  border-color: #d4af37;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.talent-option.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.talent-name {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 5px;
}

.talent-effect {
  display: block;
  font-size: 13px;
  color: #b8956a;
}

.confirm-talents {
  width: 100%;
  margin-top: 15px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   COMBAT & CONTINUE BUTTONS
   ───────────────────────────────────────────────────────────────────────────── */

.story-combat-prompt,
.story-continue {
  text-align: center;
  margin-top: 30px;
}

.start-story-combat,
.continue-story-btn {
  background: linear-gradient(135deg, #8b6914, #d4af37);
  border: 2px solid #ffd700;
  border-radius: 8px;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  color: #1a1410;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.start-story-combat:hover,
.continue-story-btn:hover {
  background: linear-gradient(135deg, #d4af37, #ffd700);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(212, 175, 55, 0.4);
}

.start-story-combat:active,
.continue-story-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .story-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .narrative-text-box {
    font-size: 16px;
  }

  .story-choice-btn {
    font-size: 15px;
    padding: 12px 20px;
  }

  .talents-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .story-stats-header {
    flex-direction: column;
    align-items: stretch;
  }

  .story-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
