@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Nosifer&family=Chiller&display=swap');

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

/* ========== DISCORD WIDGET STYLES ========== */
.discord-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: #5865F2;
    border-radius: 50px;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.discord-widget:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6);
    color: white;
    text-decoration: none;
}

.discord-widget .discord-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .discord-widget {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .discord-widget .discord-icon {
        width: 18px;
        height: 18px;
    }
}

/* ========== ANNOUNCEMENT BANNER STYLES ========== */
.announcement-banner {
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 25%, #DC143C 50%, #CD5C5C 75%, #B22222 100%);
    border: 2px solid #FFE4E1;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.6), 0 0 20px rgba(220, 20, 60, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    grid-column: 1 / -1; /* Span full width of grid */
    position: relative;
}

.announcement-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 0, 0, 0.8), 0 0 30px rgba(220, 20, 60, 0.5);
}

.announcement-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: white;
    text-align: center;
}


.banner-discord-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(88, 101, 242, 0.9);
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.banner-discord-btn:hover {
    background: rgba(88, 101, 242, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.announcement-icon {
    font-size: 1.8rem;
}

.announcement-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.announcement-text strong {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4CAF50;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 10px rgba(76, 175, 80, 0.5);
}

.announcement-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
}

.announcement-discord {
    margin-top: 8px;
}

.discord-highlight {
    font-size: 0.85rem;
    color: #87CEEB;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.announcement-arrow {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    height: 36px;
}

@media (max-width: 768px) {
    .announcement-banner {
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .announcement-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .announcement-text strong {
        font-size: 1.1rem;
    }
    
    .announcement-subtitle {
        font-size: 0.8rem;
    }
    
    .discord-highlight {
        font-size: 0.75rem;
    }
    
    .announcement-arrow {
        transform: rotate(90deg);
        font-size: 1.2rem;
    }
    
    .announcement-icon {
        font-size: 1.5rem;
    }
}

/* Performance optimizations */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ========== FRANCHISE ANALYTICS STYLES ========== */
.franchise-analytics {
    padding: 20px 0;
}

.analytics-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 68, 68, 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #ff4444;
    margin-bottom: 5px;
}

.stat-label {
    color: #ccc;
    font-size: 0.9rem;
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 68, 68, 0.05);
    border-radius: 6px;
    border-left: 3px solid #ff4444;
}

.record-label {
    color: #ccc;
    font-weight: bold;
}

.record-value {
    color: #ff4444;
    font-weight: bold;
}

.tiers-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.tier-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
}

.player-tier-list {
    margin-top: 10px;
}

.tier-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.player-name {
    color: #fff;
}

.player-score {
    color: #ff4444;
    font-weight: bold;
    font-size: 0.9rem;
}

.moments-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.moment-item {
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
}

.moment-item.legendary {
    background: rgba(255, 215, 0, 0.1);
    border-color: #FFD700;
}

.moment-item.epic {
    background: rgba(138, 43, 226, 0.1);
    border-color: #8A2BE2;
}

.moment-item.thrilling {
    background: rgba(255, 69, 0, 0.1);
    border-color: #FF4500;
}

.moment-item.memorable {
    background: rgba(0, 191, 255, 0.1);
    border-color: #00BFFF;
}

.moment-type {
    color: #ff4444;
    font-weight: bold;
    margin-bottom: 5px;
}

.moment-description {
    color: #ccc;
    margin-bottom: 8px;
    line-height: 1.4;
}

.moment-season {
    color: #888;
    font-size: 0.8rem;
    font-style: italic;
}

.insights-list {
    margin-top: 15px;
}

.insight-item {
    padding: 15px;
    margin-bottom: 12px;
    background: rgba(255, 68, 68, 0.05);
    border-radius: 8px;
    border-left: 3px solid #ff4444;
}

.insight-type {
    color: #ff4444;
    font-weight: bold;
    margin-bottom: 8px;
}

.insight-prediction {
    color: #ccc;
    margin-bottom: 8px;
    line-height: 1.4;
}

.insight-confidence {
    color: #888;
    font-size: 0.8rem;
}

.archetype-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.archetype-card {
    background: rgba(255, 68, 68, 0.05);
    border: 1px solid rgba(255, 68, 68, 0.2);
    border-radius: 8px;
    padding: 15px;
}

.archetype-name {
    color: #ff4444;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.archetype-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.archetype-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.archetype-stat .stat-label {
    color: #ccc;
    font-size: 0.85rem;
}

.archetype-stat .stat-value {
    color: #ff4444;
    font-weight: bold;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .stats-grid,
    .records-grid,
    .tiers-container,
    .moments-list,
    .archetype-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-section {
        padding: 15px;
        margin-bottom: 20px;
    }
}

* {
    backface-visibility: hidden;
    perspective: 1000px;
}

.container,
.section,
.character-card {
    contain: layout style paint;
}

/* Mobile landscape orientation */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .audio-controls {
        bottom: 5px;
        right: 5px;
        min-width: 140px;
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .audio-controls button {
        padding: 6px 8px;
        font-size: 11px;
        min-height: 36px;
        margin: 1px;
    }
    
    .container {
        margin-top: 5px;
        margin-bottom: 60px;
        padding: 5px;
    }
    
    .hub-logo-main {
        font-size: 1.8rem !important;
    }
    
    .logo-2e-main {
        font-size: 2rem !important;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .audio-controls button:hover {
        transform: none; /* Disable hover effects on touch */
    }
    
    .btn:active,
    .audio-controls button:active {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* Fix character mention alignment */
.character-mention {
    line-height: 1 !important;
    vertical-align: baseline !important;
}

.character-mention img {
    vertical-align: middle !important;
    margin-bottom: 2px;
}


@keyframes bloodDrip {
    0% { transform: translateY(-10px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}


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


@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========== FRANCHISE SYSTEM STYLES ========== */

/* Franchise Dashboard */
.franchise-dashboard {
    background: linear-gradient(135deg, #1a0f0a 0%, #2d1810 50%, #1a0f0a 100%);
    border: 2px solid #8B0000;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.franchise-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(139, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 0, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.franchise-title {
    font-family: 'Nosifer', cursive;
    font-size: 2.5rem;
    color: #FF6B6B;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 
        0 0 10px #8B0000,
        0 0 20px #8B0000,
        2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: flicker 3s infinite;
}

.franchise-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.franchise-stat-card {
    background: linear-gradient(145deg, #2d1810 0%, #1a0f0a 100%);
    border: 1px solid #8B0000;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.franchise-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(139, 0, 0, 0.4);
    border-color: #FF6B6B;
}

.franchise-stat-card h3 {
    color: #FF6B6B;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-family: 'Creepster', cursive;
    text-shadow: 0 0 5px #8B0000;
}

.franchise-stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin-bottom: 5px;
}

.franchise-stat-label {
    color: #CCCCCC;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Leaderboards */
.franchise-leaderboards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.leaderboard-section {
    background: linear-gradient(145deg, #2d1810 0%, #1a0f0a 100%);
    border: 1px solid #8B0000;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.leaderboard-title {
    color: #FF6B6B;
    font-size: 1.3rem;
    font-family: 'Creepster', cursive;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 8px #8B0000;
}

.leaderboard-list {
    list-style: none;
    padding: 0;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, rgba(139, 0, 0, 0.1) 0%, transparent 100%);
    border-left: 3px solid #8B0000;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: linear-gradient(90deg, rgba(139, 0, 0, 0.2) 0%, transparent 100%);
    transform: translateX(5px);
}

.leaderboard-rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFD700;
    margin-right: 15px;
    min-width: 30px;
    text-align: center;
}

.leaderboard-player {
    flex: 1;
    color: #FFFFFF;
    font-weight: 500;
}

.leaderboard-stat {
    color: #FF6B6B;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Returnee Builder */
.returnee-builder {
    background: linear-gradient(135deg, #1a0f0a 0%, #2d1810 50%, #1a0f0a 100%);
    border: 2px solid #8B0000;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.3);
    position: relative;
}

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

.theme-card {
    background: linear-gradient(145deg, #2d1810 0%, #1a0f0a 100%);
    border: 1px solid #8B0000;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: #FF6B6B;
    box-shadow: 0 15px 30px rgba(139, 0, 0, 0.4);
}

.theme-card.selected {
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.theme-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.1), transparent);
    transition: left 0.6s ease;
}

.theme-card:hover::before {
    left: 100%;
}

.theme-name {
    color: #FF6B6B;
    font-size: 1.3rem;
    font-family: 'Creepster', cursive;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #8B0000;
}

.theme-description {
    color: #CCCCCC;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.theme-cast-size {
    color: #FFD700;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Player Selection Grid */
.player-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.selectable-player {
    background: linear-gradient(145deg, #2d1810 0%, #1a0f0a 100%);
    border: 1px solid #8B0000;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.selectable-player:hover {
    transform: scale(1.05);
    border-color: #FF6B6B;
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.3);
}

.selectable-player.selected {
    border-color: #FFD700;
    background: linear-gradient(145deg, #3d2810 0%, #2a1f0a 100%);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.selectable-player.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(50%);
}

.player-name {
    color: #FFFFFF;
    font-weight: bold;
    margin-bottom: 5px;
}

.player-stats {
    color: #CCCCCC;
    font-size: 0.8rem;
    line-height: 1.3;
}

.player-reputation {
    color: #FF6B6B;
    font-size: 0.75rem;
    margin-top: 5px;
    font-style: italic;
}

/* Selected Cast Display */
.selected-cast-display {
    background: linear-gradient(145deg, #2d1810 0%, #1a0f0a 100%);
    border: 1px solid #8B0000;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.selected-cast-title {
    color: #FF6B6B;
    font-size: 1.2rem;
    font-family: 'Creepster', cursive;
    margin-bottom: 15px;
    text-align: center;
}

.selected-cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.selected-player-chip {
    background: linear-gradient(90deg, #8B0000, #FF6B6B);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.selected-player-chip:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(139, 0, 0, 0.4);
}

.selected-player-chip .remove-player {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #8B0000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
}

/* Action Buttons */
.franchise-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.franchise-btn {
    background: linear-gradient(145deg, #8B0000, #FF6B6B);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.3);
}

.franchise-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.4);
    background: linear-gradient(145deg, #FF6B6B, #8B0000);
}

.franchise-btn:active {
    transform: translateY(-1px);
}

.franchise-btn.secondary {
    background: linear-gradient(145deg, #4A4A4A, #6B6B6B);
}

.franchise-btn.secondary:hover {
    background: linear-gradient(145deg, #6B6B6B, #4A4A4A);
}

/* Achievement Badges */
.achievement-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 2px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.achievement-badge.legendary {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.achievement-badge.mythic {
    background: linear-gradient(45deg, #9400D3, #8A2BE2);
    box-shadow: 0 0 10px rgba(148, 0, 211, 0.5);
}

.achievement-badge.epic {
    background: linear-gradient(45deg, #FF6B6B, #8B0000);
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
}

.achievement-badge.rare {
    background: linear-gradient(45deg, #4169E1, #1E90FF);
    box-shadow: 0 0 6px rgba(65, 105, 225, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .franchise-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .franchise-leaderboards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .returnee-themes {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .player-selection-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 10px;
    }
    
    .franchise-title {
        font-size: 2rem;
    }
    
    .franchise-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .franchise-btn {
        width: 100%;
        max-width: 300px;
    }
}
}


@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}


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


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


@keyframes minimizeWidget {
    from { transform: scale(1); }
    50% { transform: scale(0.95); }
    to { transform: scale(1); }
}


@keyframes maximizeWidget {
    from { transform: scale(0.95); }
    to { transform: scale(1); }
}


.audio-controls.minimizing {
    animation: minimizeWidget 0.3s ease;
}


.audio-controls.maximizing {
    animation: maximizeWidget 0.3s ease;
}


.blood-particle {
    position: absolute;
    width: 4px;
    height: 8px;
    background: #ff0000;
    border-radius: 50%;
    animation: bloodDrip 2s ease-in-out infinite;
    pointer-events: none;
}


.flicker-effect {
    animation: flicker 0.3s ease-in-out;
}


.pulse-effect {
    animation: pulse 0.5s ease-in-out;
}


.shake-effect {
    animation: shake 0.5s ease-in-out;
}


.audio-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(30, 30, 30, 0.95);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #555;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    user-select: none;
    backdrop-filter: blur(10px);
    min-width: 200px;
}


.audio-controls:hover {
    border-color: #ff4444;
    box-shadow: 0 4px 25px rgba(255, 68, 68, 0.3);
}


.audio-controls.minimized {
    padding: 8px 12px;
    min-width: auto;
}


.audio-controls.minimized .audio-content {
    display: none;
}


.audio-controls.dragging {
    transition: none;
    cursor: grabbing;
}


.audio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    cursor: grab;
    padding: 4px 0;
    border-bottom: 1px solid #555;
}


.audio-header:active {
    cursor: grabbing;
}


.audio-title {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}


.minimize-btn {
    background: #555 !important;
    color: #fff !important;
    border: none;
    padding: 4px 8px !important;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px !important;
    margin: 0 !important;
    transition: all 0.2s ease;
}


.minimize-btn:hover {
    background: #ff4444 !important;
    transform: scale(1.1);
}


.audio-content {
    transition: all 0.3s ease;
}


.audio-controls button {
    background: #ff4444;
    color: white;
    border: none;
    padding: 8px 12px;
    margin: 2px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}


.audio-controls button:hover {
    background: #ff6666;
    transform: translateY(-1px);
}


.audio-controls button.muted {
    background: #666;
}


.volume-slider {
    width: 80px;
    margin-left: 10px;
}


.drag-indicator {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}


.audio-header:hover .drag-indicator {
    opacity: 1;
}


body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 50%, #0a0a0a 100%);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255, 102, 102, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(255, 102, 102, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    will-change: opacity;
}

/* Landing Hub Styles */
#main-hub {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 50%, #0a0a0a 100%);
    position: relative;
    padding: 40px 20px;
}

#main-hub::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255, 102, 102, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(255, 102, 102, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.hub-header {
    margin-bottom: 80px;
    position: relative;
}

/* Match the exact in-game logo styling */
.hub-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    animation: logoEntrance 2s ease-out;
}

.hub-logo-main {
    font-size: 4.2rem;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 3px;
    text-shadow: 
        2px 2px 8px rgba(0, 0, 0, 0.8), 
        0 0 20px rgba(255, 68, 68, 0.4),
        0 0 40px rgba(255, 68, 68, 0.2);
    line-height: 1;
    margin-bottom: 8px;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #ff6666 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: textShimmer 3s ease-in-out infinite;
}

.hub-logo-main::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -25px;
    width: 3px;
    height: 65px;
    background: linear-gradient(to bottom, #ff4444, #cc0000);
    transform: translateY(-50%) rotate(-15deg);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.7);
    animation: slashFlicker 2s infinite alternate;
}

.hub-logo-main::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -25px;
    width: 3px;
    height: 65px;
    background: linear-gradient(to bottom, #ff4444, #cc0000);
    transform: translateY(-50%) rotate(15deg);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.7);
    animation: slashFlicker 2s infinite alternate-reverse;
}

@keyframes textShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hub-logo-subtitle {
    font-size: 1.6rem;
    color: #cccccc;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 2px;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: 15px;
    animation: fadeInUp 2s ease-out;
    animation-delay: 0.5s;
    animation-fill-mode: both;
    opacity: 0;
}

.hub-logo-credit {
    font-size: 0.9rem;
    color: #888888;
    font-weight: 300;
    letter-spacing: 1px;
    font-family: 'Arial', sans-serif;
    text-transform: uppercase;
    animation: fadeInUp 2s ease-out;
    animation-delay: 1s;
    animation-fill-mode: both;
    opacity: 0;
}

.hub-logo-credit:hover {
    opacity: 1;
    color: #aaa;
}

/* User Guide Section */
.user-guide {
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(255, 68, 68, 0.2);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    max-width: 1000px;
    backdrop-filter: blur(15px);
    position: relative;
}

.user-guide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.03) 0%, transparent 50%);
    border-radius: 16px;
    pointer-events: none;
}

.guide-content {
    position: relative;
    z-index: 1;
}

.guide-content h3 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.guide-content p {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 25px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.quick-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.tip {
    background: rgba(255, 68, 68, 0.08);
    border: 1px solid rgba(255, 68, 68, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ddd;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.tip:hover {
    background: rgba(255, 68, 68, 0.12);
    border-color: rgba(255, 68, 68, 0.25);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .user-guide {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .guide-content h3 {
        font-size: 1.3rem;
    }
    
    .guide-content p {
        font-size: 0.9rem;
    }
    
    .quick-tips {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .tip {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

.simulator-tiles {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    max-width: 1200px;
}

.tile {
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 68, 68, 0.2);
    border-radius: 12px;
    padding: 25px;
    width: 300px;
    height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 280px;
    max-width: 320px;
}

.tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tile:hover::before {
    opacity: 1;
}

.tile:hover {
    border-color: rgba(255, 68, 68, 0.4);
    background: rgba(30, 30, 30, 0.95);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.tile-title {
    font-size: 2.8rem;
    font-weight: 900;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    letter-spacing: 2px;
    line-height: 1.1;
    margin-bottom: 10px;
}

.slasher-tile .tile-title {
    color: #ff4444;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(255, 68, 68, 0.6);
}

.finalgirl-tile .tile-title {
    color: #4CAF50;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(76, 175, 80, 0.6);
}

.wicked-tile .tile-title {
    color: #9370DB;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(147, 112, 219, 0.6);
}

.coming-soon-tile {
    opacity: 0.7;
}

.coming-soon-tile .tile-title {
    color: #666;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.tile-description {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.6;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 320px;
    margin-bottom: 15px;
}

.play-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

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

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

.play-btn:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.play-btn.disabled {
    background: linear-gradient(45deg, #555, #444);
    color: #888;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.play-btn.disabled:hover {
    background: linear-gradient(45deg, #555, #444);
    transform: none;
    box-shadow: none;
}

.play-btn.disabled::before {
    display: none;
}

/* Game Features and Stats */
.game-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 15px;
    margin-top: 10px;
}

.feature-tag {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #fff;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.finalgirl-tile .feature-tag {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.3);
}

.wicked-tile .feature-tag {
    background: rgba(147, 112, 219, 0.15);
    border-color: rgba(147, 112, 219, 0.3);
}

.cullhouse-tile .feature-tag {
    background: rgba(74, 144, 226, 0.15);
    border-color: rgba(74, 144, 226, 0.3);
}

.game-stats {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.difficulty, .playtime {
    font-size: 0.8rem;
    color: #ccc;
    font-weight: 500;
    padding: 2px 0;
}

.guide-btn {
    background: linear-gradient(45deg, #4A90E2, #357ABD);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.guide-btn:hover {
    background: linear-gradient(45deg, #357ABD, #4A90E2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
    text-decoration: none;
    color: white;
}

/* Back to Hub Button */
.back-to-hub-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(20, 20, 20, 0.9);
    color: #fff;
    border: 1px solid rgba(255, 68, 68, 0.3);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.back-to-hub-btn:hover {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 68, 68, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .hub-logo-main {
        font-size: 2.8rem;
        letter-spacing: 3px;
    }
    
    .simulator-tiles {
        flex-direction: column;
        gap: 20px;
    }
    
    .tile {
        min-width: auto;
        width: 100%;
        max-width: 350px;
    }

    .back-to-hub-btn {
        top: 10px;
        left: 10px;
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

#simulator {
    min-height: 100vh;
    display: block;
}


.container {
    max-width: 1400px;
    margin: 0 auto;
}


.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 68, 68, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    will-change: transform;
}

.header h1 {
    font-size: 3.5rem;
    color: #ff4444;
    text-shadow: 0 0 30px #ff4444, 0 0 60px rgba(255, 68, 68, 0.5);
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-weight: 700;
    position: relative;
}


.header .subtitle {
    color: #ccc;
    font-size: 1.2rem;
    margin-bottom: 5px;
}


.header .tagline {
    color: #ff6666;
    font-style: italic;
}

/* TITLE STYLE OPTIONS */

/* Option 1: Enhanced Typography with Custom Font */
.title-option-1 {
    font-family: 'Nosifer', 'Creepster', serif;
    font-size: 4rem;
    background: linear-gradient(45deg, #ff4444, #cc0000, #ff6666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 0 #000, 4px 4px 10px rgba(255, 68, 68, 0.5);
    letter-spacing: 3px;
    margin-bottom: 10px;
    font-weight: 700;
}

/* Option 2: CSS-Based Logo Design */
.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.logo-slash {
    font-size: 6rem;
    color: #ff4444;
    text-shadow: 0 0 20px #ff4444;
    font-weight: bold;
    transform: rotate(-15deg);
    line-height: 0.8;
}

.logo-text {
    font-size: 3rem;
    color: #fff;
    font-weight: 900;
    letter-spacing: 4px;
    text-shadow: 2px 2px 0 #000, 0 0 20px #ff4444;
    margin-top: -10px;
}

.logo-subtitle {
    font-size: 1.2rem;
    color: #ff6666;
    letter-spacing: 2px;
    font-weight: 300;
    margin-top: 5px;
}

/* Option 2a: Horizontal Slash Logo */
.logo-2a {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    gap: 20px;
}

.logo-2a-slash {
    font-size: 4rem;
    color: #ff4444;
    text-shadow: 0 0 20px #ff4444;
    font-weight: bold;
    transform: rotate(-45deg);
}

.logo-2a-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-2a-main {
    font-size: 2.5rem;
    color: #fff;
    font-weight: 900;
    letter-spacing: 3px;
    text-shadow: 2px 2px 0 #000, 0 0 20px #ff4444;
    line-height: 1;
}

.logo-2a-sub {
    font-size: 1rem;
    color: #ff6666;
    letter-spacing: 2px;
    font-weight: 300;
    margin-top: 2px;
}

/* Option 2b: Multiple Slashes Logo */
.logo-2b {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.logo-2b-slashes {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    color: rgba(255, 68, 68, 0.3);
    font-weight: bold;
    z-index: 0;
}

.logo-2b-slash1 { transform: translate(-60%, -60%) rotate(-15deg); }
.logo-2b-slash2 { transform: translate(-40%, -40%) rotate(-25deg); }
.logo-2b-slash3 { transform: translate(-80%, -30%) rotate(-35deg); }

.logo-2b-text {
    font-size: 2.8rem;
    color: #fff;
    font-weight: 900;
    letter-spacing: 3px;
    text-shadow: 2px 2px 0 #000, 0 0 20px #ff4444;
    z-index: 1;
    position: relative;
    text-align: center;
}

.logo-2b-subtitle {
    font-size: 1.1rem;
    color: #ff6666;
    letter-spacing: 2px;
    font-weight: 300;
    margin-top: 5px;
    z-index: 1;
    position: relative;
}

/* Option 2c: Slash Through Text Logo */
.logo-2c {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.logo-2c-container {
    position: relative;
    display: inline-block;
}

.logo-2c-text {
    font-size: 3rem;
    color: #fff;
    font-weight: 900;
    letter-spacing: 3px;
    text-shadow: 2px 2px 0 #000, 0 0 20px #ff4444;
    line-height: 1.2;
}

.logo-2c-slash {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: #ff4444;
    text-shadow: 0 0 30px #ff4444;
    font-weight: bold;
    transform: rotate(-20deg);
    z-index: 2;
}

.logo-2c-subtitle {
    font-size: 1.1rem;
    color: #ff6666;
    letter-spacing: 2px;
    font-weight: 300;
    margin-top: 10px;
}

/* Option 2d: Knife/Blade Logo */
.logo-2d {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.logo-2d-blade {
    font-size: 4rem;
    color: #ff4444;
    text-shadow: 0 0 20px #ff4444;
    font-weight: bold;
    transform: rotate(-30deg);
    line-height: 0.8;
    filter: drop-shadow(3px 3px 0 #000);
}

.logo-2d-text {
    font-size: 2.8rem;
    color: #fff;
    font-weight: 900;
    letter-spacing: 4px;
    text-shadow: 2px 2px 0 #000, 0 0 20px #ff4444;
    margin-top: -5px;
    text-align: center;
}

.logo-2d-subtitle {
    font-size: 1.1rem;
    color: #ff6666;
    letter-spacing: 2px;
    font-weight: 300;
    margin-top: 5px;
}

/* Option 2e: Clean Modern Style (JANUKO inspired) */
.logo-2e {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.logo-2e-main {
    font-size: 4.2rem;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 6px;
    text-shadow: 
        2px 2px 8px rgba(0, 0, 0, 0.8), 
        0 0 20px rgba(255, 68, 68, 0.4),
        0 0 40px rgba(255, 68, 68, 0.2);
    line-height: 1;
    margin-bottom: 8px;
    font-family: 'Arial Black', Arial, sans-serif;
    position: relative;
    animation: textPulse 3s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { 
        text-shadow: 
            2px 2px 8px rgba(0, 0, 0, 0.8), 
            0 0 20px rgba(255, 68, 68, 0.4),
            0 0 40px rgba(255, 68, 68, 0.2);
    }
    50% { 
        text-shadow: 
            2px 2px 8px rgba(0, 0, 0, 0.8), 
            0 0 30px rgba(255, 68, 68, 0.6),
            0 0 60px rgba(255, 68, 68, 0.4);
    }
}

.logo-2e-main::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -20px;
    width: 3px;
    height: 60px;
    background: linear-gradient(to bottom, #ff4444, #cc0000);
    transform: translateY(-50%) rotate(-15deg);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.7);
    animation: slashFlicker 2s infinite alternate;
}

.logo-2e-main::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px;
    width: 3px;
    height: 60px;
    background: linear-gradient(to bottom, #ff4444, #cc0000);
    transform: translateY(-50%) rotate(15deg);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.7);
    animation: slashFlicker 2s infinite alternate-reverse;
}

@keyframes slashFlicker {
    0% { 
        opacity: 0.8;
        box-shadow: 0 0 15px rgba(255, 68, 68, 0.7);
    }
    100% { 
        opacity: 1;
        box-shadow: 0 0 25px rgba(255, 68, 68, 0.9);
    }
}

.logo-2e-subtitle {
    font-size: 1.6rem;
    color: #cccccc;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 2px;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: 15px;
    animation: fadeInUp 2s ease-out;
    animation-delay: 0.5s;
    animation-fill-mode: both;
}

.logo-2e-credit {
    font-size: 0.9rem;
    color: #888888;
    font-weight: 300;
    letter-spacing: 1px;
    font-family: 'Arial', sans-serif;
    text-transform: uppercase;
    animation: fadeInUp 2s ease-out;
    animation-delay: 1s;
    animation-fill-mode: both;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.logo-2e-credit:hover {
    opacity: 1;
    color: #aaa;
}

.logo-2e {
    animation: logoEntrance 2s ease-out;
}

@keyframes logoEntrance {
    0% {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Option 3: Animated Blood Drip Effect */
.title-option-3 {
    font-size: 3.5rem;
    color: #ff4444;
    text-shadow: 0 0 30px #ff4444, 0 0 60px rgba(255, 68, 68, 0.5);
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-weight: 700;
    position: relative;
}

.title-option-3::after {
    content: '🩸';
    position: absolute;
    right: -50px;
    top: 0;
    animation: bloodDrip 3s infinite;
    font-size: 2rem;
}

/* Option 4: Film Strip Border */
.title-option-4 {
    font-size: 3.5rem;
    color: #ff4444;
    text-shadow: 0 0 30px #ff4444;
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-weight: 700;
    padding: 20px 30px;
    border: 8px solid #222;
    border-left: 20px solid #222;
    border-right: 20px solid #222;
    background: repeating-linear-gradient(90deg, 
        rgba(51, 51, 51, 0.3), rgba(51, 51, 51, 0.3) 10px, 
        rgba(68, 68, 68, 0.5) 10px, rgba(68, 68, 68, 0.5) 20px);
    position: relative;
}

.title-option-4::before,
.title-option-4::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 15px;
    height: 15px;
    background: #000;
    border-radius: 50%;
    transform: translateY(-50%);
}

.title-option-4::before {
    left: -30px;
    box-shadow: 0 -40px 0 #000, 0 40px 0 #000, 0 -80px 0 #000, 0 80px 0 #000;
}

.title-option-4::after {
    right: -30px;
    box-shadow: 0 -40px 0 #000, 0 40px 0 #000, 0 -80px 0 #000, 0 80px 0 #000;
}


.section {
    background: rgba(30, 30, 30, 0.95);
    border: 2px solid #ff4444;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateZ(0);
    will-change: transform;
}

.section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff4444, transparent, #ff4444);
    z-index: -1;
    border-radius: 15px;
    opacity: 0.4;
    will-change: opacity;
}


.section h2 {
    color: #ff4444;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}


.form-group {
    margin-bottom: 20px;
}


label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #fff;
}


input, select, textarea {
    width: 100%;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 5px;
    color: #fff;
    font-size: 16px;
}


input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

/* Form specific classes used in setup screen */
.setup-form {
    display: block;
}

.form-section {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #fff;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 5px;
    color: #fff;
    font-size: 16px;
}

/* Make season inputs match game mode select width */
#season-title, #season-year {
    width: 300px;
    max-width: 300px;
}

.setup-title {
    color: #ff4444;
    font-size: 1.8rem;
    margin-bottom: 25px;
}


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

.devotee-setup-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px;
    margin-top: 20px;
    max-width: 100%;
}

/* Force 4 columns with higher specificity */
#cast-container.devotee-setup-grid {
    grid-template-columns: repeat(4, 1fr) !important;
}


.character-card {
    background: linear-gradient(135deg, #2d1420 0%, #1a0a1a 100%);
    border: 2px solid #dc2626;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc2626, #ef4444, #f87171);
}

.character-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(220, 38, 38, 0.2);
    border-color: #ef4444;
}

.character-card.returning {
    border: 2px solid #10b981;
    background: linear-gradient(135deg, #1a2e1a 0%, #0a1a0a 100%);
}

.character-card.returning::before {
    background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
}

.character-card.returning:hover {
    border-color: #34d399;
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.2);
}


.character-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}


.character-avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border-radius: 50%;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border: 3px solid rgba(220, 38, 38, 0.3);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.character-card:hover .character-avatar {
    border-color: rgba(239, 68, 68, 0.5);
    transform: scale(1.05);
}

.character-portrait-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 15px;
}

.character-portrait {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #555;
    position: relative;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.character-portrait:hover {
    border-color: #ff6666;
    transform: scale(1.05);
}

.character-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portrait-placeholder {
    width: 100%;
    height: 100%;
    background: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #ccc;
}

.portrait-controls {
    display: flex;
    gap: 4px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.portrait-controls:hover {
    opacity: 1;
}

.portrait-btn {
    width: 24px;
    height: 24px;
    background: #444;
    border: 1px solid #666;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.portrait-btn:hover {
    background: #666;
    transform: scale(1.1);
}



.character-info h3 {
    margin-bottom: 5px;
    color: #fff;
}


.character-info .archetype {
    color: #ff4444;
    font-style: italic;
}


.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}


.stat {
    margin-bottom: 16px;
    padding: 0;
    background: none;
    border-radius: 0;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #dc2626;
}


.stat-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 50%, #f87171 100%);
    border-radius: 8px;
    transition: width 0.3s ease;
    position: relative;
}

.stat-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    transition: width 0.3s ease;
}


.survival-chance {
    margin-top: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(56, 142, 60, 0.15));
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #66BB6A;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}


.btn {
    background: linear-gradient(135deg, #ff4444, #cc3333);
    color: white;
    border: 2px solid transparent;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    margin: 10px 5px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
    letter-spacing: 1px;
}

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


.btn:hover {
    background: linear-gradient(135deg, #ff6666, #ff4444);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
}


.btn-secondary {
    background: linear-gradient(135deg, #666, #444);
}


.btn-secondary:hover {
    background: linear-gradient(135deg, #777, #555);
}


.movie-log {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}


.event {
    background: rgba(255, 68, 68, 0.1);
    border-left: 4px solid #ff4444;
    padding: 12px;
    margin: 10px 0;
    border-radius: 0 5px 5px 0;
    animation: fadeInUp 0.5s ease-out;
}


.event.title {
    border-left-color: #ff4444;
    background: rgba(255, 68, 68, 0.2);
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
}


.event.narrative {
    border-left-color: #888;
    background: rgba(136, 136, 136, 0.1);
    font-style: italic;
}


.event.killer-thought {
    border-left-color: #8e24aa;
    background: rgba(142, 36, 170, 0.1);
    font-style: italic;
    color: #e1bee7;
}


.event.death {
    border-left-color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}


.event.death::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(255, 0, 0, 0.1) 50%, transparent 51%);
    pointer-events: none;
}


.event.attack {
    border-left-color: #ff8800;
    background: rgba(255, 136, 0, 0.1);
}


.event.reveal, .event.event {
    border-left-color: #8800ff;
    background: rgba(136, 0, 255, 0.1);
}


.event.dialogue {
    font-style: italic;
    color: #aaa;
    border-left-color: #666;
    background: rgba(102, 102, 102, 0.1);
}


.event.red-herring {
    background: rgba(255, 255, 0, 0.1);
    border-left-color: #ffff00;
}


.final-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.95), rgba(50, 50, 50, 0.95));
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}


.final-table th {
    background: linear-gradient(135deg, #ff4444, #d32f2f);
    color: white;
    padding: 18px 15px;
    text-align: center;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}


.final-table td {
    padding: 14px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 500;
    transition: background-color 0.2s ease;
}


.final-table tr:hover {
    background: rgba(255, 68, 68, 0.1);
}


.status-alive { background: #4CAF50; color: white; padding: 4px 8px; border-radius: 3px; }
.status-dead { background: #f44336; color: white; padding: 4px 8px; border-radius: 3px; }
.status-attacked { background: #ff9800; color: white; padding: 4px 8px; border-radius: 3px; }
.status-killed { background: #d32f2f; color: white; padding: 4px 8px; border-radius: 3px; }
.status-killer { background: #9c27b0; color: white; padding: 4px 8px; border-radius: 3px; }
.status-n\/a { background: #666; color: #ccc; padding: 4px 8px; border-radius: 3px; }


.edgic-table {
    margin-top: 30px;
}


.franchise-history {
    margin-top: 40px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(40, 40, 40, 0.95));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
}


.franchise-history h3 {
    color: #ff4444;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}


.edgic-cell {
    text-align: center;
    font-weight: bold;
    padding: 8px 4px;
    border-radius: 3px;
}


/* UTR ratings - lightest tones */
.edgic-utr { background: #F4A460; color: white; } /* Sandy brown - neutral UTR */
.edgic-utrp { background: #DDA0DD; color: white; } /* Plum - positive UTR */
.edgic-utrn { background: #CD853F; color: white; } /* Peru - negative UTR */
.edgic-utrm { background: #D2691E; color: white; } /* Chocolate - mixed UTR */


/* MOR ratings - medium tones */
.edgic-mor { background: #FFD700; color: black; } /* Gold - neutral MOR */
.edgic-morp { background: #DA70D6; color: white; } /* Orchid - positive MOR */
.edgic-morn { background: #9370DB; color: white; } /* Medium slate blue - negative MOR */
.edgic-morm { background: #8FBC8F; color: white; } /* Dark sea green - mixed MOR */


/* CP ratings - strongest tones */
.edgic-cp { background: #20B2AA; color: white; } /* Light sea green - neutral CP */
.edgic-cpp { background: #4169E1; color: white; } /* Royal blue - positive CP */
.edgic-cpn { background: #8A2BE2; color: white; } /* Blue violet - negative CP */
.edgic-cpm { background: #008B8B; color: white; } /* Dark cyan - mixed CP */


/* OTT ratings - most dramatic */
.edgic-ott { background: #32CD32; color: white; } /* Lime green - neutral OTT */
.edgic-ottp { background: #00FF7F; color: white; } /* Spring green - positive OTT */
.edgic-ottn { background: #FF0000; color: white; } /* Red - negative OTT */
.edgic-ottm { background: #228B22; color: white; } /* Forest green - mixed OTT */


/* Special cases */
.edgic-inv { background: #333; color: #666; } /* Invisible */
.edgic-dead { background: #666; color: #ccc; } /* Dead */
.edgic-na { background: #444; color: #888; } /* Not available */


.killer-reveal {
    background: linear-gradient(135deg, #8e24aa, #5e35b1);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    margin: 30px 0;
    animation: pulse 2s ease-in-out infinite;
}


.killer-reveal h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 15px;
}


.motive-text {
    color: #e1bee7;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 15px 0;
}


.hidden {
    display: none;
}


.progress-bar {
    width: 100%;
    height: 20px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}


.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ff8888, #ffaa44);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    transition: width 0.5s ease;
}


/* Relationship System Styles */
.relationship-highlight {
    background: rgba(76, 175, 80, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    border: 2px solid #4CAF50;
}


.relationship-pair {
    background: #333;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #555;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}


.relationship-selector {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #555;
    padding: 8px;
    border-radius: 4px;
    min-width: 150px;
}


/* Character Portrait System */
.character-portrait {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #666;
    margin-bottom: 10px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 12px;
    text-align: center;
}

.character-portrait:hover {
    border-color: #ff4444;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

.character-portrait img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.portrait-upload-section {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px dashed #555;
}

.portrait-upload-section:hover {
    border-color: #ff4444;
    background: #333;
}

.portrait-options {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.portrait-option-btn {
    padding: 8px 12px;
    background: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.portrait-option-btn:hover {
    background: #555;
    border-color: #ff4444;
}

.portrait-option-btn.active {
    background: #ff4444;
    border-color: #ff6666;
}

.portrait-input {
    width: 100%;
    padding: 8px;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    margin-top: 5px;
}

.portrait-input:focus {
    border-color: #ff4444;
    outline: none;
}

.portrait-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background: #1a1a1a;
    border-radius: 4px;
}

.portrait-preview img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.portrait-controls {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.portrait-controls button {
    padding: 4px 8px;
    background: #555;
    color: #fff;
    border: 1px solid #666;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.portrait-controls button:hover {
    background: #666;
}

.portrait-error {
    color: #ff6666;
    font-size: 12px;
    margin-top: 5px;
}

/* Movie log character portraits */
.character-mini-portrait {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #666;
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
}

/* Save/Load Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Returnee Player Cards */
.player-card {
    position: relative;
    overflow: hidden;
}

.player-card.selectable:hover {
    border-color: #DC143C !important;
    transform: translateY(-2px);
}

.player-card.selected {
    border-color: #4CAF50 !important;
    background: rgba(76, 175, 80, 0.2) !important;
}

.player-card.selected::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #4CAF50;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.modal-content {
    background: #2a2a2a;
    border: 2px solid #555;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.3s ease;
}

.modal-header {
    background: #1a1a1a;
    padding: 15px 20px;
    border-bottom: 1px solid #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #fff;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #ff4444;
    border-radius: 50%;
}

.modal-body {
    padding: 20px;
    color: #fff;
}


/* Cast grid status portraits */
.cast-status-portrait {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #666;
    margin-bottom: 5px;
}

.cast-status-portrait.alive {
    border-color: #4CAF50;
}

.cast-status-portrait.dead {
    border-color: #f44336;
    filter: grayscale(100%) brightness(0.5);
}

.cast-status-portrait.killer {
    border-color: #ff9800;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
}

/* ========== TIER 1 PREMIUM UPGRADES ========== */

/* Enhanced Portrait System */
.character-portrait.dead img {
    filter: grayscale(100%) brightness(0.4);
}

.character-portrait.killer {
    border-color: #ff9800;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.4);
}

.character-portrait.champion {
    border-color: #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

/* Dynamic Player Choice System */
.choice-container {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 2px solid #ff4444;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    animation: choiceAppear 0.5s ease-out;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.2);
}

.choice-title {
    color: #ff4444;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
}

.choice-description {
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: center;
}

.choice-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-option {
    background: linear-gradient(135deg, #444, #333);
    border: 1px solid #666;
    border-radius: 8px;
    padding: 15px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.choice-option:hover {
    background: linear-gradient(135deg, #555, #444);
    border-color: #ff4444;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.choice-option:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #ff4444;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.choice-option:hover:before {
    transform: scaleY(1);
}

.choice-consequence {
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
    margin-top: 5px;
}

/* Enhanced Visual Interface */
.tension-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #666;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.tension-bar {
    width: 100px;
    height: 10px;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
}

.tension-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #ffeb3b, #ff5722);
    transition: width 0.3s ease;
}

/* Enhanced Character Status Display */
.character-status-enhanced {
    position: relative;
    padding: 15px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border-radius: 10px;
    margin: 10px;
    border: 1px solid #444;
    transition: all 0.3s ease;
}

.character-status-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: #ff4444;
}

.character-fear-level {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.fear-low { background: #4CAF50; color: white; }
.fear-medium { background: #ffeb3b; color: black; }
.fear-high { background: #ff5722; color: white; }

/* Enhanced Event Display */
.event-enhanced {
    position: relative;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #666;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.8), rgba(26, 26, 26, 0.8));
    transition: all 0.3s ease;
}

.event-enhanced.dialogue {
    border-left-color: #4CAF50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
}

.event-enhanced.death {
    border-left-color: #f44336;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(244, 67, 54, 0.05));
    animation: deathPulse 0.5s ease-out;
}

.event-enhanced.killer-action {
    border-left-color: #ff9800;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 152, 0, 0.05));
}

.event-enhanced.investigation {
    border-left-color: #2196f3;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.05));
}

/* Dynamic Soundtrack Visualizer */
.soundtrack-visualizer {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #666;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.visualizer-bars {
    display: flex;
    gap: 2px;
    align-items: end;
}

.visualizer-bar {
    width: 4px;
    background: linear-gradient(to top, #ff4444, #ffaa44);
    border-radius: 2px;
    transition: height 0.1s ease;
}

/* Animations */
@keyframes choiceAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes deathPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes tensionPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes portraitGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 68, 68, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 68, 68, 0.6); }
}

@media (max-width: 768px) {
    .cast-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .character-portrait {
        width: 60px;
        height: 60px;
    }

    /* Fixed logo positioning and overflow */
    .hub-logo-main {
        font-size: 2.2rem !important;
        letter-spacing: 1px !important;
        word-break: break-word;
        text-align: center;
        line-height: 1.2;
    }
    
    .hub-logo-subtitle {
        font-size: 1.2rem !important;
        text-align: center;
        word-break: break-word;
    }
    
    .logo-2e-main {
        font-size: 2.5rem !important;
        letter-spacing: 1px !important;
        word-break: break-word;
        text-align: center;
        line-height: 1.2;
    }
    
    .logo-2e-subtitle {
        font-size: 1.1rem !important;
        text-align: center;
        word-break: break-word;
    }

    /* Mobile-optimized audio controls - repositioned to avoid logo clash */
    .audio-controls {
        position: fixed;
        top: auto;
        bottom: 20px;
        right: 10px;
        left: auto;
        width: auto;
        max-width: calc(100vw - 20px);
        min-width: 180px;
        font-size: 14px;
        touch-action: pan-y;
        z-index: 9999;
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    }

    .audio-controls.minimized {
        min-width: 50px;
        padding: 6px 10px;
        bottom: 20px;
        right: 10px;
    }

    .audio-controls button {
        padding: 10px 14px;
        font-size: 14px;
        min-height: 44px; /* iOS touch target minimum */
        margin: 2px;
        touch-action: manipulation;
        border-radius: 6px;
    }

    .minimize-btn {
        padding: 8px 12px !important;
        font-size: 14px !important;
        min-height: 44px !important;
        min-width: 44px !important;
        touch-action: manipulation;
    }

    .volume-slider {
        height: 44px; /* Better touch target */
        margin: 8px 0;
    }

    .audio-title {
        font-size: 14px;
        user-select: none;
        -webkit-user-select: none;
    }

    .drag-indicator {
        font-size: 16px;
        cursor: grab;
        touch-action: none;
    }

    /* Better spacing for mobile - removed audio widget margin */
    .container {
        padding: 10px;
        margin-top: 10px;
        margin-bottom: 100px; /* Space for bottom audio controls */
    }

    .section {
        margin-bottom: 20px;
        padding: 15px;
    }

    /* Table horizontal scrolling fixes */
    .final-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        border: 1px solid #444;
        margin: 20px 0;
        position: relative;
    }
    
    .final-table-container::after {
        content: '← Swipe to see more →';
        position: absolute;
        bottom: 5px;
        right: 10px;
        background: rgba(255, 68, 68, 0.8);
        color: white;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: bold;
        opacity: 0.8;
        pointer-events: none;
        z-index: 10;
    }
    
    .final-table {
        min-width: 600px; /* Force table to be wider than mobile screen */
        width: 100%;
        white-space: nowrap;
    }
    
    .final-table th,
    .final-table td {
        min-width: 80px;
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .edgic-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        border: 1px solid #444;
        position: relative;
    }
    
    .edgic-table::after {
        content: '← Swipe to see more →';
        position: absolute;
        bottom: 5px;
        right: 10px;
        background: rgba(255, 68, 68, 0.8);
        color: white;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: bold;
        opacity: 0.8;
        pointer-events: none;
        z-index: 10;
    }
    
    .edgic-table .final-table {
        min-width: 700px;
    }

    /* Relationship table scrolling */
    #relationship-pairs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        position: relative;
    }
    
    #relationship-pairs::after {
        content: '← Swipe to navigate →';
        position: absolute;
        bottom: 15px;
        right: 10px;
        background: rgba(76, 175, 80, 0.8);
        color: white;
        padding: 3px 8px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: bold;
        opacity: 0.8;
        pointer-events: none;
        z-index: 10;
    }
    
    #relationship-pairs table {
        min-width: 500px;
        margin: 0 auto;
    }
    
    #relationship-pairs th,
    #relationship-pairs td {
        min-width: 40px;
        padding: 8px 4px;
        font-size: 14px;
    }

    /* Responsive game controls */
    .controls {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .controls button {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        min-height: 50px;
        touch-action: manipulation;
    }

    /* Modal improvements for mobile */
    .modal-content {
        width: 95%;
        max-width: 400px;
        margin: 5% auto;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Better text readability on mobile */
    .story-section p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 15px;
    }

    /* Character cards mobile optimization */
    .character-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .character-name {
        font-size: 18px;
    }

    .character-details {
        font-size: 14px;
        line-height: 1.5;
    }

    /* Improved touch targets */
    .btn {
        min-height: 48px;
        padding: 12px 20px;
        font-size: 16px;
        touch-action: manipulation;
        border-radius: 6px;
    }
    
    .btn-secondary {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 14px;
    }

    /* Better cast grid for mobile */
    .cast-container {
        gap: 15px;
    }
    
    .character-card input[type="text"],
    .character-card select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
        min-height: 44px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    /* Smaller logos for tiny screens */
    .hub-logo-main {
        font-size: 1.8rem !important;
        letter-spacing: 0.5px !important;
    }
    
    .hub-logo-subtitle {
        font-size: 1rem !important;
    }
    
    .logo-2e-main {
        font-size: 2rem !important;
        letter-spacing: 0.5px !important;
    }
    
    .logo-2e-subtitle {
        font-size: 0.9rem !important;
    }

    /* Compact audio controls */
    .audio-controls {
        bottom: 10px;
        right: 5px;
        min-width: 160px;
        font-size: 12px;
    }

    .audio-controls.minimized {
        min-width: 40px;
        padding: 4px 8px;
    }

    .audio-controls button {
        padding: 8px 10px;
        font-size: 12px;
        margin: 1px;
        min-height: 40px;
    }

    .minimize-btn {
        padding: 6px 10px !important;
        font-size: 12px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    .audio-title {
        font-size: 12px;
    }

    .drag-indicator {
        font-size: 14px;
    }

    .container {
        margin-top: 5px;
        padding: 5px;
        margin-bottom: 80px;
    }

    .controls button {
        padding: 12px;
        font-size: 14px;
        min-height: 44px;
    }

    .modal-content {
        width: 98%;
        margin: 2% auto;
        padding: 15px;
    }

    /* More compact tables */
    .final-table th,
    .final-table td {
        min-width: 60px;
        padding: 8px 4px;
        font-size: 12px;
    }
    
    #relationship-pairs th,
    #relationship-pairs td {
        min-width: 32px;
        padding: 6px 2px;
        font-size: 12px;
    }
    
    /* Smaller buttons */
    .btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .btn-secondary {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Vote reveal animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Relationship matrix styling */
.matrix-table {
    border-collapse: collapse;
    margin: 0 auto;
}

.matrix-name-cell {
    padding: 8px 12px;
    border: 1px solid #333;
    background: #2a2a2a;
    min-width: 120px;
}

.matrix-name-cell .counselor-portrait {
    flex-shrink: 0;
}

.matrix-name-cell .counselor-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.matrix-relationship-cell {
    width: 40px;
    height: 40px;
    padding: 4px;
    border: 1px solid #333;
    text-align: center;
    vertical-align: middle;
    background: #1a1a1a;
}

.matrix-self-cell {
    background: #333 !important;
    color: #666;
}

.matrix-relationship-cell:hover {
    background: #3a3a3a;
    cursor: pointer;
}

.relationship-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #ccc;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-emoji {
    font-size: 1.2em;
}

/* ========== ENHANCED CONFESSIONAL SYSTEM STYLES ========== */

.confessionals-section {
    margin: 30px 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 68, 68, 0.2);
}

.confessionals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.confessional-card {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(30, 30, 30, 0.95));
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.confessional-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 68, 68, 0.3);
}

.confessional-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.confessional-portrait {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 68, 68, 0.4);
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.confessional-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.confessional-info {
    flex: 1;
}

.confessional-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.confessional-type {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.confessional-content {
    color: #e0e0e0;
    font-size: 1rem;
    line-height: 1.6;
    font-style: italic;
    position: relative;
    padding: 0 10px;
}

.confessional-content::before {
    content: '"';
    position: absolute;
    left: -5px;
    top: -5px;
    font-size: 2rem;
    color: rgba(255, 68, 68, 0.5);
    font-family: serif;
}

.confessional-content::after {
    content: '"';
    position: absolute;
    right: -5px;
    bottom: -20px;
    font-size: 2rem;
    color: rgba(255, 68, 68, 0.5);
    font-family: serif;
}

/* Mobile responsive confessionals */
@media (max-width: 768px) {
    .confessionals-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .confessional-card {
        padding: 15px;
    }
    
    .confessional-header {
        gap: 10px;
    }
    
    .confessional-portrait {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .confessional-name {
        font-size: 1rem;
    }
    
    .confessional-type {
        font-size: 0.8rem;
    }
    
    .confessional-content {
        font-size: 0.9rem;
    }
}

/* ========== ADVANCED CHALLENGE SYSTEM STYLES ========== */

.advanced-challenge-container {
    margin: 20px 0;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.95), rgba(20, 20, 20, 0.95));
    border-radius: 15px;
    padding: 30px;
    border: 2px solid rgba(255, 68, 68, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.challenge-header {
    text-align: center;
    margin-bottom: 30px;
}

.challenge-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.challenge-difficulty {
    font-weight: bold;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
}

.challenge-reward {
    color: #4CAF50;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 15px;
    background: rgba(76, 175, 80, 0.1);
}

.challenge-description {
    color: #ccc;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-top: 15px;
}

.challenge-phases {
    margin: 30px 0;
}

.challenge-phase {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.phase-header h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.phase-description {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 20px;
    font-style: italic;
}

.phase-results {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    align-items: start;
}

.phase-standings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.performer-result {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.performer-result.winner {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.1);
}

.performer-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 68, 68, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
}

.performer-result.winner .performer-rank {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.performer-info {
    flex: 1;
}

.performer-name {
    font-weight: bold;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 5px;
}

.performer-score {
    font-size: 0.9rem;
    font-weight: 500;
}

.phase-commentary {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 8px;
    padding: 15px;
    color: #e0e0e0;
    font-style: italic;
    line-height: 1.5;
    align-self: start;
}

.challenge-final-results {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    border: 2px solid rgba(76, 175, 80, 0.5);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-top: 30px;
}

.final-winner {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4CAF50;
    margin: 15px 0;
}

.final-reward {
    color: #ccc;
    font-size: 1.1rem;
}

.standings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.standing-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.standing-card.immunity-winner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.5);
}

.standing-rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff4444;
    margin-bottom: 8px;
}

.standing-team, .standing-counselor {
    font-weight: bold;
    margin-bottom: 5px;
}

.standing-score {
    font-size: 0.9rem;
}

.individual-standings {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.individual-standing {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.individual-standing.immunity-winner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.5);
}

.standing-counselor {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.mini-portrait {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.mini-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.counselor-details {
    flex: 1;
}

.counselor-name {
    font-weight: bold;
    color: #fff;
    font-size: 0.95rem;
}

.counselor-archetype {
    color: #ccc;
    font-size: 0.8rem;
}

/* Mobile responsive challenges */
@media (max-width: 768px) {
    .advanced-challenge-container {
        padding: 20px;
        margin: 15px 0;
    }
    
    .challenge-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .phase-results {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .performer-result {
        padding: 12px;
        gap: 10px;
    }
    
    .standings-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .individual-standing {
        padding: 10px;
        gap: 10px;
    }
    
    .mini-portrait {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

/* ========== ENHANCED MOBILE IMPROVEMENTS ========== */

/* Touch-friendly buttons on mobile only */
@media (max-width: 768px) {
    /* Make all buttons larger for touch */
    button, .btn, .btn-primary, .btn-secondary {
        min-height: 44px !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
    }
    
    /* Improved character selection on mobile */
    .player-selection-screen {
        padding: 15px !important;
    }
    
    .player-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 15px 0 !important;
    }
    
    .player-card {
        width: 100% !important;
        max-width: 350px !important;
        margin: 0 auto !important;
        padding: 20px !important;
    }
    
    /* Mobile voting interface improvements */
    .voting-targets, .voting-targets-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .voting-target-card, .player-card {
        padding: 20px !important;
        min-height: 80px !important;
    }
    
    /* Stack horizontal layouts vertically */
    .episode-info, .challenge-section, .bloodfire-section {
        text-align: center !important;
    }
    
    /* Make tables mobile-friendly */
    table, .voting-history-table {
        font-size: 12px !important;
        overflow-x: auto !important;
        display: block !important;
        white-space: nowrap !important;
    }
    
    /* Improve form inputs */
    input, select, textarea {
        min-height: 44px !important;
        font-size: 16px !important;
        padding: 12px !important;
        border-radius: 8px !important;
    }
    
    /* Stack navigation items */
    .setup-nav, .episode-controls {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    /* Make text more readable */
    body {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }
    
    h1, h2, h3 {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }
    
    /* Reduce margins for more space */
    .section {
        margin-bottom: 20px !important;
        padding: 15px !important;
    }
    
    /* Mobile-friendly Discord widget */
    .discord-widget {
        bottom: 15px !important;
        right: 15px !important;
        padding: 10px 16px !important;
        font-size: 0.8rem !important;
    }
}

/* Tablet improvements (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .player-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    .voting-targets-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Make buttons slightly larger on tablet */
    button, .btn, .btn-primary, .btn-secondary {
        min-height: 40px !important;
        padding: 10px 18px !important;
    }
}

/* Ensure desktop experience remains unchanged */
@media (min-width: 1025px) {
    /* Desktop styles remain as they are */
    .player-selection-screen .player-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    }
}

/* Touch-specific improvements (any touch device) */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .player-card:hover, .voting-target-card:hover, button:hover {
        transform: none !important;
    }
    
    /* Add touch feedback */
    .player-card:active, .voting-target-card:active, button:active {
        transform: scale(0.95) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* Larger tap targets */
    .player-card, .voting-target-card {
        min-height: 60px !important;
    }
}

/* Landscape mobile phones */
@media (max-width: 768px) and (orientation: landscape) {
    .player-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        max-height: 60vh !important;
    }
    
    .episode-content {
        padding: 10px !important;
    }
    
    h1, h2 {
        font-size: 1.5rem !important;
    }
}

/* Custom slider styling to match purple theme - high priority overrides */
input[type="range"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    height: 6px !important;
    background: rgba(107, 70, 193, 0.2) !important;
    border-radius: 3px !important;
    outline: none !important;
    border: none !important;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    background: #6B46C1 !important;
    background-color: #6B46C1 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

input[type="range"]::-moz-range-thumb {
    width: 16px !important;
    height: 16px !important;
    background: #6B46C1 !important;
    background-color: #6B46C1 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    -moz-appearance: none !important;
}

input[type="range"]::-webkit-slider-track {
    background: rgba(107, 70, 193, 0.2) !important;
    background-color: rgba(107, 70, 193, 0.2) !important;
    height: 6px !important;
    border-radius: 3px !important;
    border: none !important;
}

input[type="range"]::-moz-range-track {
    background: rgba(107, 70, 193, 0.2) !important;
    background-color: rgba(107, 70, 193, 0.2) !important;
    height: 6px !important;
    border-radius: 3px !important;
    border: none !important;
}

input[type="range"]:hover::-webkit-slider-thumb {
    background: #8B5CF6 !important;
    background-color: #8B5CF6 !important;
    transform: scale(1.1) !important;
    transition: all 0.2s ease !important;
}

input[type="range"]:hover::-moz-range-thumb {
    background: #8B5CF6 !important;
    background-color: #8B5CF6 !important;
    transform: scale(1.1) !important;
    transition: all 0.2s ease !important;
}

/* Additional browser-specific overrides with maximum specificity */
input[type="range"]::-ms-track {
    background: transparent !important;
    border-color: transparent !important;
    color: transparent !important;
}

input[type="range"]::-ms-fill-lower {
    background: #6B46C1 !important;
}

input[type="range"]::-ms-fill-upper {
    background: rgba(107, 70, 193, 0.2) !important;
}

input[type="range"]::-ms-thumb {
    background: #6B46C1 !important;
    background-color: #6B46C1 !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    width: 16px !important;
    height: 16px !important;
}

/* Ultra-specific overrides for any remaining blue coloring */
.stat input[type="range"] {
    accent-color: #6B46C1 !important;
}

.stat input[type="range"]::-webkit-slider-thumb {
    background: #6B46C1 !important;
    background-color: #6B46C1 !important;
}

.stat input[type="range"]::-moz-range-thumb {
    background: #6B46C1 !important;
    background-color: #6B46C1 !important;
}

/* Clean number input styling - remove spinner arrows */
/* Hide the white spinner arrows (WebKit: Chrome/Safari/Edge/Opera) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Hide spinner (Firefox) */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Specific styling for cast card number inputs */
.stat input[type="number"] {
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: textfield;
  background: transparent;
  color: #6B46C1;
  border: 1px solid #6B46C1;
  border-radius: 3px;
  padding: 2px;
  text-align: center;
  font-weight: bold;
  font-size: 0.75rem;
  min-width: 25px;
  width: 25px;
}

/* Focus style for number inputs */
.stat input[type="number"]:focus {
  outline: 2px solid #6B46C1;
  outline-offset: 1px;
  border-color: #8B5CF6;
}

/* Range slider styling for stat controls */
.stat input[type="range"] {
  accent-color: #9370DB !important;
  height: 6px;
  background: rgba(147, 112, 219, 0.2);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.stat input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #9370DB;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #9370DB;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  border: none;
}

.stat input[type="text"] {
  flex-shrink: 0; /* Prevent input from shrinking */
}