/* Survivor Theme CSS — Tropical Sunset */

/* Torch cursor fire + glow */
#torch-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
}

#torch-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    pointer-events: none;
    z-index: 99998;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255,210,60,0.12) 0%,
        rgba(255,180,40,0.06) 30%,
        rgba(255,150,30,0.02) 55%,
        transparent 75%);
    transform: translate(-50%, -50%);
    transition: opacity 0.5s;
    mix-blend-mode: screen;
}

:root {
    --brawn: #C2703E;
    --brains: #5B8DEF;
    --beauty: #FF5CAD;
    --torch-orange: #FF6B35;
    --torch-glow: #FF8C42;
    --bamboo: #E8C896;
    --sand: #FFF1DC;
    --ocean: #2190B5;
    --jungle: #3D8B37;
    --card-bg: rgba(30, 20, 45, 0.65);
    --card-border: rgba(232, 200, 150, 0.35);
    --text-primary: #FFFFFF;
    --text-secondary: #FFE8C8;
    --sunset-deep: #1A0F2E;
    --sunset-mid: #2D1845;
    --sunset-warm: #3D1E52;
}

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(160deg, #1A0F2E 0%, #2D1845 40%, #3A1540 70%, #451A35 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Cinzel', serif;
    min-height: 100vh;
}

/* Tribal pattern overlay */
.tribal-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(255, 140, 66, 0.04) 20px,
            rgba(255, 140, 66, 0.04) 40px
        );
    pointer-events: none;
    z-index: -1;
}

/* Navigation */
.survivor-nav {
    background: linear-gradient(90deg, #1A0F2E 0%, #2A1540 50%, #1A0F2E 100%);
    border-bottom: 3px solid var(--torch-orange);
    box-shadow: 0 2px 20px rgba(255, 107, 53, 0.15);
    padding: 1rem 2rem;
}

.season-selector {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--torch-glow);
    color: #fff;
    margin-right: 1rem;
    max-width: 250px;
    font-size: 0.9rem;
}

.season-selector:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--torch-orange);
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.3);
}

.season-selector option {
    background: #1A0F2E;
    color: #fff;
}

.survivor-logo {
    font-family: 'Trade Winds', cursive;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--torch-orange) !important;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5), 2px 2px 4px rgba(0, 0, 0, 0.6);
    letter-spacing: 2px;
}

.torch {
    font-size: 1.2em;
    filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.6));
    animation: flicker 2s infinite;
}

.torch-large {
    font-size: 4em;
    filter: drop-shadow(0 0 30px rgba(255, 107, 53, 0.6));
    animation: flicker 2s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.survivor-nav .nav-link {
    color: var(--text-secondary) !important;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 0.85rem;
}

.survivor-nav .nav-link:hover {
    color: var(--torch-orange) !important;
    text-shadow: 0 0 12px rgba(255, 107, 53, 0.6);
}

.survivor-nav .dropdown-menu-dark {
    background: #1A0F2E;
    border: 1px solid var(--torch-glow);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.survivor-nav .dropdown-item {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.survivor-nav .dropdown-item:hover {
    background: rgba(255, 107, 53, 0.2);
    color: var(--torch-orange);
}

.survivor-nav .navbar-toggler {
    border-color: var(--torch-orange);
}

.survivor-nav .season-selector {
    max-width: 180px;
}

/* Main content */
main {
    position: relative;
    z-index: 1;
}

/* Hero section */
.hero-section {
    padding: 3rem 0;
}

.survivor-title {
    font-family: 'Trade Winds', cursive;
    color: var(--torch-orange);
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.3), 3px 3px 6px rgba(0, 0, 0, 0.7);
    letter-spacing: 3px;
}

.subtitle {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

/* Winner announcement */
.winner-announcement {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 140, 66, 0.15) 100%);
    border: 3px solid gold;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.25);
}

.winner-name {
    font-size: 3rem;
    font-weight: bold;
    color: gold;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4), 2px 2px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: 3px;
}

.winner-votes {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Cards */
.view-card {
    text-decoration: none;
    display: block;
    transition: transform 0.3s;
}

.view-card:hover {
    transform: translateY(-10px);
}

.tribal-card {
    background: linear-gradient(135deg, rgba(194, 112, 62, 0.2) 0%, rgba(61, 139, 55, 0.15) 100%);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    color: #fff;
    transition: all 0.3s;
}

.tribal-card:hover {
    border-color: var(--torch-orange);
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.4);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.btn-survivor {
    background: linear-gradient(135deg, var(--torch-orange) 0%, #E85D1C 100%);
    border: none;
    color: white;
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    transition: all 0.3s;
}

.btn-survivor:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.6);
    color: white;
}

.btn-outline-survivor {
    background: transparent;
    border: 2px solid var(--torch-orange);
    color: var(--torch-orange);
    font-weight: bold;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.btn-outline-survivor:hover:not(:disabled) {
    background: var(--torch-orange);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-outline-survivor:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Stats */
.season-stats {
    padding: 2rem;
}

.stat-box {
    padding: 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--torch-orange);
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

/* Episodes view */
.episode-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    backdrop-filter: blur(12px);
}

.episode-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--torch-orange);
    min-width: 200px;
    text-align: center;
}

.episode-card {
    display: none;
    animation: fadeIn 0.5s;
}

.episode-card.active {
    display: block;
}

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

.episode-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(255, 140, 66, 0.1) 100%);
    border-radius: 12px;
}

/* Tribal Council */
.tribal-council {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(12px);
}

.tc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--torch-orange);
}

.tc-number {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--torch-orange);
}

.tc-day {
    margin-left: 1rem;
    color: var(--text-secondary);
}

.tc-tribe {
    font-style: italic;
    color: var(--text-secondary);
}

.elimination-banner {
    background: linear-gradient(90deg, rgba(255, 50, 50, 0.2) 0%, rgba(180, 30, 30, 0.2) 100%);
    border: 2px solid #ff5555;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.torch-out {
    font-size: 1.5em;
    margin-right: 0.5rem;
}

.eliminated-name {
    font-weight: bold;
    color: #ff7777;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* Votes */
.votes-container {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 1.5rem;
}

.votes-header {
    color: var(--torch-orange);
    margin-bottom: 1rem;
    text-align: center;
}

.vote-row {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--torch-orange);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.vote-target {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.vote-count-badge {
    display: inline-block;
    background: var(--torch-orange);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.voters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.voter-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
    border: 1px solid var(--card-border);
}

.tc-notes {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(91, 141, 239, 0.12);
    border-left: 4px solid var(--brains);
    border-radius: 5px;
    font-style: italic;
}

.notes-icon {
    margin-right: 0.5rem;
}

/* Castaways view */
.tribe-filter {
    margin-bottom: 2rem;
}

.btn-filter {
    margin: 0.25rem;
    padding: 0.5rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-filter:hover,
.btn-filter.active {
    transform: scale(1.05);
    box-shadow: 0 0 18px rgba(255, 140, 66, 0.4);
}

.castaways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.castaway-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    transition: all 0.3s;
}

.castaway-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(255, 107, 53, 0.2);
    border-color: var(--torch-glow);
}

.castaway-header {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 3px solid;
    margin-bottom: 1rem;
    position: relative;
}

.castaway-headshot {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--torch-orange);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.castaway-headshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.castaway-placement {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.crown {
    filter: drop-shadow(0 0 12px gold);
}

.placement-number {
    font-weight: bold;
    color: var(--text-secondary);
}

.castaway-name {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    color: var(--torch-orange);
}

.castaway-tribe {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: white;
    font-weight: bold;
}

.castaway-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.stat-item {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--torch-orange);
}

.btn-details {
    width: 100%;
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid var(--torch-orange);
    color: var(--torch-orange);
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-details:hover {
    background: var(--torch-orange);
    color: white;
}

.voting-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--card-border);
}

.timeline {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--torch-orange);
    border-radius: 3px;
}

.timeline-day {
    color: var(--text-secondary);
    font-weight: bold;
}

.timeline-vote {
    color: #fff;
}

.elimination-info,
.final-result {
    background: rgba(255, 50, 50, 0.12);
    border: 1px solid #ff5555;
    border-radius: 5px;
    padding: 1rem;
}

.voter-badge-sm {
    background: rgba(255, 255, 255, 0.12);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* Footer */
.survivor-footer {
    background: rgba(26, 15, 46, 0.9);
    border-top: 2px solid var(--torch-orange);
    color: var(--text-secondary);
    margin-top: 4rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 15, 46, 0.5);
}

::-webkit-scrollbar-thumb {
    background: var(--torch-orange);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--torch-glow);
}

/* Tribal Councils View */
.tribal-timeline {
    max-width: 900px;
    margin: 0 auto;
}

.timeline-stats {
    margin-bottom: 2rem;
}

.stat-badge {
    display: inline-block;
    background: rgba(255, 107, 53, 0.15);
    border: 2px solid var(--torch-orange);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin: 0 0.5rem;
    font-weight: bold;
}

.tribal-council-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(12px);
    transition: all 0.3s;
}

.tribal-council-card.active-card {
    border-color: var(--torch-orange);
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.4);
    transform: scale(1.02);
}

.tc-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--torch-orange);
}

.tc-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tc-episode {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tc-tribe-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-style: italic;
}

.drama-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drama-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.flames {
    font-size: 1.2rem;
}

.score-value {
    color: var(--torch-orange);
    font-weight: bold;
}

.back-to-top {
    margin-top: 3rem;
}

/* Challenges View */
.challenge-timeline {
    max-width: 900px;
    margin: 0 auto;
}

.challenge-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
}

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

.challenge-photo {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    border-radius: 8px;
    margin: 1rem 0;
    border: 2px solid var(--card-border);
}

.challenge-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.challenge-meta {
    display: flex;
    gap: 1rem;
}

.challenge-number {
    font-weight: bold;
    color: var(--torch-orange);
}

.challenge-episode, .challenge-day {
    color: var(--text-secondary);
}

.challenge-type-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
}

.immunity-badge {
    background: linear-gradient(135deg, #5B8DEF, #3A6FE0);
    color: white;
}

.reward-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
}

.challenge-outcome {
    margin-top: 1rem;
}

.outcome-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.winners {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.winner-label {
    color: var(--torch-orange);
    font-weight: bold;
}

.winner-badge {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid gold;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    color: gold;
    font-weight: bold;
}

/* Events View */
.events-timeline {
    max-width: 900px;
    margin: 0 auto;
}

.event-card {
    background: var(--card-bg);
    border-left: 4px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(12px);
}

.event-card.merge-event {
    border-left-color: gold;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.08), var(--card-bg));
}

.event-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.event-icon {
    font-size: 2.5rem;
}

.event-type {
    color: var(--torch-orange);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.event-day {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.event-title {
    color: var(--torch-orange);
    margin-bottom: 0.5rem;
}

.event-description {
    color: #fff;
    line-height: 1.6;
}

.tribes-formed, .players-affected {
    margin-top: 1rem;
    color: var(--text-secondary);
}

.tribe-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    margin: 0.2rem;
}

.event-impact {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Items/Advantages View */
.items-view {
    max-width: 1000px;
    margin: 0 auto;
}

.items-summary {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(12px);
}

.summary-stat {
    padding: 1rem;
}

.advantage-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(12px);
}

.advantage-card.successful {
    border-left: 5px solid #4ADE80;
}

.advantage-card.unsuccessful {
    border-left: 5px solid #F87171;
}

.advantage-card.not-played {
    border-left: 5px solid #9CA3AF;
}

.advantage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.advantage-icon {
    font-size: 3rem;
}

.advantage-meta {
    flex: 1;
}

.advantage-type {
    color: var(--torch-orange);
    margin: 0;
    font-size: 1.5rem;
}

.advantage-tribe {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.status-badge.success {
    background: rgba(74, 222, 128, 0.15);
    color: #4ADE80;
    border: 1px solid #4ADE80;
}

.status-badge.fail {
    background: rgba(248, 113, 113, 0.15);
    color: #F87171;
    border: 1px solid #F87171;
}

.status-badge.holding {
    background: rgba(156, 163, 175, 0.15);
    color: #9CA3AF;
    border: 1px solid #9CA3AF;
}

.status-badge.not-played {
    background: rgba(156, 163, 175, 0.15);
    color: #9CA3AF;
    border: 1px solid #9CA3AF;
}

.advantage-timeline-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.timeline-arrow {
    color: var(--torch-orange);
    font-size: 1.5rem;
    font-weight: bold;
}

.timeline-item {
    background: rgba(255, 255, 255, 0.04);
    padding: 1rem;
    border-radius: 5px;
    border-left: 3px solid var(--torch-orange);
    flex: 1;
    min-width: 200px;
}

.timeline-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-content {
    color: #fff;
}

.timeline-content strong {
    color: var(--torch-orange);
}

.advantage-notes {
    background: rgba(255, 255, 255, 0.04);
    padding: 1rem;
    border-radius: 5px;
    border-left: 3px solid var(--text-secondary);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Castaway updates */
.challenge-breakdown {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Dark Theme */
body[data-theme="dark"] {
    background: linear-gradient(160deg, #0A0A0F 0%, #12101E 40%, #15101F 70%, #0F0A14 100%);
}

body[data-theme="dark"] .survivor-nav {
    background: linear-gradient(90deg, #0A0A0F 0%, #15101E 50%, #0A0A0F 100%);
}

body[data-theme="dark"] .tribal-pattern {
    background-image: repeating-linear-gradient(
        45deg, transparent, transparent 20px,
        rgba(255, 107, 53, 0.02) 20px, rgba(255, 107, 53, 0.02) 40px
    );
}

body[data-theme="dark"] .survivor-footer {
    background: rgba(10, 10, 15, 0.9);
}

/* Theme Toggle */
.theme-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    color: #fff;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* Global Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 280px;
    background: #1A0F2E;
    border: 1px solid var(--torch-glow);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    margin-top: 0.25rem;
}

.search-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s;
}

.search-item:hover {
    background: rgba(255, 107, 53, 0.15);
    color: var(--torch-orange);
}

.search-item:last-child {
    border-bottom: none;
}

.search-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* Sortable Table Headers */
.sortable th {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.sortable th:hover {
    color: gold !important;
}

.sortable th::after {
    content: ' ↕';
    opacity: 0.4;
    font-size: 0.8em;
}

.sortable th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

.sortable th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

/* Back to Top FAB */
.back-to-top-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--torch-orange);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.back-to-top-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.6);
}

/* Spoiler-Free Mode */
body.spoiler-free .spoiler,
body.spoiler-free .winner-name,
body.spoiler-free .castaway-placement .crown,
body.spoiler-free [data-placement="Winner"] .castaway-name,
body.spoiler-free .winner-announcement {
    filter: blur(8px);
    transition: filter 0.3s;
    cursor: pointer;
}

body.spoiler-free .spoiler:hover,
body.spoiler-free .winner-name:hover,
body.spoiler-free .castaway-placement .crown:hover,
body.spoiler-free [data-placement="Winner"] .castaway-name:hover,
body.spoiler-free .winner-announcement:hover {
    filter: blur(0);
}

/* Nav Tabs — dark theme override */
.nav-tabs {
    border-bottom-color: var(--bamboo);
}

.nav-tabs .nav-link {
    background: transparent;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    color: var(--sand);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: transparent;
    border-bottom-color: var(--torch-glow);
    color: var(--torch-orange);
}

.nav-tabs .nav-link.active {
    background: rgba(255, 107, 53, 0.15);
    border-color: var(--bamboo) var(--bamboo) transparent;
    border-bottom: 2px solid var(--torch-orange);
    color: var(--torch-orange);
}

/* Breadcrumb */
.survivor-breadcrumb {
    background: rgba(26, 15, 46, 0.6);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(232, 200, 150, 0.15);
}

.survivor-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
}

.survivor-breadcrumb a:hover {
    color: var(--torch-orange);
}

.survivor-breadcrumb .separator {
    color: var(--card-border);
    margin: 0 0.5rem;
    font-size: 0.75rem;
}

.survivor-breadcrumb .current {
    color: var(--torch-orange);
    font-size: 0.85rem;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-card {
    height: 200px;
}

/* Page Load Animation */
main {
    animation: pageIn 0.4s ease-out;
}

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

/* Staggered Card Entrance */
.view-card,
.castaway-card,
.tribal-council-card,
.challenge-card,
.event-card,
.advantage-card,
.season-summary-card {
    animation: cardIn 0.4s ease-out both;
}

.view-card:nth-child(1), .castaway-card:nth-child(1) { animation-delay: 0.05s; }
.view-card:nth-child(2), .castaway-card:nth-child(2) { animation-delay: 0.1s; }
.view-card:nth-child(3), .castaway-card:nth-child(3) { animation-delay: 0.15s; }
.view-card:nth-child(4), .castaway-card:nth-child(4) { animation-delay: 0.2s; }
.view-card:nth-child(5), .castaway-card:nth-child(5) { animation-delay: 0.25s; }
.view-card:nth-child(6), .castaway-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 107, 53, 0.2);
    border-top: 3px solid var(--torch-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 15, 46, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

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

/* Smooth Table Row Hover */
.table-dark tbody tr {
    transition: background-color 0.2s;
}

.table-dark tbody tr:hover {
    background-color: rgba(255, 107, 53, 0.12) !important;
}

/* Stat Box Counter Animation */
.stat-number {
    transition: transform 0.3s;
}

.stat-box:hover .stat-number {
    transform: scale(1.08);
}

/* Card Border Glow on Hover */
.tribal-card,
.castaway-card,
.season-summary-card {
    transition: all 0.3s ease;
}

/* Smooth Expand/Collapse */
.voting-details {
    animation: expandIn 0.3s ease-out;
}

@keyframes expandIn {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 2000px; }
}

/* Quiz Styles */
.quiz-option:hover:not([style*="pointer-events: none"]) {
    border-color: var(--torch-orange) !important;
    background: rgba(255, 107, 53, 0.1) !important;
}

/* Progress bar */
.progress {
    border-radius: 3px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tc-header-row, .challenge-header, .event-header, .advantage-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .advantage-timeline-row {
        flex-direction: column;
    }

    .timeline-arrow {
        transform: rotate(90deg);
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .nav-links .nav-link {
        font-size: 0.85rem;
    }

    .survivor-title {
        font-size: 1.8rem !important;
    }

    .castaways-grid {
        grid-template-columns: 1fr;
    }

    .season-selector {
        max-width: 140px !important;
        font-size: 0.8rem;
    }

    .stat-box {
        padding: 0.75rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .back-to-top-fab {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .survivor-breadcrumb {
        font-size: 0.75rem;
    }

    .card-icon {
        font-size: 2.5rem;
    }

    .winner-name {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .survivor-logo {
        font-size: 1.1rem;
    }

    .navbar-nav .nav-link {
        font-size: 0.75rem !important;
    }

    .castaway-stats {
        grid-template-columns: 1fr;
    }

    .challenge-filter .btn-filter,
    .item-filter .btn-filter {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .castaways-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}