:root {
    --primary-color: #00FFFF;
    --primary-glow: rgba(0, 255, 255, 0.4);
    --primary-bg: rgba(0, 255, 255, 0.05);
}

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

/* CALLSIGN SYSTEM - 7 CYBERPUNK CLASSES */
.callsign-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.callsign-modal-content {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.95), rgba(26, 31, 58, 0.95));
    border: 3px solid #00FFFF;
    border-radius: 15px;
    padding: 40px;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.4), inset 0 0 30px rgba(0, 255, 255, 0.1);
}

.callsign-header {
    text-align: center;
    margin-bottom: 40px;
}

.callsign-title {
    font-size: 2.5em;
    color: #00FFFF;
    text-shadow: 0 0 15px #00FFFF, 0 0 30px #00FFFF;
    margin-bottom: 10px;
    letter-spacing: 3px;
    font-weight: bold;
}

.callsign-subtitle {
    font-size: 1.1em;
    color: #00CCCC;
    letter-spacing: 2px;
}

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

.callsign-card {
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.callsign-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.callsign-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.callsign-card.locked:hover {
    transform: none;
}

.callsign-icon {
    font-size: 3em;
    text-align: center;
    filter: drop-shadow(0 0 15px currentColor);
}

.callsign-name {
    font-size: 1.5em;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 0 10px currentColor;
}

.callsign-ability {
    font-size: 0.9em;
    line-height: 1.5;
    color: #AAA;
}

.callsign-price {
    font-size: 0.85em;
    font-weight: bold;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid currentColor;
}

/* CALLSIGN COLOR STYLES - 7 Classes */
.callsign-rigger {
    border-color: #FF6600;
    color: #FF6600;
}

.callsign-bookie {
    border-color: #00FF00;
    color: #00FF00;
}

.callsign-mercenary {
    border-color: #9933FF;
    color: #9933FF;
}

.callsign-hacker {
    border-color: #00FFFF;
    color: #00FFFF;
}

.callsign-pyro {
    border-color: #FF3300;
    color: #FF3300;
}

.callsign-phantom {
    border-color: #FF00FF;
    color: #FF00FF;
}

.callsign-corpo {
    border-color: #FFD700;
    color: #FFD700;
}

.callsign-skip-btn {
    display: block;
    margin: 20px auto 0;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.05);
    color: #AAA;
    border: 2px solid #AAA;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.callsign-skip-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFF;
    border-color: #FFF;
}

/* SIGN IN / SIGN UP MODAL */
.signin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.signin-modal-content {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.98), rgba(26, 31, 58, 0.98));
    border: 3px solid #00FFFF;
    border-radius: 15px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.4);
}

.signin-title {
    text-align: center;
    font-size: 2em;
    color: #00FFFF;
    text-shadow: 0 0 15px #00FFFF;
    margin-bottom: 30px;
    letter-spacing: 3px;
}

.signin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.signin-tab {
    flex: 1;
    padding: 10px;
    background: rgba(0, 255, 255, 0.05);
    color: #00CCCC;
    border: 2px solid #00CCCC;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.signin-tab.active {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00FFFF;
    color: #00FFFF;
    text-shadow: 0 0 10px #00FFFF;
}

.signin-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.signin-form input {
    padding: 12px 15px;
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid #00CCCC;
    border-radius: 8px;
    color: #00FFFF;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    letter-spacing: 1px;
}

.signin-form input::placeholder {
    color: #00CCCC;
    opacity: 0.6;
}

.signin-form input:focus {
    outline: none;
    border-color: #00FFFF;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.signin-button {
    padding: 12px;
    background: linear-gradient(90deg, #00FFFF, #00CCCC);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.signin-button:hover {
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: scale(1.02);
}

/* ABILITIES FLASH NOTIFICATION */
.abilities-flash-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.95), rgba(0, 200, 255, 0.95));
    border: 3px solid #00FFFF;
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    z-index: 3000;
    box-shadow: 0 0 60px rgba(0, 255, 255, 0.6), inset 0 0 30px rgba(0, 255, 255, 0.2);
    animation: flash-pulse 0.5s ease-in-out;
}

@keyframes flash-pulse {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.abilities-flash-content h3 {
    color: #003366;
    font-size: 1.8em;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.abilities-flash-content p {
    color: #004488;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 25px;
}

.close-abilities-btn {
    padding: 12px 30px;
    background: #003366;
    color: #00FFFF;
    border: 2px solid #00FFFF;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.close-abilities-btn:hover {
    background: #004488;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

/* CALLSIGN DETAIL MODAL */
.callsign-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    backdrop-filter: blur(8px);
}

.callsign-detail-content {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.98), rgba(26, 31, 58, 0.98));
    border: 3px solid;
    border-radius: 15px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 60px rgba(0, 255, 255, 0.4);
}

.detail-callsign-name {
    font-size: 2.5em;
    margin-bottom: 20px;
    letter-spacing: 3px;
    text-shadow: 0 0 15px currentColor;
}

.detail-callsign-icon {
    font-size: 5em;
    margin: 20px 0;
    filter: drop-shadow(0 0 20px currentColor);
}

.detail-callsign-desc {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #AAA;
}

.detail-abilities {
    text-align: left;
    margin: 30px 0;
    padding: 20px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 10px;
    border: 2px solid currentColor;
}

.detail-abilities h3 {
    color: currentColor;
    font-size: 1.2em;
    margin-bottom: 15px;
    text-shadow: 0 0 10px currentColor;
}

.detail-ability {
    margin: 12px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    color: #FFF;
    font-size: 1em;
}

.detail-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.confirm-callsign-btn {
    flex: 2;
    padding: 15px;
    background: currentColor;
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.confirm-callsign-btn:hover {
    box-shadow: 0 0 25px currentColor;
    transform: scale(1.02);
}

.back-to-grid-btn {
    flex: 1;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    color: currentColor;
    border: 2px solid currentColor;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.back-to-grid-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

body {
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 100%);
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.beta-banner {
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: #ffffff;
    padding: 8px 0;
    margin-bottom: 10px;
}

.title-screen {
    text-align: center;
    padding: 40px 20px;
}

.game-title {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
    margin-bottom: 10px;
    letter-spacing: 8px;
}

.subtitle {
    font-size: 1.2rem;
    color: #00CCCC;
    margin-bottom: 60px;
    letter-spacing: 3px;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.scenario-card {
    position: relative;
    background: var(--primary-bg);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.scenario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px var(--primary-glow);
}

.scenario-card.locked {
    opacity: 0.5;
    border-color: #444;
}

.scenario-card.completed {
    border-color: #00FF88;
}

.scenario-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.scenario-info h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.scenario-description {
    font-size: 0.9rem;
    color: #99DDDD;
    line-height: 1.5;
    margin-bottom: 15px;
    font-style: italic;
}

.status-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
    position: relative;
    clip-path: polygon(4px 0%, 100% 0%, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0% 100%, 0% 4px);
    transition: all 0.3s ease;
}

.available-badge {
    background: 
        linear-gradient(135deg, rgba(0, 255, 255, 0.15) 0%, rgba(0, 255, 255, 0.08) 100%),
        repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(0, 255, 255, 0.03) 1px, rgba(0, 255, 255, 0.03) 2px);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.3),
        inset 0 0 8px rgba(0, 255, 255, 0.1);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.available-badge:hover {
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.5),
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 12px rgba(0, 255, 255, 0.2);
    transform: scale(1.05);
}

.completed-badge {
    background: 
        linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 255, 136, 0.08) 100%),
        repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(0, 255, 136, 0.03) 1px, rgba(0, 255, 136, 0.03) 2px);
    border: 2px solid #00FF88;
    color: #00FF88;
    box-shadow: 
        0 0 10px rgba(0, 255, 136, 0.3),
        inset 0 0 8px rgba(0, 255, 136, 0.1);
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

.completed-badge:hover {
    box-shadow: 
        0 0 15px rgba(0, 255, 136, 0.5),
        0 0 30px rgba(0, 255, 136, 0.3),
        inset 0 0 12px rgba(0, 255, 136, 0.2);
    transform: scale(1.05);
}

.locked-badge {
    background: 
        linear-gradient(135deg, rgba(100, 100, 100, 0.15) 0%, rgba(80, 80, 80, 0.08) 100%),
        repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(100, 100, 100, 0.03) 1px, rgba(100, 100, 100, 0.03) 2px);
    border: 2px solid #666;
    color: #888;
    box-shadow: 
        0 0 5px rgba(100, 100, 100, 0.2),
        inset 0 0 5px rgba(100, 100, 100, 0.05);
    text-shadow: 0 0 3px rgba(100, 100, 100, 0.3);
}

.scenario-preview-image {
    width: 100%;
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.scenario-preview-image:hover {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    transform: scale(1.02);
}

.preview-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

.scenario-card:hover .preview-img {
    transform: scale(1.05);
}

.play-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, #00CCCC 100%);
    color: #0a0e1a;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.play-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
}

.play-button.disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.reset-all-button {
    background: rgba(255, 0, 100, 0.2);
    color: #FF0066;
    border: 2px solid #FF0066;
    padding: 12px 40px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-all-button:hover {
    background: rgba(255, 0, 100, 0.4);
    box-shadow: 0 0 20px rgba(255, 0, 100, 0.5);
}

.game-container {
    max-width: 900px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.back-button, .reset-button {
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 25px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-button:hover, .reset-button:hover {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.story-container {
    background: rgba(0, 255, 255, 0.03);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 30px;
    min-height: 400px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

.story-text {
    color: #CCFFFF;
    font-size: 1.1rem;
    line-height: 1.8;
}

.story-text p {
    margin-bottom: 20px;
}

.chapter-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 10px var(--primary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.story-image-container {
    margin: 30px 0;
    text-align: center;
}

.story-image {
    margin: 20px 0;
    text-align: center;
    width: 100%;
}

.story-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5),
                0 0 60px rgba(0, 255, 255, 0.3),
                inset 0 0 20px rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.story-image img:hover {
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.7),
                0 0 80px rgba(0, 255, 255, 0.5),
                inset 0 0 30px rgba(0, 255, 255, 0.2);
    transform: scale(1.02);
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.choice-button {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(0, 204, 204, 0.1) 100%);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 20px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.choice-button:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 204, 204, 0.3) 100%);
    transform: translateX(10px);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
}

.ending-container {
    text-align: center;
    margin-top: 30px;
}

.ending-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, #00CCCC 100%);
    color: #0a0e1a;
    padding: 15px 50px;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
}

.ending-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.7);
}

@media (max-width: 768px) {
    /* Container & Layout */
    .container {
        padding: 10px;
    }
    
    .title-screen {
        padding: 20px 10px;
    }
    
    /* Title & Branding */
    .game-title {
        font-size: 2rem;
        letter-spacing: 3px;
        margin-bottom: 5px;
    }
    
    .subtitle {
        font-size: 0.85rem;
        letter-spacing: 1px;
        margin-bottom: 30px;
    }
    
    .beta-banner {
        font-size: 0.75rem;
        letter-spacing: 1px;
        padding: 6px 0;
    }
    
    /* Description */
    .game-description {
        font-size: 0.9rem;
        padding: 0 10px;
    }
    
    .game-description p {
        margin-bottom: 10px;
    }
    
    /* Stats Row */
    .stats-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 4px !important;
        margin-bottom: 15px !important;
        justify-content: center !important;
        position: relative !important;
        top: 5px !important;
    }
    
    .stat-badge {
        flex: 0 1 auto !important;
        min-width: auto !important;
        padding: 4px 6px !important;
        font-size: 0.6rem !important;
        white-space: nowrap !important;
    }
    
    .stat-icon {
        font-size: 0.7rem !important;
    }
    
    .stat-label {
        font-size: 0.5rem !important;
    }
    
    .stat-value {
        font-size: 0.65rem !important;
    }
    
    /* Guest Play Button */
    #guestPlayBtn {
        font-size: 1rem !important;
        padding: 12px !important;
        min-height: 50px !important;
    }
    
    /* Login Panel */
    .login-panel input {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .auth-button {
        font-size: 0.9rem;
        padding: 10px 15px;
        min-height: 44px;
    }
    
    /* Color Picker */
    .color-picker-container {
        background: rgba(0, 255, 255, 0.05);
        border: 1px solid rgba(0, 255, 255, 0.3);
        border-radius: 8px;
        padding: 12px;
        margin: 15px 0;
    }
    
    .color-picker-label {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    
    .color-name-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .color-name-btn {
        font-size: 0.7rem;
        padding: 6px 4px;
    }
    
    /* Scenario Grid */
    .scenario-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .scenario-card {
        padding: 15px;
    }
    
    .scenario-number {
        font-size: 2rem;
    }
    
    .scenario-info h3 {
        font-size: 1.1rem;
    }
    
    .scenario-description {
        font-size: 0.85rem;
    }
    
    .play-button {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    /* Medieval/Vex Trilogy Cards */
    .realm-title {
        font-size: 1.8rem;
    }
    
    .realm-subtitle {
        font-size: 0.9rem;
    }
    
    .medieval-card {
        padding: 15px;
    }
    
    .medieval-card-title {
        font-size: 1.1rem;
    }
    
    .medieval-card-description {
        font-size: 0.85rem;
    }
    
    /* Leaderboard */
    .leaderboard-title {
        font-size: 1.3rem;
    }
    
    .cycle-title {
        font-size: 0.95rem !important;
    }
    
    .cycle-countdown {
        font-size: 0.8rem !important;
    }
    
    .leaderboard-item {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    /* Music Button */
    .badass-music-button {
        min-width: auto;
        width: 90%;
        max-width: 300px;
        font-size: 0.9rem;
        padding: 12px 20px;
    }
    
    .volume-controls-badass {
        width: 90%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Continue Game */
    .continue-game-button {
        width: 95%;
        padding: 15px;
    }
    
    .continue-title {
        font-size: 1rem;
    }
    
    .continue-text {
        font-size: 0.85rem;
    }
    
    /* Achievement Showcase */
    .achievement-showcase-title {
        font-size: 1.2rem;
    }
    
    .achievement-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Hero Journey Modal */
    .hero-symbols {
        font-size: 2em !important;
        gap: 20px !important;
    }
    
    .honor-title {
        font-size: 1.4em !important;
    }
    
    .honor-message {
        font-size: 0.95em !important;
        padding: 0 10px;
    }
    
    .honor-message p {
        font-size: 0.9em !important;
    }
    
    /* Story Container */
    .story-container {
        padding: 15px;
    }
    
    .story-image img {
        max-width: 100%;
        width: 100%;
    }
    
    .story-text {
        font-size: 0.95rem;
    }
    
    .choices-container button {
        font-size: 0.9rem;
        padding: 12px;
    }
    
    /* Credits */
    .credits {
        font-size: 0.85rem;
    }
    
    .briannas-hope-link a {
        font-size: 1.1em !important;
    }
}

/* Badass Purple Music Button */
.badass-music-container {
    margin: 40px auto;
    max-width: 600px;
    text-align: center;
}

.badass-music-button {
    background: linear-gradient(135deg, #8B00FF 0%, #FF00FF 50%, #8B00FF 100%);
    border: 2px solid #FF00FF;
    color: #FFFFFF;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    padding: 15px 30px;
    border-radius: 10px;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.7), 0 0 60px rgba(139, 0, 255, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
}

.badass-music-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.badass-music-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(255, 0, 255, 1), 0 0 120px rgba(139, 0, 255, 0.8), inset 0 0 30px rgba(255, 255, 255, 0.3);
}

.badass-music-button.pulsing {
    animation: purplePulse 1.5s ease-in-out infinite;
}

@keyframes purplePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 40px rgba(255, 0, 255, 0.8), 0 0 80px rgba(139, 0, 255, 0.6);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 80px rgba(255, 0, 255, 1), 0 0 140px rgba(139, 0, 255, 0.9);
    }
}

.music-text {
    font-size: 1rem;
    text-shadow: 0 0 10px #FFFFFF, 0 0 20px #FF00FF;
    z-index: 1;
}

.music-icon-badass {
    font-size: 1.3rem;
    z-index: 1;
    filter: drop-shadow(0 0 8px #FFFFFF);
}

.volume-controls-badass {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.volume-slider-badass {
    width: 120px;
    height: 6px;
    background: linear-gradient(to right, #8B00FF, #FF00FF);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.4);
}

.volume-slider-badass::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #FFFFFF;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px #FF00FF, 0 0 18px #8B00FF;
}

.volume-slider-badass::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #FFFFFF;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px #FF00FF, 0 0 18px #8B00FF;
    border: none;
}

.volume-percent-badass {
    color: #FF00FF;
    font-size: 0.9rem;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    text-shadow: 0 0 8px #FF00FF;
}

@keyframes achievementGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.5), 0 0 40px rgba(0, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.8), 0 0 60px rgba(0, 255, 255, 0.5);
    }
}


.game-description {
    max-width: 800px;
    margin: 20px auto 40px;
    padding: 20px 30px;
    background: var(--primary-bg);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
}

.game-description p {
    color: var(--primary-color);
    font-size: 16px;
    line-height: 1.6;
    margin: 10px 0;
    text-align: center;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.game-description p:first-child {
    font-size: 18px;
    font-weight: 500;
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.continue-game-container {
    max-width: 600px;
    margin: 30px auto;
}

.continue-game-button {
    width: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 255, 255, 0.1) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.continue-game-button:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 255, 255, 0.15) 100%);
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-3px);
}

.continue-icon {
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.continue-info {
    text-align: left;
    flex: 1;
}

.continue-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
    text-shadow: 0 0 10px var(--primary-color);
}

.continue-text {
    font-size: 0.9rem;
    color: #99DDDD;
}

.save-button {
    background: linear-gradient(135deg, #00FFAA 0%, #00CC88 100%);
    color: #0a0e1a;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.save-button:hover {
    background: linear-gradient(135deg, #00FFCC 0%, #00DDAA 100%);
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.6);
    transform: translateY(-2px);
}

.save-notification {
    position: fixed;
    top: 100px;
    right: 30px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.95) 0%, rgba(0, 204, 102, 0.95) 100%);
    color: #0a0e1a;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.credits {
    color: #666;
    font-size: 0.9rem;
    margin: -10px 0 20px 0;
    letter-spacing: 1px;
    font-style: italic;
}

.auth-container {
    margin: 25px auto;
    max-width: 600px;
    padding: 0 15px;
}

.login-panel, .user-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: var(--primary-bg);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.login-prompt {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin: 0 0 10px 0;
    text-align: center;
    font-weight: bold;
    letter-spacing: 0.5px;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.4;
}

.login-panel > div {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}

.username-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    background: rgba(0, 20, 40, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.username-input:focus {
    box-shadow: 0 0 15px var(--primary-glow);
    border-color: var(--primary-color);
}

.username-input::placeholder {
    color: #666;
}

.auth-button {
    padding: 10px 25px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.auth-button:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px var(--primary-glow);
    transform: scale(1.05);
}

.username-display {
    color: var(--primary-color);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.logout-btn {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.achievement-showcase {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(0, 20, 40, 0.5);
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
}

.achievement-showcase-title {
    color: var(--primary-color);
    font-size: 1.3em;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 10px;
}

.achievement-item {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-item:hover {
    transform: scale(1.05);
    border-color: rgba(0, 255, 255, 0.8);
    box-shadow: 0 0 15px var(--primary-glow);
}

.achievement-item-badge {
    font-size: 2em;
    margin-bottom: 8px;
}

.achievement-item-name {
    color: var(--primary-color);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.achievement-item-rank {
    color: #FFD700;
    font-size: 0.85em;
    font-weight: bold;
}

.leaderboard-container {
    margin: 30px auto;
    max-width: 700px;
    background: var(--primary-bg);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.leaderboard-login-prompt {
    background: rgba(255, 200, 0, 0.1);
    border: 2px solid #FFC800;
    border-radius: 5px;
    padding: 12px 15px;
    margin-bottom: 20px;
    text-align: center;
}

.leaderboard-login-prompt p {
    color: #FFC800;
    font-size: 0.9rem;
    margin: 0;
    font-weight: bold;
    word-wrap: break-word;
    line-height: 1.4;
}

.full-leaderboard-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #00CCCC 100%);
    color: #0a0e1a;
    padding: 15px 35px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    letter-spacing: 1px;
}

.full-leaderboard-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
}

.leaderboard-title {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 1.5px;
    text-shadow: 0 0 15px var(--primary-color);
    word-wrap: break-word;
    line-height: 1.3;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(0, 20, 40, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(0, 20, 40, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.leaderboard-rank {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 35px;
    text-align: center;
    text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
    filter: drop-shadow(0 0 5px var(--primary-color));
}

.leaderboard-rank.gold {
    color: #FFFF00;
    text-shadow: 
        0 0 10px #FFFF00,
        0 0 20px #FFD700,
        0 0 30px #FFFF00,
        0 0 40px rgba(255, 255, 0, 0.5);
    filter: drop-shadow(0 0 8px #FFFF00) drop-shadow(0 0 15px #FFD700);
    animation: goldPulse 2s ease-in-out infinite;
}

@keyframes goldPulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px #FFFF00) drop-shadow(0 0 15px #FFD700);
    }
    50% {
        filter: drop-shadow(0 0 12px #FFFF00) drop-shadow(0 0 25px #FFD700);
    }
}

.leaderboard-rank.silver {
    color: #E0E0E0;
    text-shadow: 
        0 0 10px #E0E0E0,
        0 0 20px #C0C0C0,
        0 0 30px #E0E0E0,
        0 0 40px rgba(224, 224, 224, 0.5);
    filter: drop-shadow(0 0 8px #E0E0E0) drop-shadow(0 0 15px #C0C0C0);
    animation: silverPulse 2.5s ease-in-out infinite;
}

@keyframes silverPulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px #E0E0E0) drop-shadow(0 0 15px #C0C0C0);
    }
    50% {
        filter: drop-shadow(0 0 12px #E0E0E0) drop-shadow(0 0 25px #C0C0C0);
    }
}

.leaderboard-rank.bronze {
    color: #FF8C00;
    text-shadow: 
        0 0 10px #FF8C00,
        0 0 20px #CD7F32,
        0 0 30px #FF8C00,
        0 0 40px rgba(255, 140, 0, 0.5);
    filter: drop-shadow(0 0 8px #FF8C00) drop-shadow(0 0 15px #CD7F32);
    animation: bronzePulse 3s ease-in-out infinite;
}

@keyframes bronzePulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px #FF8C00) drop-shadow(0 0 15px #CD7F32);
    }
    50% {
        filter: drop-shadow(0 0 12px #FF8C00) drop-shadow(0 0 25px #CD7F32);
    }
}

.leaderboard-player {
    flex: 1;
    font-size: 0.75rem;
    color: var(--primary-color);
    letter-spacing: 0.3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 80px;
    margin: 0 8px;
}

.leaderboard-stats {
    display: flex;
    gap: 15px;
    font-size: 0.75rem;
    flex-shrink: 0;
    align-items: center;
}

.leaderboard-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.stat-label {
    color: #666;
    font-size: 0.55rem;
    text-transform: uppercase;
}

.stat-value {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem !important;
    line-height: 1.2;
}

.loading-text {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1e2a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(0, 255, 255, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 0 0 20px var(--primary-color);
    margin: 0;
}

.loading-message {
    color: #CCFFFF;
    font-size: 1.2rem;
    margin: 0;
    letter-spacing: 1px;
}

.loading-thanks {
    color: var(--primary-color);
    font-size: 1rem;
    margin: 10px 0 0 0;
    font-style: italic;
    opacity: 0.8;
}

.honor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
}

.honor-modal-content {
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1e2a 100%);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 40px;
    max-width: 600px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
    animation: honorGlow 2s ease-in-out infinite alternate;
}

@keyframes honorGlow {
    0% { box-shadow: 0 0 30px rgba(0, 255, 255, 0.3); }
    100% { box-shadow: 0 0 50px rgba(0, 255, 255, 0.7); }
}

.honor-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.honor-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px var(--primary-color));
}

.honor-title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 0 0 20px var(--primary-color);
    margin: 0;
}

.honor-message {
    color: #CCFFFF;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.honor-message p {
    margin: 15px 0;
}

.honor-surprise {
    color: #FFD700;
    font-weight: bold;
    text-shadow: 0 0 10px #FFD700;
    font-style: italic;
}

.honor-accept-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #00CCCC 100%);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.honor-accept-btn:hover {
    background: linear-gradient(135deg, #00CCCC 0%, #009999 100%);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    transform: scale(1.02);
}

.stats-row {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: 
        linear-gradient(135deg, rgba(0, 255, 255, 0.12) 0%, rgba(0, 255, 255, 0.05) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0, 255, 255, 0.05) 2px, rgba(0, 255, 255, 0.05) 4px);
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    padding: 5px 12px;
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.3),
        0 0 30px rgba(0, 255, 255, 0.2),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    clip-path: polygon(8px 0%, 100% 0%, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0% 100%, 0% 8px);
}

.stat-badge::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 255, 255, 0.2) 50%, transparent 70%);
    clip-path: polygon(8px 0%, 100% 0%, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0% 100%, 0% 8px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.stat-badge:hover {
    background: 
        linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 255, 255, 0.1) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0, 255, 255, 0.08) 2px, rgba(0, 255, 255, 0.08) 4px);
    box-shadow: 
        0 0 25px rgba(0, 255, 255, 0.5),
        0 0 50px rgba(0, 255, 255, 0.3),
        inset 0 0 15px rgba(0, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stat-badge:hover::before {
    opacity: 1;
}

.stat-badge.fail {
    border-color: #FF0055;
    background: 
        linear-gradient(135deg, rgba(255, 0, 85, 0.12) 0%, rgba(255, 0, 85, 0.05) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255, 0, 85, 0.05) 2px, rgba(255, 0, 85, 0.05) 4px);
    box-shadow: 
        0 0 15px rgba(255, 0, 85, 0.3),
        0 0 30px rgba(255, 0, 85, 0.2),
        inset 0 0 10px rgba(255, 0, 85, 0.1);
}

.stat-badge.fail:hover {
    background: 
        linear-gradient(135deg, rgba(255, 0, 85, 0.2) 0%, rgba(255, 0, 85, 0.1) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255, 0, 85, 0.08) 2px, rgba(255, 0, 85, 0.08) 4px);
    box-shadow: 
        0 0 25px rgba(255, 0, 85, 0.5),
        0 0 50px rgba(255, 0, 85, 0.3),
        inset 0 0 15px rgba(255, 0, 85, 0.2);
}

.stat-badge.victory {
    border-color: #FFFF00;
    background: 
        linear-gradient(135deg, rgba(255, 255, 0, 0.12) 0%, rgba(255, 215, 0, 0.05) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255, 255, 0, 0.05) 2px, rgba(255, 255, 0, 0.05) 4px);
    box-shadow: 
        0 0 15px rgba(255, 255, 0, 0.3),
        0 0 30px rgba(255, 215, 0, 0.2),
        inset 0 0 10px rgba(255, 255, 0, 0.1);
}

.stat-badge.victory:hover {
    background: 
        linear-gradient(135deg, rgba(255, 255, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255, 255, 0, 0.08) 2px, rgba(255, 255, 0, 0.08) 4px);
    box-shadow: 
        0 0 25px rgba(255, 255, 0, 0.5),
        0 0 50px rgba(255, 215, 0, 0.3),
        inset 0 0 15px rgba(255, 255, 0, 0.2);
}

.stat-icon {
    font-size: 0.9rem;
    filter: drop-shadow(0 0 8px var(--primary-color)) drop-shadow(0 0 15px var(--primary-color));
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px var(--primary-color)) drop-shadow(0 0 15px var(--primary-color));
    }
    50% {
        filter: drop-shadow(0 0 12px var(--primary-color)) drop-shadow(0 0 25px var(--primary-color));
    }
}

.stat-badge.fail .stat-icon {
    filter: drop-shadow(0 0 8px #FF0055) drop-shadow(0 0 15px #FF0055);
}

.stat-badge.victory .stat-icon {
    filter: drop-shadow(0 0 8px #FFFF00) drop-shadow(0 0 15px #FFD700);
}

.stat-label {
    color: var(--primary-color);
    font-size: 0.65rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.stat-badge.fail .stat-label {
    color: #FF3232;
}

.stat-badge.victory .stat-label {
    color: #FFD700;
}

.stat-value {
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 25px;
    text-align: center;
    text-shadow: 0 0 8px var(--primary-color);
}

.stat-badge.fail .stat-value {
    color: #FF3232;
    text-shadow: 0 0 8px #FF3232;
}

.stat-badge.victory .stat-value {
    color: #FFD700;
    text-shadow: 0 0 8px #FFD700;
}

.achievement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.achievement-modal-content {
    position: relative;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1e2a 100%);
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    padding: 40px 30px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
    animation: slideDown 0.5s ease;
}

.achievement-glow {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    animation: pulse 2s infinite;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes scaleIn {
    from { transform: scale(0.3); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

@keyframes slideDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.2);
    }
}

.achievement-modal-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin: 0 0 20px 0;
    text-shadow: 0 0 20px var(--primary-color);
    letter-spacing: 2px;
}

.achievement-rank-text {
    color: #FFD700;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 20px 0;
    text-shadow: 0 0 15px #FFD700;
}

.achievement-modal-message {
    color: #CCFFFF;
    font-size: 1.1rem;
    margin: 0 0 25px 0;
    line-height: 1.5;
}

.achievement-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.modal-username-input {
    width: 100%;
    padding: 12px 20px;
    background: rgba(0, 20, 40, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.modal-username-input:focus {
    box-shadow: 0 0 15px var(--primary-glow);
}

.modal-username-input::placeholder {
    color: #666;
}

.modal-login-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #00CCCC 100%);
    color: #0a0e1a;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.modal-login-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
}

.modal-skip-btn {
    background: transparent;
    color: #666;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s ease;
}

.modal-skip-btn:hover {
    color: var(--primary-color);
}

/* ===== BEYOND MIDDLE-EARTH MEDIEVAL STYLING ===== */
.realm-section {
    margin-top: 50px;
    padding: 30px 0;
    border-top: 2px solid rgba(139, 69, 19, 0.5);
}

.realm-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    color: #D4AF37;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.6), 0 0 40px rgba(139, 69, 19, 0.4);
    letter-spacing: 3px;
}

.realm-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: #8B4513;
    margin-bottom: 30px;
    font-family: serif;
    font-style: italic;
}

.medieval-card {
    background: linear-gradient(135deg, rgba(101, 67, 33, 0.3) 0%, rgba(139, 69, 19, 0.2) 100%);
    border: 2px solid #8B4513;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.medieval-card:hover {
    background: linear-gradient(135deg, rgba(101, 67, 33, 0.5) 0%, rgba(139, 69, 19, 0.4) 100%);
    border-color: #D4AF37;
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.medieval-card-title {
    color: #D4AF37;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.medieval-card-description {
    color: #C19A6B;
    font-size: 0.95rem;
    line-height: 1.5;
    font-family: Georgia, serif;
}

.fantasy-badge {
    display: inline-block;
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    color: #FFD700;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 10px;
    border: 1px solid #D4AF37;
}

/* ===== MEDIEVAL GAME THEME (SCENARIOS 11-15) ===== */
body.medieval-theme {
    background: linear-gradient(135deg, #0a0604 0%, #1a1008 50%, #0a0604 100%);
}

body.medieval-theme .container {
    background: rgba(101, 67, 33, 0.15);
}

body.medieval-theme .game-header,
body.medieval-theme .back-button,
body.medieval-theme .reset-button {
    border-color: #8B4513;
    color: #D4AF37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

body.medieval-theme .back-button:hover,
body.medieval-theme .reset-button:hover {
    background: rgba(139, 69, 19, 0.3);
    border-color: #D4AF37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

body.medieval-theme .story-text {
    border-color: #8B4513;
    background: rgba(101, 67, 33, 0.2);
}

body.medieval-theme .story-text h3 {
    color: #D4AF37;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

body.medieval-theme .story-text p {
    color: #C19A6B;
}

body.medieval-theme .choice-button {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.3) 0%, rgba(101, 67, 33, 0.2) 100%);
    border-color: #8B4513;
    color: #D4AF37;
}

body.medieval-theme .choice-button:hover {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.5) 0%, rgba(101, 67, 33, 0.4) 100%);
    border-color: #D4AF37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    color: #FFD700;
}

body.medieval-theme .ending-container {
    border-color: #8B4513;
    background: rgba(139, 69, 19, 0.2);
}

body.medieval-theme .ending-button {
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    border-color: #D4AF37;
    color: #FFD700;
}

body.medieval-theme .ending-button:hover {
    background: linear-gradient(135deg, #A0522D 0%, #8B4513 100%);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* Additional medieval overrides for story elements */
body.medieval-theme .story-container {
    border-color: #8B4513 !important;
    box-shadow: 0 0 30px rgba(139, 69, 19, 0.3) !important;
}

body.medieval-theme .story-text h3,
body.medieval-theme .story-text h2,
body.medieval-theme .story-text h1 {
    color: #D4AF37 !important;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.6) !important;
}

/* Make realm section more visible with divider */
.realm-section {
    margin-top: 80px !important;
    padding-top: 50px !important;
    border-top: 3px solid #8B4513 !important;
    position: relative;
}

.realm-section::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 20px;
    background: linear-gradient(90deg, transparent 0%, #8B4513 50%, transparent 100%);
}

/* Difficulty Modal */
.difficulty-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.difficulty-modal-content {
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 100%);
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    padding: 40px;
    max-width: 900px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
}

.difficulty-modal-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 20px var(--primary-color);
    letter-spacing: 4px;
}

.difficulty-modal-subtitle {
    text-align: center;
    color: #99DDDD;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.difficulty-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.difficulty-option {
    background: var(--primary-bg);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.difficulty-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px var(--primary-glow);
}

.difficulty-badge {
    font-size: 3rem;
    margin-bottom: 15px;
}

.gold-badge {
    filter: drop-shadow(0 0 10px #FFD700);
}

.silver-badge {
    filter: drop-shadow(0 0 10px #C0C0C0);
}

.bronze-badge {
    filter: drop-shadow(0 0 10px #CD7F32);
}

.difficulty-option h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.difficulty-desc {
    color: #99DDDD;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.points-breakdown {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.points-breakdown div {
    margin: 8px 0;
}

.points-value {
    color: #00FF88;
    font-weight: bold;
}

.points-penalty {
    color: #FF4444;
    font-weight: bold;
}

.difficulty-select-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #00CCCC 100%);
    color: #0a0e1a;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.difficulty-select-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

/* Honor Modal */
.honor-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}

.honor-modal-content {
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 100%);
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    padding: 50px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
}

.honor-modal-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-shadow: 0 0 20px var(--primary-color);
    letter-spacing: 3px;
}

.honor-message {
    font-size: 1.2rem;
    color: #99DDDD;
    margin-bottom: 20px;
    line-height: 1.8;
}

.honor-message .highlight {
    color: var(--primary-color);
    font-weight: bold;
    text-shadow: 0 0 10px var(--primary-color);
}

.honor-return {
    font-size: 1rem;
    color: #77BBBB;
    margin-bottom: 40px;
    font-style: italic;
}

.honor-accept-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #00CCCC 100%);
    color: #0a0e1a;
    padding: 15px 50px;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.honor-accept-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.7);
}

/* Point Notification */
.point-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: bold;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.point-notification.show {
    opacity: 1;
    animation: pointFloat 1.5s ease-out forwards;
}

.point-notification.positive {
    color: #00FF88;
    text-shadow: 0 0 30px #00FF88;
}

.point-notification.negative {
    color: #FF4444;
    text-shadow: 0 0 30px #FF4444;
}

@keyframes pointFloat {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    30% {
        transform: translate(-50%, -60%) scale(1.2);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -80%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -100%) scale(0.8);
        opacity: 0;
    }
}

/* Leaderboard position badges */
.leaderboard-rank-1 {
    color: #FFD700 !important;
    font-weight: bold;
    text-shadow: 0 0 10px #FFD700;
}

.leaderboard-rank-2 {
    color: #C0C0C0 !important;
    font-weight: bold;
    text-shadow: 0 0 10px #C0C0C0;
}

.leaderboard-rank-3 {
    color: #CD7F32 !important;
    font-weight: bold;
    text-shadow: 0 0 10px #CD7F32;
}

/* Cooldown Lock Badge */
.cooldown-lock-badge {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(255, 68, 68, 0.2);
    border: 2px solid #FF4444;
    border-radius: 8px;
    color: #FF4444;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 10px #FF4444;
    animation: lockPulse 2s infinite;
}

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

/* Mobile Responsive - Portrait Mode */
@media screen and (max-width: 768px) {
    .difficulty-modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
        padding: 20px 15px;
        margin: 10px;
        overflow-y: auto;
    }
    
    .difficulty-modal-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .difficulty-modal-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .difficulty-options {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .difficulty-option {
        width: 100%;
        padding: 15px;
    }
    
    .difficulty-badge {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .difficulty-option h3 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .difficulty-desc {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .points-breakdown {
        padding: 12px;
        margin-bottom: 15px;
        font-size: 0.85rem;
    }
    
    .difficulty-select-btn {
        padding: 15px 20px;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .honor-modal-content {
        width: 95%;
        max-width: 95vw;
        padding: 20px 15px;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .honor-modal-content .hero-symbols {
        font-size: 1.5em !important;
        gap: 12px !important;
        margin-bottom: 12px !important;
    }
    
    .honor-modal-title {
        font-size: 1.1rem !important;
        margin-bottom: 12px !important;
        letter-spacing: 1px !important;
    }
    
    .honor-message {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
    }
    
    .honor-message p {
        margin: 8px 0 !important;
        font-size: 0.85rem !important;
    }
    
    .honor-message div {
        font-size: 0.75rem !important;
        margin-top: 10px !important;
        gap: 10px !important;
    }
    
    .honor-accept-btn {
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
        min-height: 40px !important;
        margin-top: 12px !important;
        letter-spacing: 1px !important;
    }
}

.newbie-badge {
    margin-left: 8px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    font-size: 0.75em;
    font-weight: bold;
    border-radius: 12px;
    text-transform: lowercase;
    box-shadow: 0 2px 4px rgba(255, 105, 180, 0.3);
    animation: newbie-pulse 2s ease-in-out infinite;
}

@keyframes newbie-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Glowing Rank Colors */
.rank-gold {
    color: #FFD700 !important;
    text-shadow: 0 0 10px #FFD700, 0 0 20px #FFD700;
    font-weight: bold;
}

.glow-gold {
    animation: glow-gold 1.5s ease-in-out infinite;
}

@keyframes glow-gold {
    0%, 100% { 
        text-shadow: 0 0 10px #FFD700, 0 0 20px #FFD700, 0 0 30px #FFD700;
        filter: drop-shadow(0 0 10px #FFD700);
    }
    50% { 
        text-shadow: 0 0 20px #FFD700, 0 0 30px #FFD700, 0 0 40px #FFD700;
        filter: drop-shadow(0 0 15px #FFD700);
    }
}

.rank-silver {
    color: #C0C0C0 !important;
    text-shadow: 0 0 10px #C0C0C0, 0 0 20px #C0C0C0;
    font-weight: bold;
}

.glow-silver {
    animation: glow-silver 1.5s ease-in-out infinite;
}

@keyframes glow-silver {
    0%, 100% { 
        text-shadow: 0 0 10px #C0C0C0, 0 0 20px #C0C0C0, 0 0 30px #C0C0C0;
        filter: drop-shadow(0 0 10px #C0C0C0);
    }
    50% { 
        text-shadow: 0 0 20px #C0C0C0, 0 0 30px #C0C0C0, 0 0 40px #C0C0C0;
        filter: drop-shadow(0 0 15px #C0C0C0);
    }
}

.rank-bronze {
    color: #CD7F32 !important;
    text-shadow: 0 0 10px #CD7F32, 0 0 20px #CD7F32;
    font-weight: bold;
}

.glow-bronze {
    animation: glow-bronze 1.5s ease-in-out infinite;
}

@keyframes glow-bronze {
    0%, 100% { 
        text-shadow: 0 0 10px #CD7F32, 0 0 20px #CD7F32, 0 0 30px #CD7F32;
        filter: drop-shadow(0 0 10px #CD7F32);
    }
    50% { 
        text-shadow: 0 0 20px #CD7F32, 0 0 30px #CD7F32, 0 0 40px #CD7F32;
        filter: drop-shadow(0 0 15px #CD7F32);
    }
}

.rank-newbie {
    color: #ff69b4;
    font-weight: bold;
}

.rank-green {
    color: #00FF00;
    font-weight: bold;
}

.rank-purple {
    color: #9370DB;
    font-weight: bold;
}

/* Rank Flash Notification */
.rank-flash {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.95);
    padding: 40px 60px;
    border-radius: 20px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: all 0.5s ease;
}

.rank-flash.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-flash-content {
    font-size: 3em;
    font-weight: bold;
    text-align: center;
    line-height: 1.4;
}

.rank-flash.rank-gold .rank-flash-content {
    color: #FFD700;
    text-shadow: 0 0 20px #FFD700, 0 0 30px #FFD700, 0 0 40px #FFD700;
    animation: glow-gold 1s ease-in-out infinite;
}

.rank-flash.rank-silver .rank-flash-content {
    color: #C0C0C0;
    text-shadow: 0 0 20px #C0C0C0, 0 0 30px #C0C0C0, 0 0 40px #C0C0C0;
    animation: glow-silver 1s ease-in-out infinite;
}

.rank-flash.rank-bronze .rank-flash-content {
    color: #CD7F32;
    text-shadow: 0 0 20px #CD7F32, 0 0 30px #CD7F32, 0 0 40px #CD7F32;
    animation: glow-bronze 1s ease-in-out infinite;
}

.rank-flash.rank-newbie .rank-flash-content {
    color: #ff69b4;
    text-shadow: 0 0 20px #ff69b4;
}

.rank-flash.rank-green .rank-flash-content {
    color: #00FF00;
    text-shadow: 0 0 20px #00FF00;
}

.rank-flash.rank-purple .rank-flash-content {
    color: #9370DB;
    text-shadow: 0 0 20px #9370DB;
}

.rank-points {
    font-size: 0.5em;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

/* ========== CYBERPUNK COOLDOWN TIMER ========== */
.cooldown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.cooldown-timer {
    font-family: 'Courier New', monospace;
    font-size: 2.5em;
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    animation: timerPulse 1s ease-in-out infinite;
}

.cooldown-label {
    font-size: 0.9em;
    color: #FF3366;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 10px;
    font-weight: bold;
}

.cooldown-message {
    font-size: 0.85em;
    color: #888;
    text-align: center;
    max-width: 250px;
    line-height: 1.5;
}

@keyframes timerPulse {
    0%, 100% { 
        text-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 30px var(--primary-color), 0 0 60px var(--primary-color), 0 0 80px var(--primary-color);
        transform: scale(1.05);
    }
}

.scenario-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.scenario-card.locked:hover {
    transform: none;
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.3);
}

/* Color Picker Styles */
.color-picker-container {
    margin-top: 15px;
}

.color-picker-label {
    font-size: 0.9rem;
    color: #00CCCC;
    margin-bottom: 10px;
}

.color-name-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.color-name-btn {
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid currentColor;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-align: center;
    animation: pulse-color-btn 2s ease-in-out infinite;
}

.color-name-btn[data-color="#00FFFF"] {
    color: #00FFFF;
    text-shadow: 0 0 10px #00FFFF;
}

.color-name-btn[data-color="#FF00FF"] {
    color: #FF00FF;
    text-shadow: 0 0 10px #FF00FF;
}

.color-name-btn[data-color="#FFFF00"] {
    color: #FFFF00;
    text-shadow: 0 0 10px #FFFF00;
}

.color-name-btn[data-color="#00FF88"] {
    color: #00FF88;
    text-shadow: 0 0 10px #00FF88;
}

.color-name-btn[data-color="#FF0080"] {
    color: #FF0080;
    text-shadow: 0 0 10px #FF0080;
}

.color-name-btn[data-color="#BB00FF"] {
    color: #BB00FF;
    text-shadow: 0 0 10px #BB00FF;
}

.color-name-btn[data-color="#FF6600"] {
    color: #FF6600;
    text-shadow: 0 0 10px #FF6600;
}

.color-name-btn[data-color="#00DDFF"] {
    color: #00DDFF;
    text-shadow: 0 0 10px #00DDFF;
}

.color-name-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px currentColor;
}

.color-name-btn.selected {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 25px currentColor;
    animation: pulse-color-selected 1.5s ease-in-out infinite;
}

@keyframes pulse-color-btn {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.9;
    }
    50% { 
        transform: scale(1.02);
        opacity: 1;
    }
}

@keyframes pulse-color-selected {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 25px currentColor;
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 35px currentColor, 0 0 50px currentColor;
    }
}

/* Cooldown Overlay Styles */
.cooldown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.cooldown-content {
    text-align: center;
}

.cooldown-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: lock-pulse 2s infinite;
}

@keyframes lock-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.cooldown-message {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: bold;
}

.cooldown-timer {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
    animation: timer-glow 1.5s infinite;
}

@keyframes timer-glow {
    0%, 100% { text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color); }
    50% { text-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-color); }
}

.medieval-cooldown {
    background: rgba(0, 0, 0, 0.93);
}

.medieval-cooldown .cooldown-timer {
    color: #D4AF37;
    text-shadow: 0 0 10px #D4AF37, 0 0 20px #D4AF37;
}

.medieval-cooldown .cooldown-message {
    color: #D4AF37;
}

/* Guest Mode Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* Guest Play Button Hover Effect */
#guestPlayBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8), 0 0 60px rgba(0, 255, 255, 0.5), 0 0 90px rgba(0, 255, 255, 0.3) !important;
}

/* Hero's Journey Symbol Animation */
@keyframes symbolPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
        text-shadow: 0 0 10px var(--primary-glow);
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
        text-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-glow);
    }
}

.hero-symbol {
    display: inline-block;
    transition: all 0.3s ease;
}

.hero-symbol:hover {
    transform: scale(1.3) !important;
    filter: drop-shadow(0 0 10px var(--primary-color));
}

/* Enhanced NEON CYBERPUNK Hero Symbols - 8-Color Palette Style */
.hero-symbol {
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    filter: drop-shadow(0 0 10px var(--primary-color));
}

/* Sword - CYAN Electric Energy */
.cyber-sword {
    filter: 
        drop-shadow(0 0 20px #00FFFF) 
        drop-shadow(0 0 40px #00CCCC)
        drop-shadow(0 0 60px #00FFFF)
        drop-shadow(0 0 80px rgba(0, 255, 255, 0.5));
    animation: neonFlicker 3s infinite alternate;
}

/* Heart - MAGENTA/PINK Pulsing Energy Core */
.cyber-heart {
    filter: 
        drop-shadow(0 0 20px #FF00FF) 
        drop-shadow(0 0 40px #FF0088)
        drop-shadow(0 0 60px #FF00FF)
        drop-shadow(0 0 80px rgba(255, 0, 255, 0.5));
    animation: neonFlicker 3.5s infinite alternate;
}

/* Mind - GREEN Matrix Digital Glow */
.cyber-mind {
    filter: 
        drop-shadow(0 0 20px #00FF00) 
        drop-shadow(0 0 40px #00FF88)
        drop-shadow(0 0 60px #00FF00)
        drop-shadow(0 0 80px rgba(0, 255, 0, 0.5));
    animation: neonFlicker 4s infinite alternate;
}

/* Cross - YELLOW/GOLD Sacred Tech Light */
.cyber-cross {
    filter: 
        drop-shadow(0 0 20px #FFFF00) 
        drop-shadow(0 0 40px #FFD700)
        drop-shadow(0 0 60px #FFFF00)
        drop-shadow(0 0 80px rgba(255, 255, 0, 0.5));
    animation: neonFlicker 4.5s infinite alternate;
}

/* Neon Flicker Animation */
@keyframes neonFlicker {
    0%, 100% {
        opacity: 1;
    }
    25% {
        opacity: 0.85;
    }
    50% {
        opacity: 1;
    }
    75% {
        opacity: 0.9;
    }
}

/* Enhanced Pulse Animation with Intense Glow */
@keyframes symbolPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.35);
        opacity: 1;
    }
}

/* Hover Effect - SUPERCHARGED! */
.hero-symbol:hover {
    transform: scale(1.6) rotate(5deg) !important;
    animation: none !important;
    transition: all 0.2s ease;
}

.cyber-sword:hover {
    filter: 
        drop-shadow(0 0 30px #00FFFF) 
        drop-shadow(0 0 60px #00CCCC)
        drop-shadow(0 0 90px #00FFFF)
        drop-shadow(0 0 120px rgba(0, 255, 255, 0.8))
        brightness(1.4);
}

.cyber-heart:hover {
    filter: 
        drop-shadow(0 0 30px #FF00FF) 
        drop-shadow(0 0 60px #FF0088)
        drop-shadow(0 0 90px #FF00FF)
        drop-shadow(0 0 120px rgba(255, 0, 255, 0.8))
        brightness(1.4);
}

.cyber-mind:hover {
    filter: 
        drop-shadow(0 0 30px #00FF00) 
        drop-shadow(0 0 60px #00FF88)
        drop-shadow(0 0 90px #00FF00)
        drop-shadow(0 0 120px rgba(0, 255, 0, 0.8))
        brightness(1.4);
}

.cyber-cross:hover {
    filter: 
        drop-shadow(0 0 30px #FFFF00) 
        drop-shadow(0 0 60px #FFD700)
        drop-shadow(0 0 90px #FFFF00)
        drop-shadow(0 0 120px rgba(255, 255, 0, 0.8))
        brightness(1.4);
}

/* Add Circuit Pattern Background to Modal */
.honor-modal-content {
    background: 
        linear-gradient(135deg, rgba(10, 14, 26, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 255, 255, 0.03) 2px, rgba(0, 255, 255, 0.03) 4px),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 255, 0.03) 2px, rgba(0, 255, 255, 0.03) 4px);
    border: 2px solid var(--primary-color);
    box-shadow: 
        0 0 20px var(--primary-glow),
        0 0 40px var(--primary-glow),
        0 0 60px var(--primary-glow),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
}

/* Dev Update Banner Animation */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Flashing Pink Banner Animation */
@keyframes pinkFlash {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(255, 0, 255, 0.8), 0 0 40px rgba(255, 0, 255, 0.6);
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 30px rgba(255, 0, 255, 1), 0 0 60px rgba(255, 0, 255, 0.8);
    }
}

