/**
 * Character Viewer Styles
 *
 * Light parchment theme with purple accents to match the main site
 * D&D character progression tracker with smooth animations
 */

/* ============================================
   Base Styles
   ============================================ */

.characters-page {
    background: var(--parchment, #F4E9C9);
    color: var(--text-dark, #333);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.characters-page main {
    padding-top: 2rem;
}

/* ============================================
   Main Container
   ============================================ */

.characters-container {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* ============================================
   Party Lineup
   ============================================ */

.party-lineup {
    max-width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: relative;
    background: linear-gradient(-45deg,
        #f5f5f0,
        #faf8f3,
        #f0ede8,
        #f8f6f1,
        #fdf9f5,
        #f3f0eb);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.party-lineup.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.page-title {
    font-family: var(--font-titles, 'Uncial Antiqua', cursive);
    font-size: 3.5rem;
    margin: 0 0 1rem 0;
    color: #2d1f47;
    text-shadow: 2px 2px 4px rgba(45, 31, 71, 0.3);
}

.page-title i {
    color: #2d1f47;
}

.page-subtitle {
    font-family: var(--font-body, 'EB Garamond', serif);
    font-size: 1.3rem;
    color: #3d3d3d;
    margin: 0;
    font-weight: 600;
}

/* ============================================
   Loading & Empty States
   ============================================ */

.loading-state,
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--primary-purple, #7F0EBD);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.empty-state i {
    font-size: 4rem;
    color: var(--primary-purple, #7F0EBD);
    margin-bottom: 1rem;
}

.empty-state h2 {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 2rem;
    margin: 1rem 0;
    color: var(--text-dark, #333);
}

/* ============================================
   Character Lineup - Redesigned
   ============================================ */

.character-lineup {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    min-height: 500px;
    position: relative;
}

/* Mobile: vertical layout */
@media (max-width: 768px) {
    .character-lineup {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }
}

/* ============================================
   Character Card - Redesigned as Standing Characters
   ============================================ */

.character-card {
    position: relative;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

/* Character states for transitions */
.character-card.fading {
    opacity: 0;
    filter: blur(3px) grayscale(0.8);
    pointer-events: none;
    transition: all 0.6s ease;
}

.character-card.selected {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.character-card.fade-in {
    animation: fadeInCharacter 0.6s ease forwards;
    /* Disable transitions during animation to prevent conflicts */
    transition: none !important;
}

@keyframes fadeInCharacter {
    0% {
        opacity: 0;
        filter: blur(3px) grayscale(0.8) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        filter: blur(0) grayscale(0) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
        transform: translateY(0);
    }
}

/* Character image on right side when focused */
.character-focus .character-image-right {
    position: fixed;
    right: 5%;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    z-index: 250;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.character-focus.active .character-image-right {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.character-image-right.fade-out {
    opacity: 0 !important;
    transform: translateY(-50%) scale(0.7) !important;
    transition: all 0.5s ease !important;
}

.character-focus .character-image-right img {
    width: auto;
    height: 70vh;
    max-height: 800px;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3))
            drop-shadow(0 0 30px var(--character-glow, rgba(255, 255, 255, 0.5)))
            drop-shadow(0 0 60px var(--character-glow, rgba(255, 255, 255, 0.3)));
}

/* Apply character-specific glow colors to right-side image */
.character-image-right[data-character-name="Edwinn Falkrest"] {
    --character-glow: rgb(255, 255, 255);
}

.character-image-right[data-character-name="Via"] {
    --character-glow: rgba(230, 217, 98, 0.6);
}

.character-image-right[data-character-name="Marik"] {
    --character-glow: rgba(184, 65, 65, 0.6);
}

.character-image-right[data-character-name="Xanthe"] {
    --character-glow: rgba(76, 158, 169, 0.6);
}

.character-image-right[data-character-name="Cailynn"] {
    --character-glow: rgba(103, 210, 117, 0.6);
}

.character-avatar-container {
    position: relative;
    height: auto;
    width: 100%;
}

.character-avatar {
    width: auto;
    height: 40vh;
    max-height: 525px;
    object-fit: contain;
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 0 transparent);
}

/* Hover state - add glow */
.character-card:hover .character-avatar {
    filter: drop-shadow(0 0 20px var(--character-glow, rgba(255, 255, 255, 0.8)))
            drop-shadow(0 0 40px var(--character-glow, rgba(255, 255, 255, 0.6)))
            drop-shadow(0 0 60px var(--character-glow, rgba(255, 255, 255, 0.4)));
    transform: translateY(-10px);
}

/* Character name on hover */
.character-name-hover {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 1.5rem;
    color: #2d1f47;
    text-shadow: 0 0 15px var(--character-glow, rgba(255, 255, 255, 0.9)),
                 0 0 30px var(--character-glow, rgba(255, 255, 255, 0.7)),
                 0 2px 6px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    font-weight: bold;
}

.character-card:hover .character-name-hover {
    opacity: 1;
    top: -50px;
}

/* Hide old info elements */
.character-level-badge,
.character-info,
.character-class,
.character-player {
    display: none;
}

/* Character-specific glow colors (applied via inline styles) */
.character-card[data-character-name="Edwinn Falkrest"] {
    --character-color: #f3f3e5;
    --character-glow: rgb(255, 255, 255);
}

.character-card[data-character-name="Via"] {
    --character-color: #e6d962;
    --character-glow: rgba(230, 217, 98, 0.6);
}

.character-card[data-character-name="Marik"] {
    --character-color: #b84141;
    --character-glow: rgba(184, 65, 65, 0.6);
}

.character-card[data-character-name="Xanthe"] {
    --character-color: #4c9ba9;
    --character-glow: rgba(76, 158, 169, 0.6);
}

.character-card[data-character-name="Cailynn"] {
    --character-color: #67d279;
    --character-glow: rgba(103, 210, 117, 0.6);
}

/* ============================================
   Character Focus View - Redesigned
   ============================================ */

.character-focus {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg,
        #f5f5f0,
        #faf8f3,
        #f0ede8,
        #f8f6f1,
        #fdf9f5,
        #f3f0eb);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    overflow-y: auto;
}

.character-focus.active {
    opacity: 1;
    pointer-events: all;
}

.back-button {
    position: sticky;
    top: 2rem;
    left: 2rem;
    z-index: 300;
    background: var(--primary-purple, #7F0EBD);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.back-button:hover {
    background: var(--primary-purple-dark, #6B0AA1);
    transform: translateX(-5px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Character Sheet - Redesigned for Left Side
   ============================================ */

.character-sheet-container {
    max-width: 60%;
    margin: 2rem;
    padding: 0;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease 0.3s;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.character-focus.active .character-sheet-container {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .character-sheet-container {
        max-width: 90%;
        margin: 2rem auto;
    }
}

.character-sheet {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--primary-purple, #7F0EBD);
}

.character-sheet-header {
    padding: 3rem;
    background: linear-gradient(135deg, var(--aged-parchment), white);
    border-bottom: 3px solid;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.character-sheet-avatar {
    display: none;
}

.character-sheet-title {
    flex: 1;
}

.character-sheet-name {
    font-family: var(--font-titles, 'Uncial Antiqua', cursive);
    font-size: 3rem;
    margin: 0 0 0.5rem 0;
    color: var(--primary-purple, #7F0EBD);
}

.character-sheet-subtitle {
    font-family: var(--font-body, 'EB Garamond', serif);
    font-size: 1.5rem;
    color: var(--text-dark, #333);
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.character-sheet-player {
    font-family: var(--font-body, 'EB Garamond', serif);
    font-size: 1.2rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   Timeline Selector
   ============================================ */

.timeline-selector {
    padding: 2rem 3rem;
    background: var(--aged-parchment, #E8D7A9);
    border-bottom: 2px solid var(--primary-purple, #7F0EBD);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.timeline-title {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 1.5rem;
    margin: 0;
    color: var(--primary-purple, #7F0EBD);
}

.timeline-controls {
    display: flex;
    gap: 1rem;
}

.timeline-controls button {
    background: white;
    color: var(--primary-purple, #7F0EBD);
    border: 2px solid var(--primary-purple, #7F0EBD);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: var(--font-body, 'EB Garamond', serif);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.timeline-controls button:hover {
    background: var(--primary-purple, #7F0EBD);
    color: white;
}

.timeline-controls button.active {
    background: var(--primary-purple, #7F0EBD);
    color: white;
}

.timeline-track {
    position: relative;
    height: 80px;
    overflow-x: auto;
    overflow-y: hidden;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-purple, #7F0EBD), transparent);
    transform: translateY(-50%);
}

.timeline-nodes {
    position: relative;
    display: flex;
    gap: 2rem;
    padding: 0 2rem;
    align-items: center;
    height: 100%;
}

.timeline-node {
    position: relative;
    min-width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid var(--primary-purple, #7F0EBD);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.timeline-node:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 15px var(--primary-purple, #7F0EBD);
}

.timeline-node.active .timeline-dot {
    width: 30px;
    height: 30px;
    background: var(--primary-purple, #7F0EBD);
    border-color: var(--gold, #FFD700);
    box-shadow: 0 0 20px var(--primary-purple, #7F0EBD);
}

.timeline-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    font-family: var(--font-body, 'EB Garamond', serif);
    font-size: 0.9rem;
    white-space: nowrap;
    color: var(--text-dark, #333);
    font-weight: 600;
}

.timeline-node.active .timeline-label {
    color: var(--primary-purple, #7F0EBD);
    font-weight: bold;
}

/* ============================================
   Character Sheet Sections
   ============================================ */

.character-sheet-body {
    padding: 3rem;
    background: white;
}

.sheet-section {
    margin-bottom: 3rem;
}

.sheet-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 2rem;
    margin: 0 0 2rem 0;
    color: var(--primary-purple, #7F0EBD);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-purple, #7F0EBD);
}

.section-title i {
    color: var(--primary-purple, #7F0EBD);
}

/* Combat Stats */
.combat-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.stat-box {
    background: var(--aged-parchment, #E8D7A9);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--primary-purple, #7F0EBD);
    transition: all 0.3s ease;
    overflow: visible;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-label {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 0.9rem;
    color: var(--text-dark, #333);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-value {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 2.5rem;
    color: var(--primary-purple, #7F0EBD);
    font-weight: bold;
    line-height: 1.2;
    overflow: visible;
}

.stat-modifier {
    font-size: 1.2rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Ability Scores */
.abilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.ability-box {
    background: var(--aged-parchment, #E8D7A9);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--primary-purple, #7F0EBD);
    overflow: visible;
}

.ability-name {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 0.8rem;
    color: var(--text-dark, #333);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ability-score {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 2rem;
    color: var(--primary-purple, #7F0EBD);
    font-weight: bold;
    line-height: 1.2;
    overflow: visible;
}

.ability-modifier {
    font-size: 1rem;
    color: #666;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.skill-item {
    background: var(--aged-parchment, #E8D7A9);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.skill-item.proficient {
    border-left-color: var(--primary-purple, #7F0EBD);
    background: white;
}

.skill-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.skill-name {
    font-family: var(--font-body, 'EB Garamond', serif);
    font-size: 1.1rem;
    color: var(--text-dark, #333);
    font-weight: 600;
}

.skill-modifier {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 1.2rem;
    color: var(--primary-purple, #7F0EBD);
    font-weight: bold;
}

/* Features & Traits */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    background: var(--aged-parchment, #E8D7A9);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-purple, #7F0EBD);
}

.feature-name {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 1.3rem;
    color: var(--primary-purple, #7F0EBD);
    margin: 0 0 0.5rem 0;
}

.feature-description {
    font-family: var(--font-body, 'EB Garamond', serif);
    font-size: 1.1rem;
    color: var(--text-dark, #333);
    line-height: 1.6;
}

/* Spells */
.spells-by-level {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.spell-level-group {
    background: var(--aged-parchment, #E8D7A9);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--primary-purple, #7F0EBD);
}

.spell-level-header {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 1.3rem;
    color: var(--primary-purple, #7F0EBD);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--primary-purple, #7F0EBD);
}

.spell-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.spell-item {
    font-family: var(--font-body, 'EB Garamond', serif);
    font-size: 1rem;
    color: var(--text-dark, #333);
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 6px;
    font-weight: 600;
}

.spell-item.prepared {
    background: var(--primary-purple, #7F0EBD);
    color: white;
    border-left: 3px solid var(--gold, #FFD700);
}

/* Equipment */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.equipment-item {
    background: var(--aged-parchment, #E8D7A9);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.equipment-item.equipped {
    border-left: 3px solid var(--gold, #FFD700);
    background: white;
}

.equipment-name {
    font-family: var(--font-body, 'EB Garamond', serif);
    font-size: 1.1rem;
    color: var(--text-dark, #333);
    font-weight: 600;
}

.equipment-quantity {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 1rem;
    color: #666;
}

/* ============================================
   Spell Slots
   ============================================ */

.spell-slots-container,
.currency-container {
    margin-bottom: 2rem;
}

.spell-slots-title,
.currency-title {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark, #333);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spell-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.spell-slot-box {
    background: white;
    border: 2px solid var(--gold, #FFD700);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    overflow: visible;
}

.slot-level {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark, #333);
    margin-bottom: 0.75rem;
}

.slot-tracker {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.slot-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--gold, #FFD700);
    background: white;
    transition: all 0.3s;
}

.slot-circle.used {
    background: var(--text-muted, #999);
    border-color: var(--text-muted, #999);
}

.slot-circle.available {
    background: var(--gold, #FFD700);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.slot-count {
    font-family: var(--font-body, 'EB Garamond', serif);
    font-size: 0.9rem;
    color: #666;
}

/* ============================================
   Currency
   ============================================ */

.currency-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.currency-item {
    background: white;
    border: 2px solid;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
}

.currency-item.platinum {
    border-color: #E5E4E2;
    background: linear-gradient(135deg, #f5f5f5 0%, #e5e4e2 100%);
}

.currency-item.gold {
    border-color: var(--gold, #FFD700);
    background: linear-gradient(135deg, #fff9e6 0%, #FFD700 100%);
}

.currency-item.electrum {
    border-color: #E0E0E0;
    background: linear-gradient(135deg, #f0f0f0 0%, #c0c0c0 100%);
}

.currency-item.silver {
    border-color: #C0C0C0;
    background: linear-gradient(135deg, #ffffff 0%, #C0C0C0 100%);
}

.currency-item.copper {
    border-color: #B87333;
    background: linear-gradient(135deg, #ffeedd 0%, #B87333 100%);
}

.currency-amount {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark, #333);
    line-height: 1.2;
    overflow: visible;
}

.currency-type {
    font-family: var(--font-body, 'EB Garamond', serif);
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Temp HP styling */
.temp-hp {
    display: block;
    font-size: 0.8rem;
    color: var(--primary-blue, #0B2AA9);
    margin-top: 0.25rem;
}

/* ============================================
   Comparison Mode
   ============================================ */

.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.comparison-column {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 3px solid;
}

.comparison-column.then {
    border-color: var(--primary-red, #C30A3D);
}

.comparison-column.now {
    border-color: var(--primary-blue, #0B2AA9);
}

.comparison-header {
    font-family: var(--font-headers, 'Cinzel', serif);
    font-size: 1.5rem;
    margin: 0 0 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid;
}

.comparison-column.then .comparison-header {
    color: var(--primary-red, #C30A3D);
    border-color: var(--primary-red, #C30A3D);
}

.comparison-column.now .comparison-header {
    color: var(--primary-blue, #0B2AA9);
    border-color: var(--primary-blue, #0B2AA9);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }

    .character-avatar {
        height: 30vh;
        max-height: 300px;
    }

    .character-focus .character-image-right {
        right: auto;
        left: 50%;
        top: 2rem;
        bottom: auto;
        transform: translateX(-50%) scale(0.9);
    }

    .character-focus.active .character-image-right {
        transform: translateX(-50%) scale(1);
    }

    .character-focus .character-image-right img {
        height: 35vh;
        max-height: 400px;
    }

    .character-sheet-container {
        max-width: 95%;
        margin: 45vh auto 2rem;
    }

    .character-sheet-header {
        flex-direction: column;
        text-align: center;
    }

    .character-sheet-name {
        font-size: 2rem;
    }

    .comparison-container {
        grid-template-columns: 1fr;
    }

    .back-button {
        top: 1rem;
        left: 1rem;
        padding: 0.75rem 1.5rem;
    }

    .timeline-controls {
        flex-direction: column;
    }

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

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }

    .character-avatar-container {
        height: 250px;
    }

    .character-name {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}
