/* ============================================
   PLAGUE WORLD INC - AAA Quality CSS
   Global Pandemic Simulator
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'GameFont';
    src: local('Segoe UI'), local('Arial'), local('Helvetica Neue');
}

:root {
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-panel: rgba(10, 10, 20, 0.95);
    --bg-card: rgba(20, 20, 35, 0.9);
    --red-primary: #e63946;
    --red-dark: #9b1d25;
    --red-glow: rgba(230, 57, 70, 0.5);
    --orange-primary: #f4a261;
    --orange-glow: rgba(244, 162, 97, 0.5);
    --green-primary: #2a9d8f;
    --green-glow: rgba(42, 157, 143, 0.5);
    --blue-primary: #457b9d;
    --blue-cure: #4cc9f0;
    --blue-glow: rgba(76, 201, 240, 0.5);
    --yellow-primary: #e9c46a;
    --purple-primary: #7b2cbf;
    --text-primary: #edf2f4;
    --text-secondary: #8d99ae;
    --text-dim: #555e6e;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(230, 57, 70, 0.3);
    --shadow-heavy: 0 10px 40px rgba(0, 0, 0, 0.8);
    --shadow-glow-red: 0 0 30px rgba(230, 57, 70, 0.3);
    --shadow-glow-blue: 0 0 30px rgba(76, 201, 240, 0.3);
    --transition-fast: 0.15s ease;
    --transition-med: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
}

/* === SCREENS === */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 1;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === BACKGROUND OVERLAY === */
.menu-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(139, 0, 0, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(100, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(80, 0, 0, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #080810 0%, #0d0d18 50%, #0a0a12 100%);
    z-index: -1;
}

.menu-bg-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.08) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 30%, rgba(255,255,255,0.06) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 70%, rgba(255,255,255,0.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 40%, rgba(255,255,255,0.08) 0%, transparent 100%);
    animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* === MAIN MENU === */
.menu-container {
    text-align: center;
    z-index: 2;
    animation: fadeInUp 0.8s ease;
}

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

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

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

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

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

@keyframes pulseSlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(230, 57, 70, 0.3); }
    50% { box-shadow: 0 0 25px rgba(230, 57, 70, 0.6); }
}

@keyframes rotateGlow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes tickerScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

@keyframes bubbleFloat {
    0% { transform: scale(0) translateY(0); opacity: 0; }
    20% { transform: scale(1) translateY(-5px); opacity: 1; }
    80% { transform: scale(1) translateY(-15px); opacity: 1; }
    100% { transform: scale(0.5) translateY(-25px); opacity: 0; }
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(3); opacity: 0; }
}

@keyframes scanline {
    0% { top: -5%; }
    100% { top: 105%; }
}

.game-title {
    margin-bottom: 50px;
}

.biohazard-icon {
    font-size: 80px;
    color: var(--red-primary);
    text-shadow: 0 0 40px var(--red-glow), 0 0 80px rgba(230, 57, 70, 0.2);
    animation: float 3s ease-in-out infinite;
    margin-bottom: 15px;
}

.game-title h1 {
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 900;
    letter-spacing: clamp(4px, 0.8vw, 12px);
    color: var(--text-primary);
    text-shadow: 
        0 0 20px var(--red-glow),
        0 2px 4px rgba(0,0,0,0.8);
    line-height: 1;
    margin-bottom: 10px;
}

.game-title .subtitle {
    font-size: 16px;
    letter-spacing: 8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 300;
}

/* === MENU BUTTONS === */
.menu-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 300px;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(230, 57, 70, 0.05));
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-med);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

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

.menu-btn:hover {
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.3), rgba(230, 57, 70, 0.1));
    border-color: rgba(230, 57, 70, 0.6);
    box-shadow: var(--shadow-glow-red);
    transform: translateY(-2px);
}

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

.menu-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 15px rgba(230, 57, 70, 0.2);
}

.exit-btn {
    background: linear-gradient(135deg, rgba(100, 30, 30, 0.2), rgba(80, 20, 20, 0.1));
    border-color: rgba(150, 50, 50, 0.3);
}

.exit-btn:hover {
    background: linear-gradient(135deg, rgba(150, 30, 30, 0.4), rgba(100, 20, 20, 0.2));
    border-color: rgba(200, 50, 50, 0.6);
}

.back-btn {
    margin-top: 20px;
    width: 250px;
    font-size: 14px;
    background: linear-gradient(135deg, rgba(100, 100, 120, 0.15), rgba(80, 80, 100, 0.05));
    border-color: rgba(150, 150, 170, 0.2);
}

.back-btn:hover {
    background: linear-gradient(135deg, rgba(100, 100, 120, 0.3), rgba(80, 80, 100, 0.15));
    border-color: rgba(150, 150, 170, 0.5);
    box-shadow: 0 0 20px rgba(150, 150, 170, 0.2);
}

.btn-icon {
    font-size: 18px;
}

.menu-footer {
    color: var(--text-dim);
    font-size: 12px;
    letter-spacing: 2px;
}

/* === DISEASE SELECTION === */
.select-container {
    z-index: 2;
    text-align: center;
    padding: 20px;
    max-height: 100vh;
    overflow-y: auto;
    animation: fadeIn 0.5s ease;
}

.screen-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 6px;
    color: var(--text-primary);
    text-shadow: 0 0 20px var(--red-glow);
    margin-bottom: 10px;
}

.screen-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    letter-spacing: 2px;
}

.disease-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 800px;
    margin: 30px auto;
}

.disease-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px 16px;
    cursor: pointer;
    transition: all var(--transition-med);
    position: relative;
    overflow: hidden;
}

.disease-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
    opacity: 0;
    transition: opacity var(--transition-med);
}

.disease-card:hover {
    border-color: var(--red-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow-red);
    background: rgba(230, 57, 70, 0.08);
}

.disease-card:hover::after {
    opacity: 1;
}

.disease-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.disease-card h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 8px;
    color: var(--red-primary);
}

.disease-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.difficulty {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.stars {
    color: var(--yellow-primary);
}

/* === NAME PLAGUE === */
.name-container {
    z-index: 2;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.name-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

#plague-name-input {
    width: 400px;
    padding: 16px 24px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
    text-align: center;
    color: var(--red-primary);
    background: rgba(10, 10, 20, 0.8);
    border: 2px solid rgba(230, 57, 70, 0.3);
    border-radius: 4px;
    outline: none;
    transition: all var(--transition-med);
    font-family: inherit;
    text-transform: uppercase;
}

#plague-name-input:focus {
    border-color: var(--red-primary);
    box-shadow: var(--shadow-glow-red);
}

#plague-name-input::placeholder {
    color: var(--text-dim);
    text-transform: none;
    font-weight: 400;
}

/* === COUNTRY SELECTION === */
.country-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 900px;
    margin: 20px auto;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.country-grid::-webkit-scrollbar {
    width: 6px;
}

.country-grid::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
}

.country-grid::-webkit-scrollbar-thumb {
    background: var(--red-dark);
    border-radius: 3px;
}

.country-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all var(--transition-med);
    text-align: left;
}

.country-card:hover {
    border-color: var(--red-primary);
    background: rgba(230, 57, 70, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.2);
}

.country-card h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.country-card .country-info {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.country-card .country-flag {
    font-size: 20px;
    margin-bottom: 4px;
}

/* === HOW TO PLAY & CREDITS === */
.info-container {
    z-index: 2;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    animation: fadeIn 0.5s ease;
}

.info-container::-webkit-scrollbar {
    width: 6px;
}

.info-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
}

.info-container::-webkit-scrollbar-thumb {
    background: var(--red-dark);
    border-radius: 3px;
}

.info-content {
    text-align: left;
    margin: 30px 0;
}

.info-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 14px;
}

.info-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--red-primary);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.info-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 6px;
}

/* === CREDITS === */
.credits-container {
    text-align: center;
}

.credits-content {
    margin: 30px 0;
}

.credit-logo {
    font-size: 60px;
    color: var(--red-primary);
    text-shadow: 0 0 30px var(--red-glow);
    margin-bottom: 10px;
}

.credits-content h3 {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 6px;
    margin-bottom: 5px;
}

.credit-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.credit-divider {
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
    margin: 25px auto;
}

.credit-section {
    margin-bottom: 20px;
}

.credit-section h4 {
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 3px;
    margin-bottom: 6px;
}

.credit-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--orange-primary);
}

.credit-thanks {
    font-size: 16px;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 5px;
}

.credit-version {
    font-size: 12px;
    color: var(--text-dim);
}

/* === GAME SCREEN === */
#game-screen {
    flex-direction: column;
    background: var(--bg-darker);
}

#game-screen.active {
    display: flex;
}

/* === TOP HUD === */
.game-hud-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: linear-gradient(180deg, rgba(10, 10, 20, 0.98), rgba(10, 10, 20, 0.9));
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
    min-height: 50px;
}

.hud-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.plague-name-display {
    font-size: 18px;
    font-weight: 800;
    color: var(--red-primary);
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--red-glow);
}

.plague-type-display {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 2px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
}

.hud-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.date-display {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.speed-controls {
    display: flex;
    gap: 4px;
}

.speed-btn {
    padding: 3px 10px;
    font-size: 10px;
    color: var(--text-dim);
    background: rgba(30, 30, 45, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    letter-spacing: -2px;
}

.speed-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.speed-btn.active {
    background: rgba(230, 57, 70, 0.2);
    border-color: var(--red-primary);
    color: var(--red-primary);
}

.hud-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dna-points {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 800;
    color: var(--orange-primary);
    text-shadow: 0 0 10px var(--orange-glow);
    padding: 4px 12px;
    background: rgba(244, 162, 97, 0.08);
    border: 1px solid rgba(244, 162, 97, 0.2);
    border-radius: 4px;
}

.dna-icon {
    font-size: 20px;
}

.hud-btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
    color: var(--text-secondary);
    background: rgba(30, 30, 45, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.hud-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: rgba(50, 50, 65, 0.8);
}

/* === MAP CONTAINER === */
.map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: 
        radial-gradient(ellipse at center, #4ab2d8 0%, #1f88b7 52%, #0f567f 100%);
}

#world-map {
    width: 100%;
    height: 100%;
    display: block;
}

/* === SVG MAP STYLES === */
.map-base-image {
    opacity: 1;
    filter: saturate(1.1) contrast(1.03) brightness(1.12);
}

.map-atmosphere {
    fill: rgba(35, 148, 190, 0.025);
}

.country-node {
    transition: opacity 0.2s ease;
}

.country-fill {
    fill: #7a1019;
    fill-opacity: 0;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-opacity: 0.08;
    stroke-width: 1.1;
    stroke-linejoin: round;
    transition: fill 0.35s ease, fill-opacity 0.35s ease, stroke 0.35s ease, stroke-opacity 0.35s ease, filter 0.35s ease;
    filter: drop-shadow(0 0 0 rgba(230, 57, 70, 0));
    pointer-events: none;
}

.country-dot-fill {
    display: none;
    pointer-events: none;
}

.country-beads {
    pointer-events: none;
}

.country-bead {
    fill: #6d0d12;
    opacity: 0;
    transition: opacity 0.24s ease, fill 0.3s ease, filter 0.3s ease, r 0.28s ease;
    filter: drop-shadow(0 0 4px rgba(109, 13, 18, 0.34));
}

.country-hit-area,
.country-hitbox {
    cursor: pointer;
}

.country-hit-area {
    fill: rgba(255, 255, 255, 0.001);
    stroke: rgba(255, 255, 255, 0);
    stroke-width: 1.2;
}

.country-hitbox {
    fill: rgba(255, 255, 255, 0.001);
    stroke: none;
}

.country-ring {
    fill: none;
    stroke: rgba(255, 210, 210, 0.22);
    stroke-width: 1.4;
    transition: stroke 0.35s ease, opacity 0.35s ease, transform 0.2s ease;
    opacity: 0.18;
    transform-box: fill-box;
    transform-origin: center;
}

.country-path {
    fill: rgba(255, 241, 241, 0.82);
    stroke: rgba(55, 8, 13, 0.9);
    stroke-width: 1.25;
    transition: fill 0.35s ease, stroke 0.35s ease, opacity 0.35s ease, filter 0.35s ease, transform 0.2s ease;
    filter: drop-shadow(0 0 6px rgba(255, 80, 80, 0.12));
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0.14;
}

.country-marker {
    transition: fill 0.35s ease, stroke 0.35s ease, opacity 0.35s ease, filter 0.35s ease, transform 0.2s ease;
}

.country-node:hover .country-fill {
    stroke: rgba(255, 235, 235, 0.32);
    stroke-opacity: 0.35;
    filter: drop-shadow(0 0 10px rgba(255, 120, 120, 0.25));
}

.country-node:hover .country-ring {
    stroke: rgba(255, 235, 235, 0.55);
    opacity: 1;
    transform: scale(1.08);
}

.country-node:hover .country-path {
    filter: brightness(1.08) drop-shadow(0 0 10px rgba(255, 180, 180, 0.3));
    transform: scale(1.08);
}

.country-fill.infected-low {
    fill: #611116;
    filter: drop-shadow(0 0 8px rgba(97, 17, 22, 0.28));
}

.country-bead.infected-low {
    fill: #6f0c14;
    filter: drop-shadow(0 0 5px rgba(111, 12, 20, 0.42));
}

.country-path.infected-low {
    fill: #7a1118;
    filter: drop-shadow(0 0 8px rgba(122, 17, 24, 0.38));
}

.country-ring.infected-low {
    stroke: rgba(122, 17, 24, 0.62);
}

.country-fill.infected-med {
    fill: #781018;
    filter: drop-shadow(0 0 10px rgba(120, 16, 24, 0.34));
}

.country-bead.infected-med {
    fill: #811019;
    filter: drop-shadow(0 0 6px rgba(129, 16, 25, 0.48));
}

.country-path.infected-med {
    fill: #931019;
    filter: drop-shadow(0 0 10px rgba(147, 16, 25, 0.46));
}

.country-ring.infected-med {
    stroke: rgba(147, 16, 25, 0.72);
}

.country-fill.infected-high {
    fill: #8b0b14;
    filter: drop-shadow(0 0 12px rgba(139, 11, 20, 0.42));
}

.country-bead.infected-high {
    fill: #930d16;
    filter: drop-shadow(0 0 7px rgba(147, 13, 22, 0.54));
}

.country-path.infected-high {
    fill: #ab0c17;
    filter: drop-shadow(0 0 12px rgba(171, 12, 23, 0.58));
}

.country-ring.infected-high {
    stroke: rgba(171, 12, 23, 0.78);
}

.country-fill.infected-full {
    fill: #a20b14;
    filter: drop-shadow(0 0 14px rgba(162, 11, 20, 0.46));
}

.country-bead.infected-full {
    fill: #ab0b14;
    filter: drop-shadow(0 0 8px rgba(171, 11, 20, 0.58));
}

.country-path.infected-full {
    fill: #c80a15;
    animation: pulseSlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 14px rgba(200, 10, 21, 0.62));
}

.country-ring.infected-full {
    stroke: rgba(200, 10, 21, 0.86);
    animation: pulseSlow 2s ease-in-out infinite;
}

.country-fill.dead-full {
    fill: #230608;
    filter: drop-shadow(0 0 10px rgba(35, 6, 8, 0.45));
}

.country-bead.dead-full {
    fill: #660000;
    filter: drop-shadow(0 0 12px rgba(102, 0, 0, 0.8));
    animation: pulseSlow 3s ease-in-out infinite;
}

.country-bead.dead-full:hover {
    fill: #770000;
    filter: drop-shadow(0 0 16px rgba(119, 0, 0, 0.9));
}

.country-path.dead-full {
    fill: #2a0a0a;
    stroke: rgba(15, 2, 2, 0.95);
    filter: drop-shadow(0 0 8px rgba(42, 10, 10, 0.5));
}

.country-ring.dead-full {
    stroke: rgba(75, 14, 14, 0.8);
}

/* Infection spread animation */
.infection-ripple {
    fill: none;
    stroke: rgba(230, 57, 70, 0.6);
    stroke-width: 1;
    animation: ripple 2s ease-out forwards;
}

#transport-routes,
#map-effects,
.transport-line,
.transport-dot,
.infection-ripple {
    pointer-events: none;
}

/* === DNA BUBBLES === */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.dna-bubble {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffb347, #e8890c);
    border: 2px solid rgba(255, 200, 100, 0.6);
    cursor: pointer;
    pointer-events: auto;
    animation: bubbleFloat 5s ease-in-out forwards;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 0 12px rgba(255, 180, 70, 0.5), inset 0 -2px 4px rgba(0,0,0,0.2);
    z-index: 6;
}

.dna-bubble:hover {
    transform: scale(1.3) !important;
    box-shadow: 0 0 20px rgba(255, 180, 70, 0.8);
}

.dna-bubble.blue-bubble {
    background: radial-gradient(circle at 35% 35%, #64b5f6, #1976d2);
    border-color: rgba(100, 180, 255, 0.6);
    box-shadow: 0 0 12px rgba(100, 180, 255, 0.5), inset 0 -2px 4px rgba(0,0,0,0.2);
}

.dna-bubble.red-bubble {
    background: radial-gradient(circle at 35% 35%, #ef5350, #c62828);
    border-color: rgba(239, 83, 80, 0.6);
    box-shadow: 0 0 12px rgba(239, 83, 80, 0.5), inset 0 -2px 4px rgba(0,0,0,0.2);
}

/* === NEWS TICKER === */
.news-ticker {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 15, 0.85);
    border-top: 1px solid var(--border-color);
    padding: 6px 0;
    overflow: hidden;
    z-index: 8;
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: tickerScroll 30s linear infinite;
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.ticker-content span {
    margin-right: 60px;
}

/* === BOTTOM HUD === */
.game-hud-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(0deg, rgba(10, 10, 20, 0.98), rgba(10, 10, 20, 0.9));
    border-top: 1px solid var(--border-color);
    z-index: 10;
    min-height: 60px;
}

.stats-bar {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
}

.infected-color { color: var(--orange-primary); text-shadow: 0 0 8px var(--orange-glow); }
.dead-color { color: var(--red-primary); text-shadow: 0 0 8px var(--red-glow); }
.healthy-color { color: var(--green-primary); text-shadow: 0 0 8px var(--green-glow); }

.cure-stat {
    min-width: 180px;
}

.cure-bar-wrapper {
    position: relative;
    width: 100%;
    height: 18px;
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(76, 201, 240, 0.2);
    border-radius: 9px;
    overflow: hidden;
}

.cure-bar {
    height: 100%;
    background: linear-gradient(90deg, #1976d2, var(--blue-cure));
    border-radius: 9px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--blue-glow);
}

.cure-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* === EVOLUTION BUTTONS === */
.evolution-buttons {
    display: flex;
    gap: 8px;
}

.evo-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-primary);
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-med);
    font-family: inherit;
    min-width: 90px;
}

.evo-icon {
    font-size: 22px;
}

.transmission-btn:hover {
    border-color: var(--green-primary);
    background: rgba(42, 157, 143, 0.15);
    box-shadow: 0 0 15px rgba(42, 157, 143, 0.3);
}

.symptoms-btn:hover {
    border-color: var(--red-primary);
    background: rgba(230, 57, 70, 0.15);
    box-shadow: 0 0 15px rgba(230, 57, 70, 0.3);
}

.abilities-btn:hover {
    border-color: var(--blue-cure);
    background: rgba(76, 201, 240, 0.15);
    box-shadow: 0 0 15px rgba(76, 201, 240, 0.3);
}

.world-btn:hover {
    border-color: var(--yellow-primary);
    background: rgba(233, 196, 106, 0.15);
    box-shadow: 0 0 15px rgba(233, 196, 106, 0.3);
}

/* === EVOLUTION PANEL === */
.evolution-panel {
    position: absolute;
    right: -420px;
    top: 50px;
    width: 400px;
    height: calc(100% - 120px);
    background: var(--bg-panel);
    border-left: 1px solid var(--border-color);
    z-index: 20;
    transition: right var(--transition-med);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0,0,0,0.5);
}

.evolution-panel.open {
    right: 0;
}

.evo-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.evo-panel-header h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-primary);
}

.close-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--red-primary);
    border-color: var(--red-primary);
}

.close-btn.small {
    width: 24px;
    height: 24px;
    font-size: 12px;
}

.evo-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.evo-panel-content::-webkit-scrollbar {
    width: 6px;
}

.evo-panel-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
}

.evo-panel-content::-webkit-scrollbar-thumb {
    background: var(--red-dark);
    border-radius: 3px;
}

.evo-item {
    background: rgba(20, 25, 40, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all var(--transition-med);
}

.evo-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(30, 35, 55, 0.9);
}

.evo-item.purchased {
    border-color: rgba(42, 157, 143, 0.4);
    background: rgba(42, 157, 143, 0.08);
}

.evo-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.evo-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.evo-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.evo-item-cost {
    font-size: 13px;
    font-weight: 700;
    color: var(--orange-primary);
}

.evo-item-cost.free {
    color: var(--green-primary);
}

.evo-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.evo-item-effects {
    margin-top: 6px;
    font-size: 11px;
    color: var(--green-primary);
}

.evo-item-refund {
    color: #8ecae6;
}

.evo-item-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.evo-action-btn {
    border: 1px solid rgba(76, 201, 240, 0.35);
    background: rgba(76, 201, 240, 0.12);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.evo-action-btn:hover {
    background: rgba(76, 201, 240, 0.2);
    border-color: rgba(76, 201, 240, 0.55);
}

/* === WORLD DATA PANEL === */
.world-panel {
    position: absolute;
    left: -450px;
    top: 50px;
    width: 430px;
    height: calc(100% - 120px);
    background: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    z-index: 20;
    transition: left var(--transition-med);
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 30px rgba(0,0,0,0.5);
}

.world-panel.open {
    left: 0;
}

.world-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.world-panel-content::-webkit-scrollbar {
    width: 6px;
}

.world-panel-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
}

.world-panel-content::-webkit-scrollbar-thumb {
    background: var(--red-dark);
    border-radius: 3px;
}

.world-country-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background var(--transition-fast);
    cursor: pointer;
    scroll-margin: 120px;
}

.world-country-row:hover {
    background: rgba(255,255,255,0.03);
}

.world-country-row.active {
    background: rgba(168, 22, 30, 0.18);
    border-left: 3px solid rgba(168, 22, 30, 0.85);
}

.wcr-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 140px;
}

.wcr-stats {
    display: flex;
    gap: 14px;
    font-size: 11px;
}

.wcr-infected {
    color: var(--orange-primary);
}

.wcr-dead {
    color: var(--red-primary);
}

.wcr-pop {
    color: var(--text-dim);
}

/* === COUNTRY POPUP === */
.country-popup {
    position: absolute;
    display: none;
    min-width: 220px;
    background: var(--bg-panel);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    z-index: 25;
    box-shadow: var(--shadow-heavy), var(--shadow-glow-red);
    overflow: hidden;
    pointer-events: none;
}

.country-popup.visible {
    display: block;
    animation: fadeIn 0.2s ease;
}

.country-popup .close-btn {
    pointer-events: auto;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(230, 57, 70, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.popup-header h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.popup-content {
    padding: 10px 14px;
}

.popup-stat {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.popup-stat:last-child {
    border-bottom: none;
}

/* === PAUSE MENU === */
.pause-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.pause-overlay.visible {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.pause-menu {
    text-align: center;
}

.pause-menu h2 {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 8px;
    color: var(--text-primary);
    text-shadow: 0 0 30px var(--red-glow);
    margin-bottom: 40px;
}

.pause-menu .menu-btn {
    margin-bottom: 12px;
}

/* === GAME OVER === */
.gameover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.gameover-overlay.visible {
    display: flex;
    animation: fadeIn 0.5s ease;
}

.gameover-content {
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.gameover-icon {
    font-size: 80px;
    margin-bottom: 10px;
}

.gameover-content h2 {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: 10px;
    margin-bottom: 10px;
}

.gameover-content .victory h2 {
    color: var(--red-primary);
}

.gameover-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.gameover-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.go-stat {
    text-align: center;
}

.go-stat span:first-child {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.go-stat span:last-child {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.gameover-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* === MILESTONE MODAL === */
.milestone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 58;
}

.milestone-overlay.visible {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.milestone-content {
    width: min(520px, calc(100% - 40px));
    padding: 34px 32px 30px;
    text-align: center;
    background: linear-gradient(180deg, rgba(17, 25, 37, 0.96), rgba(8, 12, 18, 0.98));
    border: 1px solid rgba(230, 57, 70, 0.42);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5), 0 0 28px rgba(230, 57, 70, 0.18);
    border-radius: 12px;
    animation: fadeInUp 0.35s ease;
}

.milestone-icon {
    font-size: 52px;
    color: var(--red-primary);
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(230, 57, 70, 0.4);
}

.milestone-content h2 {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.milestone-content p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.milestone-content .menu-btn {
    margin: 0 auto;
}

/* === NOTIFICATIONS === */
.notification-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.notification {
    background: var(--bg-panel);
    border: 1px solid var(--border-glow);
    border-radius: 6px;
    padding: 12px 18px;
    min-width: 280px;
    max-width: 380px;
    animation: slideDown 0.4s ease;
    pointer-events: auto;
    box-shadow: var(--shadow-heavy);
}

.notification.warning {
    border-color: rgba(233, 196, 106, 0.4);
}

.notification.danger {
    border-color: rgba(230, 57, 70, 0.5);
    background: rgba(20, 5, 5, 0.95);
}

.notification.success {
    border-color: rgba(42, 157, 143, 0.4);
}

.notification-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
    letter-spacing: 1px;
}

.notification-body {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notification.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .game-title h1 {
        font-size: 48px;
        letter-spacing: 8px;
    }
    
    .biohazard-icon {
        font-size: 60px;
    }
    
    .disease-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .country-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-bar {
        gap: 12px;
    }
    
    .stat-value {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .game-title h1 {
        font-size: 36px;
        letter-spacing: 6px;
    }
    
    .menu-btn {
        width: 250px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .disease-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
    
    .country-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-hud-bottom {
        flex-direction: column;
        gap: 8px;
    }
    
    .evolution-panel, .world-panel {
        width: 100%;
    }
}

/* === SCANLINE EFFECT === */
.map-container::after {
    content: '';
    position: absolute;
    top: -5%;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(transparent, rgba(76, 201, 240, 0.03), transparent);
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 4;
}

/* === PLANE/SHIP ANIMATION === */
.transport-line {
    stroke: rgba(168, 22, 30, 0.28);
    stroke-width: 0.85;
    stroke-dasharray: 4 5;
    fill: none;
    opacity: 0.88;
}

.transport-dot {
    fill: #9f0b15;
    opacity: 0.96;
    filter: drop-shadow(0 0 4px rgba(159, 11, 21, 0.46));
}

.low-spec-mode .map-container::after {
    display: none;
}

.low-spec-mode .country-fill,
.low-spec-mode .country-dot-fill,
.low-spec-mode .country-bead,
.low-spec-mode .country-path,
.low-spec-mode .country-ring,
.low-spec-mode .transport-dot,
.low-spec-mode .infection-ripple,
.low-spec-mode .dna-bubble {
    filter: none !important;
}

.low-spec-mode .country-fill,
.low-spec-mode .country-dot-fill,
.low-spec-mode .country-bead,
.low-spec-mode .country-path,
.low-spec-mode .country-ring {
    transition: fill 0.12s linear, fill-opacity 0.12s linear, opacity 0.12s linear, stroke 0.12s linear, stroke-opacity 0.12s linear !important;
}

.low-spec-mode .country-path.infected-full,
.low-spec-mode .country-ring.infected-full,
.low-spec-mode .infection-ripple,
.low-spec-mode .dna-bubble {
    animation: none !important;
}

.low-spec-mode .country-node:hover .country-fill,
.low-spec-mode .country-node:hover .country-path {
    filter: none !important;
}

.low-spec-mode .country-node:hover .country-ring,
.low-spec-mode .country-node:hover .country-path {
    transform: none !important;
}

.low-spec-mode .dna-bubble {
    box-shadow: none;
}

.low-spec-mode .map-base-image {
    filter: saturate(1.02) brightness(1.06);
}
