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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    overflow: hidden;
}

/* Menu Screens */
.menu-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
}

.menu-screen.active {
    display: flex;
}

/* Parallax Background */
.parallax-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bg-layer {
    position: absolute;
    width: 120%;
    height: 120%;
    will-change: transform;
}

.sky-layer {
    background: linear-gradient(180deg, 
        #87CEEB 0%,
        #98D8E8 30%,
        #F0E68C 70%,
        #FFA07A 100%);
    animation: skyMovement 60s infinite linear;
}

.mountains-far {
    bottom: 0;
    animation: parallaxSlow 40s infinite linear;
}

.mountains-mid {
    bottom: 0;
    animation: parallaxMedium 30s infinite linear;
}

.mountains-near {
    bottom: 0;
    animation: parallaxFast 20s infinite linear;
}

.towers-layer {
    bottom: 0;
    animation: parallaxTowers 25s infinite linear;
}

.bg-tower {
    position: absolute;
    animation: towerFloat 4s infinite ease-in-out;
}

.bg-tower:nth-child(2) {
    animation-delay: -1.5s;
}

.bg-tower:nth-child(3) {
    animation-delay: -3s;
}

/* Partículas flutuantes */
.particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: particleFloat 8s infinite linear;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: -2s; }
.particle:nth-child(3) { left: 40%; animation-delay: -4s; }
.particle:nth-child(4) { left: 60%; animation-delay: -6s; }
.particle:nth-child(5) { left: 80%; animation-delay: -1s; }
.particle:nth-child(6) { left: 90%; animation-delay: -3s; }

.bg-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(44, 62, 80, 0.3) 0%,
        rgba(52, 73, 94, 0.2) 50%,
        rgba(44, 62, 80, 0.4) 100%);
    backdrop-filter: blur(1px);
}

/* Menu Container */
.menu-container {
    position: relative;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 50px 40px;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 10;
    animation: menuFadeIn 1s ease-out;
    max-width: 500px;
    width: 90%;
}

.game-logo {
    margin-bottom: 40px;
}

.game-title {
    font-size: 56px;
    margin-bottom: 10px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientAnimation 3s ease infinite;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.title-icon {
    font-size: 64px;
    color: #e74c3c;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: iconPulse 2s infinite ease-in-out;
}

.title-subtitle {
    font-size: 24px;
    font-weight: normal;
    letter-spacing: 3px;
    opacity: 0.9;
    text-transform: uppercase;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.menu-btn {
    position: relative;
    padding: 18px 35px;
    font-size: 18px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.menu-btn.primary {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    animation: primaryPulse 2s infinite ease-in-out;
}

.menu-btn.secondary {
    background: linear-gradient(45deg, #3498db, #2980b9);
}

.menu-btn.tertiary {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.menu-btn.primary:hover {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
}

.menu-btn.secondary:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
}

.menu-btn.tertiary:hover {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
}

.menu-btn i {
    font-size: 20px;
}

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

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

/* Animações */
@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

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

@keyframes primaryPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(231, 76, 60, 0.4); }
    50% { box-shadow: 0 0 30px rgba(231, 76, 60, 0.7); }
}

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

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

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

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

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

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

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(50px);
        opacity: 0;
    }
}

/* Responsividade para o menu */
@media (max-width: 768px) {
    .game-title {
        font-size: 42px;
    }
    
    .title-icon {
        font-size: 48px;
    }
    
    .title-subtitle {
        font-size: 18px;
        letter-spacing: 2px;
    }
    
    .menu-container {
        padding: 30px 20px;
        width: 95%;
    }
    
    .menu-btn {
        padding: 15px 25px;
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .bg-tower {
        transform: scale(0.8);
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 36px;
    }
    
    .title-icon {
        font-size: 40px;
    }
    
    .title-subtitle {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .menu-btn {
        padding: 12px 20px;
        font-size: 14px;
        gap: 8px;
    }
    
    .menu-btn i {
        font-size: 16px;
    }
    
    .bg-tower {
        transform: scale(0.6);
    }
    
    .particle {
        width: 2px;
        height: 2px;
    }
}

/* Menus secundários (Load e Instructions) */
#load-menu, #instructions-menu {
    background: linear-gradient(135deg, #2c3e50, #3498db);
}

#load-menu .menu-container,
#instructions-menu .menu-container {
    background: rgba(0, 0, 0, 0.4);
    padding: 40px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
}

#load-menu h2,
#instructions-menu h2 {
    font-size: 36px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#load-menu .menu-btn,
#instructions-menu .menu-btn {
    padding: 15px 30px;
    font-size: 16px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    margin-top: 20px;
}

#load-menu .menu-btn:hover,
#instructions-menu .menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #764ba2, #667eea);
}

/* Save Slots */
.save-slots {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

.save-slot {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.save-slot:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.save-slot.empty {
    opacity: 0.5;
    text-align: center;
    font-style: italic;
}

.save-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.save-name {
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 10px;
}

.save-details {
    font-size: 14px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    text-align: right;
}

/* Instructions */
.instructions-text {
    text-align: left;
    margin: 20px 0;
    line-height: 1.6;
}

.instructions-text p {
    margin: 10px 0;
    padding-left: 20px;
}

/* Game Screen */
.game-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    background: #1a1a2e;
}

.game-screen.active {
    display: block;
}

/* Game UI */
.game-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.game-ui > * {
    pointer-events: auto;
}

.ui-top {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    height: 60px;
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.95), rgba(40, 40, 80, 0.9));
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: white;
}

/* Estatísticas do jogo */
.game-stats {
    display: flex;
    gap: 15px;
    align-items: center;
    flex: 1;
}

.stat-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 80px;
}

.stat-icon {
    font-size: 14px;
    color: #4ecdc4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-icon i {
    display: block;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.stat-label {
    font-size: 9px;
    opacity: 0.8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4ecdc4;
}

.stat-value {
    font-size: 13px;
    font-weight: bold;
    color: #ff6b6b;
}

/* Display do dinheiro */
.money-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a1a;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.money-icon {
    font-size: 18px;
    color: #1a1a1a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.money-icon i {
    display: block;
}

.money-value {
    font-size: 18px;
    font-weight: 900;
}

/* Display dos cristais */
.crystals-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    margin-left: 10px;
}

.crystals-icon {
    font-size: 18px;
    color: #e8e8e8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.crystals-icon i {
    display: block;
}

.crystals-value {
    font-size: 18px;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Botões de controle */
.control-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.ui-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-height: 44px;
    min-width: 60px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.ui-btn .btn-icon {
    font-size: 16px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.ui-btn .btn-icon i {
    display: block;
}

.ui-btn .btn-text {
    font-size: 9px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ui-btn:hover .btn-icon {
    transform: scale(1.1);
}

.ui-btn.primary {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ui-btn.primary:hover {
    background: linear-gradient(135deg, #45a049, #2E7D32);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.5);
    transform: translateY(-2px);
}

.ui-btn.secondary {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ui-btn.secondary:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
    transform: translateY(-2px);
}

.ui-btn.shop {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ui-btn.shop:hover {
    background: linear-gradient(135deg, #F57C00, #EF6C00);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.5);
    transform: translateY(-2px);
}

.ui-btn.danger {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ui-btn.danger:hover {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.5);
    transform: translateY(-2px);
}

.ui-btn.tertiary {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ui-btn.tertiary:hover {
    background: linear-gradient(135deg, #7b1fa2, #6a1b9a);
    box-shadow: 0 6px 16px rgba(156, 39, 176, 0.5);
    transform: translateY(-2px);
}

.ui-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ui-left {
    display: none; /* Removido painel lateral */
}

/* PAINEL DE UPGRADES LATERAL COMPACTO */
.upgrades-sidebar {
    display: none; /* Desabilitado - usando layout horizontal */
}

/* PAINEL DE UPGRADES LATERAL ESQUERDO (ÁREA VERMELHA) */
.upgrades-horizontal {
    position: fixed;
    left: 20px;
    top: calc(135px + (100vh - 135px) / 2);
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 500;
    padding: 15px 10px;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.95), rgba(52, 73, 94, 0.95));
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 70px;
}

/* CONSUMÍVEIS VERTICAIS AO LADO DOS UPGRADES (CENTRALIZADOS) */
.consumables-horizontal {
    position: fixed;
    left: 110px; /* Ao lado direito dos upgrades */
    top: calc(135px + (100vh - 135px) / 2);
    transform: translateY(-50%); /* Centralizado verticalmente igual aos upgrades */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centralizar ícones horizontalmente */
    gap: 12px;
    z-index: 500;
    padding: 15px 12px; /* Mantém padding compacto */
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.95), rgba(142, 68, 173, 0.95));
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 90px; /* Aumentar para acomodar ícones maiores */
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90px; /* Aumentar max-width também */
}

.upgrade-icon-btn {
    position: relative;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.upgrade-icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5);
}

.upgrade-icon-btn.disabled {
    background: linear-gradient(135deg, #7f8c8d, #95a5a6) !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(127, 140, 141, 0.2) !important;
    filter: grayscale(0.7) !important;
}

.upgrade-icon-btn.disabled:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(127, 140, 141, 0.2) !important;
    background: linear-gradient(135deg, #7f8c8d, #95a5a6) !important;
}

.upgrade-icon-btn.disabled i {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* BOTÕES DE CONSUMÍVEIS */
.consumable-icon-btn {
    position: relative;
    width: 60px; /* Aumentar de 50px para 60px */
    height: 60px; /* Aumentar de 50px para 60px */
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.3rem; /* Aumentar ícone de 1.1rem para 1.3rem */
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
    border: 2px solid transparent;
}

.consumable-icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #f1556c, #e74c3c);
}

.consumable-icon-btn.disabled {
    background: linear-gradient(135deg, #7f8c8d, #95a5a6) !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(127, 140, 141, 0.2) !important;
    filter: grayscale(0.7) !important;
}

.consumable-icon-btn.disabled:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(127, 140, 141, 0.2) !important;
    border-color: transparent !important;
}

.consumable-price {
    font-size: 0.65rem; /* Aumentar um pouco para ficar proporcional */
    font-weight: bold;
    margin-top: 1px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.consumable-icon-btn i {
    margin-bottom: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Cores específicas para cada consumível */
.consumable-icon-btn[data-consumable="solar_wind"] {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.consumable-icon-btn[data-consumable="solar_wind"]:hover {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.6);
}

.consumable-icon-btn[data-consumable="frost_wind"] {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.consumable-icon-btn[data-consumable="frost_wind"]:hover {
    background: linear-gradient(135deg, #5dade2, #3498db);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.6);
}

.consumable-icon-btn[data-consumable="guided_missiles"] {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.consumable-icon-btn[data-consumable="guided_missiles"]:hover {
    background: linear-gradient(135deg, #f1556c, #e74c3c);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.6);
}

.consumable-icon-btn[data-consumable="money_generator"] {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.4);
}

.consumable-icon-btn[data-consumable="money_generator"]:hover {
    background: linear-gradient(135deg, #f7dc6f, #f1c40f);
    box-shadow: 0 8px 25px rgba(241, 196, 15, 0.6);
}

.upgrade-icon-btn.max-level {
    background: linear-gradient(135deg, #f39c12, #e67e22) !important;
    cursor: not-allowed !important;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4) !important;
    filter: none !important;
    opacity: 1 !important;
}

.upgrade-icon-btn.max-level:hover {
    transform: none !important;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4) !important;
    background: linear-gradient(135deg, #f39c12, #e67e22) !important;
}

.upgrade-icon-btn.max-level i {
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.upgrade-action-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #27ae60, #229954);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.4);
    z-index: 10;
}

.upgrade-action-btn::before {
    content: '+';
    color: white;
    font-size: 12px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.upgrade-action-btn:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: scale(1.1);
}

.upgrade-icon-btn.disabled .upgrade-action-btn {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.5 !important;
    box-shadow: 0 2px 6px rgba(127, 140, 141, 0.3) !important;
}

.upgrade-icon-btn.disabled .upgrade-action-btn:hover {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important;
    transform: none !important;
    box-shadow: 0 2px 6px rgba(127, 140, 141, 0.3) !important;
}

.upgrade-icon-btn.disabled .upgrade-action-btn::before {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* CONTROLES DA TORRE */
.tower-controls-sidebar {
    display: none; /* Desabilitado - controle integrado no painel horizontal */
}

.control-icon-btn {
    position: relative;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.2rem;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.control-icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.control-icon-btn.active {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.control-icon-btn i {
    transition: all 0.3s ease;
}

.control-icon-btn:hover i {
    transform: scale(1.1);
}

/* TOOLTIP PARA UPGRADES */
.upgrade-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    max-width: 200px;
}

.upgrade-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.upgrade-tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -5px;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #2c3e50;
}

/* Tooltip melhorado para upgrades */
.upgrade-tooltip-enhanced {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 15px;
    max-width: 280px;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.tooltip-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid #3498db;
    padding-bottom: 8px;
}

.tooltip-header .icon {
    font-size: 1.5em;
    margin-right: 8px;
}

.tooltip-header .title {
    font-weight: bold;
    color: #ecf0f1;
    font-size: 1.1em;
}

.tooltip-description {
    color: #bdc3c7;
    font-size: 0.9em;
    margin-bottom: 12px;
    line-height: 1.4;
}

.tooltip-values {
    margin-bottom: 12px;
}

.value-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    align-items: center;
}

.value-row .label {
    color: #95a5a6;
    font-size: 0.85em;
}

.current-value {
    color: #3498db;
    font-weight: bold;
}

.next-value {
    color: #2ecc71;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(46, 204, 113, 0.3);
}

.tooltip-cost {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 8px;
}

.tooltip-cost.affordable {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.tooltip-cost.expensive {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: white;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
}

.tooltip-cost.max-level {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.4);
    border: 2px solid #d68910;
}

.cost-icon {
    margin-right: 6px;
    font-size: 1.1em;
}

.cost-amount {
    font-size: 1em;
}

/* DISPLAY DE ITENS ATIVOS */
.active-items-display {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 500;
    width: 380px;
    max-width: 380px;
}

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

.active-section {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.95), rgba(52, 73, 94, 0.95));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.active-section.empty {
    display: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    color: #3498db;
    font-weight: bold;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.items-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.item-name {
    font-weight: bold;
    font-size: 0.85rem;
    color: #ecf0f1;
    margin-bottom: 2px;
}

.item-description {
    font-size: 0.75rem;
    color: #bdc3c7;
    line-height: 1.2;
}

.item-timer {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(231, 76, 60, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.item-counter {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    min-width: 28px;
    text-align: center;
    z-index: 10;
    line-height: 1;
}

/* SCROLLBAR PERSONALIZADA PARA ITENS ATIVOS */
.items-list::-webkit-scrollbar {
    width: 4px;
}

.items-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.items-list::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.6);
    border-radius: 2px;
}

.items-list::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.8);
}

/* PAINEL DE INFORMAÇÕES DA ONDA - Integrado ao active-items-container */

.wave-enemies-section {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.95), rgba(52, 73, 94, 0.95));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.wave-enemies-section.empty {
    display: none;
}

.enemies-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
}

.enemy-info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    min-width: 0; /* Permite flex shrink */
}

.enemy-info-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.enemy-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.enemy-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0; /* Permite flex shrink */
}

.enemy-name {
    font-size: 0.85rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.enemy-rarity {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.enemy-rarity.common {
    background: rgba(149, 165, 166, 0.8);
    color: white;
}

.enemy-rarity.rare {
    background: rgba(52, 152, 219, 0.8);
    color: white;
}

.enemy-rarity.epic {
    background: rgba(155, 89, 182, 0.8);
    color: white;
}

.enemy-rarity.legendary {
    background: rgba(241, 196, 15, 0.8);
    color: #2c3e50;
}

.enemy-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.72rem;
    justify-content: flex-start;
}

.enemy-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.enemy-stat i {
    color: #3498db;
    font-size: 0.65rem;
}

.enemy-hp {
    color: #e74c3c;
}

.enemy-damage {
    color: #f39c12;
}

.enemy-armor {
    color: #3498db;
}

/* SCROLLBAR PERSONALIZADA PARA INFORMAÇÕES DOS INIMIGOS */
.enemies-list::-webkit-scrollbar {
    width: 4px;
}

.enemies-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.enemies-list::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.6);
    border-radius: 2px;
}

.enemies-list::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.8);
}

/* ANIMAÇÕES */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Barra de Estatísticas da Torre */
.tower-stats-bar {
    position: absolute;
    top: 85px;
    left: 15px;
    right: 15px;
    height: 50px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(56, 142, 60, 0.15));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    color: white;
}

.tower-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    max-width: 11%;
}

.tower-stat .stat-icon {
    font-size: 14px;
    flex-shrink: 0;
    color: #4ecdc4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tower-stat .stat-icon i {
    display: block;
}

.tower-stat .stat-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.tower-stat .stat-label {
    font-size: 9px;
    opacity: 0.8;
    color: #4ecdc4;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tower-stat .stat-value {
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.health-bar-horizontal {
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.health-bar-horizontal .health-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    transition: width 0.3s ease;
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.4);
}

/* Tower Info */
.tower-info {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.tower-info h3 {
    color: #4ecdc4;
    margin-bottom: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0;
    font-size: 14px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    border-left: 3px solid #4ecdc4;
}

.health-bar {
    width: 80px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
    transition: width 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
}

/* Upgrades Panel */
.upgrades-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.upgrades-panel h3 {
    color: #ff6b6b;
    margin-bottom: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.upgrade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    border-left: 3px solid #ff6b6b;
    transition: all 0.3s ease;
}

.upgrade-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(3px);
}

.upgrade-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upgrade-name {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.upgrade-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.upgrade-cost {
    font-weight: bold;
    color: #ffd700;
    font-size: 14px;
}

.upgrade-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff5722);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.upgrade-btn:hover {
    background: linear-gradient(135deg, #ff5722, #e64a19);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.upgrade-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.upgrade-btn.max-level {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.upgrade-btn:hover {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    transform: scale(1.05);
}

.upgrade-btn:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
    transform: none;
}

/* Painel de Status dos Itens */
.items-status-panel {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.items-status-panel h3 {
    color: #4ecdc4;
    margin-bottom: 15px;
    font-size: 18px;
    text-align: center;
    border-bottom: 2px solid rgba(78, 205, 196, 0.3);
    padding-bottom: 8px;
}

.active-effects-section,
.permanent-equipment-section {
    margin-bottom: 15px;
}

.active-effects-section h4,
.permanent-equipment-section h4 {
    color: #ffd700;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: left;
    border-left: 3px solid #ffd700;
    padding-left: 8px;
}

.permanent-equipment-section h4 {
    color: #ff6b6b;
    border-left-color: #ff6b6b;
}

.effects-list,
.equipment-list {
    min-height: 40px;
    max-height: 120px;
    overflow-y: auto;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    text-decoration: none;
    border: none;
}

.item-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    text-decoration: none;
    border: none;
}

.item-name {
    font-weight: bold;
    color: #e8f5e8;
    text-decoration: none;
    border: none;
}

.item-timer {
    background: rgba(255, 165, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    min-width: 35px;
    text-align: center;
}

.no-effects,
.no-equipment,
.no-items {
    text-align: center;
    color: #888;
    font-style: italic;
    font-size: 12px;
    padding: 10px;
}

/* Scrollbar personalizada para listas de itens */
.effects-list::-webkit-scrollbar,
.equipment-list::-webkit-scrollbar {
    width: 4px;
}

.effects-list::-webkit-scrollbar-track,
.equipment-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.effects-list::-webkit-scrollbar-thumb,
.equipment-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.effects-list::-webkit-scrollbar-thumb:hover,
.equipment-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.shortcuts-panel {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.shortcuts-panel h4 {
    color: #4ecdc4;
    margin-bottom: 10px;
    text-align: center;
    font-size: 14px;
}

.shortcut-item {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 5px 0;
    text-align: center;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
}

/* Game Canvas */
#game-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(76, 205, 196, 0.4);
    border-radius: 15px;
    background: radial-gradient(circle at center, #16213e, #0f172a);
    outline: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1;
}

#game-canvas:focus {
    border-color: rgba(76, 205, 196, 0.8);
    box-shadow: 0 0 20px rgba(76, 205, 196, 0.4), 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Melhorias de layout responsivo */
@media (max-width: 1200px) {
    .ui-left {
        width: 260px;
    }
    
    .control-buttons {
        gap: 4px;
    }
    
    .ui-btn {
        padding: 4px 6px;
        font-size: 9px;
    }
}

@media (max-width: 900px) {
    .ui-top {
        flex-direction: column;
        height: auto;
        padding: 10px;
        gap: 10px;
    }
    
    .tower-stats-bar {
        top: 120px;
        height: 45px;
        padding: 0 15px;
    }
    
    .tower-stat .stat-icon {
        font-size: 14px;
    }
    
    .tower-stat .stat-label {
        font-size: 9px;
    }
    
    .tower-stat .stat-value {
        font-size: 11px;
    }
    
    .game-stats {
        justify-content: center;
    }
    
    .control-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .ui-left {
        top: 180px;
        width: 240px;
    }
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

/* Modais pequenos */
#save-modal .modal-content,
#pause-modal .modal-content,
#gameover-modal .modal-content,
#confirm-modal .modal-content,
#message-modal .modal-content {
    width: 60%;
    max-width: 450px;
    padding: 25px;
    margin: 10% auto;
}

/* Inputs nos modais pequenos */
#save-modal .modal-content input,
#pause-modal .modal-content input,
#confirm-modal .modal-content input,
#message-modal .modal-content input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* Modais médios */
#help-modal .modal-content {
    width: 85%;
    max-width: 700px;
    padding: 30px;
    margin: 5% auto;
}

/* Modal da loja (grande) */
#shop-modal .modal-content {
    width: 90%;
    max-width: 900px;
    padding: 30px;
    margin: 3% auto;
}

.modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.95), rgba(40, 40, 80, 0.95));
    border: 2px solid #4CAF50;
    border-radius: 15px;
    max-height: 85vh;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: white;
    backdrop-filter: blur(10px);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Botão de fechar X dos modais */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(231, 76, 60, 0.8);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: white;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-close-btn:hover {
    background: rgba(231, 76, 60, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.modal-close-btn:active {
    transform: scale(0.95);
}

/* Títulos nos modais pequenos */
#save-modal .modal-content h3,
#pause-modal .modal-content h3,
#confirm-modal .modal-content h3,
#message-modal .modal-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.modal-content h3 {
    color: #4ecdc4;
    margin-bottom: 20px;
    font-size: 24px;
}

.modal-content input {
    width: 200px;
    padding: 10px;
    margin: 10px 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
}

.modal-content input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.modal-btn {
    padding: 10px 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: bold;
}

.modal-btn:hover {
    background: linear-gradient(45deg, #764ba2, #667eea);
    transform: translateY(-2px);
}

.modal-btn.secondary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    margin-right: 10px;
}

.modal-btn.secondary:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
}

/* Help Modal Styles */
.help-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: left;
}

.help-modal-content h3 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
}

.help-section {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #4ecdc4;
}

.help-section h4 {
    color: #4ecdc4;
    margin-bottom: 10px;
    font-size: 18px;
}

.help-section h5 {
    color: #3498db;
    margin: 15px 0 10px 0;
    font-size: 16px;
    border-left: 3px solid #3498db;
    padding-left: 10px;
}

.help-section p {
    line-height: 1.6;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.help-section ul {
    list-style: none;
    padding-left: 0;
}

.help-section li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.help-section li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #4ecdc4;
    font-size: 12px;
}

/* Enemy Types Grid */
.enemy-types {
    display: grid;
    gap: 8px;
}

.enemy-type {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 5px;
}

.enemy-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.enemy-icon.normal { color: #e74c3c; }
.enemy-icon.fast { color: #f39c12; }
.enemy-icon.heavy { color: #8e44ad; }
.enemy-icon.armored { color: #34495e; }
.enemy-icon.boss { color: #c0392b; }
.enemy-icon.ghost { color: #add8e6; }
.enemy-icon.zombie { color: #556B2F; }
.enemy-icon.shooter { color: #ff8c00; }

/* Specials Section Styles */
.specials-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
}

.special-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.special-icon {
    font-size: 24px;
    width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.special-item div {
    flex: 1;
}

.special-item strong {
    color: #3498db;
    font-size: 16px;
}

.special-item p {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Shortcuts Grid */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin: 15px 0;
}

.shortcut {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    font-size: 14px;
}

/* Keyboard Key Style */
kbd {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Modal Type Styles */
.modal-success .modal-content {
    border-left: 5px solid #2ecc71;
}

.modal-error .modal-content {
    border-left: 5px solid #e74c3c;
}

.modal-warning .modal-content {
    border-left: 5px solid #f39c12;
}

.modal-info .modal-content {
    border-left: 5px solid #3498db;
}

/* Game Over Modal */
#gameover-modal .modal-content {
    text-align: center;
}

#gameover-modal h3 {
    font-size: 32px;
    margin-bottom: 20px;
}

#gameover-message {
    font-size: 18px;
    line-height: 1.6;
    margin: 20px 0;
    white-space: pre-line;
}

/* Confirm Modal - apenas estilo, tamanho já definido acima */

#confirm-message {
    font-size: 16px;
    line-height: 1.5;
    margin: 15px 0;
}

/* Message Modal */
#message-text {
    font-size: 16px;
    line-height: 1.5;
    margin: 15px 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ui-left {
        width: 200px;
    }
    
    #game-canvas {
        width: 90vw;
        height: 70vh;
    }
}

@media (max-width: 768px) {
    .game-title {
        font-size: 36px;
    }
    
    .ui-top {
        flex-direction: column;
        height: auto;
        padding: 10px;
        gap: 10px;
    }
    
    .ui-left {
        position: relative;
        width: 100%;
        margin-top: 20px;
    }
    
    #game-canvas {
        width: 95vw;
        height: 60vh;
    }
    
    .help-modal-content {
        max-width: 95vw;
        max-height: 90vh;
        margin: 10px;
    }
    
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }
    
    /* Responsividade para painéis laterais */
    .active-items-display {
        width: 340px;
        max-width: 340px;
    }
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes regenPulse {
    0% { box-shadow: 0 0 5px rgba(46, 204, 113, 0.4); }
    50% { box-shadow: 0 0 15px rgba(46, 204, 113, 0.8); }
    100% { box-shadow: 0 0 5px rgba(46, 204, 113, 0.4); }
}

/* Shop Styles */
.shop-modal-content {
    width: 800px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
}

.shop-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #34495e;
    padding-bottom: 10px;
}

.shop-tab {
    padding: 10px 20px;
    background: #34495e;
    color: #ecf0f1;
    border: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.shop-tab:hover {
    background: #4a6741;
}

.shop-tab.active {
    background: #27ae60;
    color: white;
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 25px;
    padding: 20px 0;
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
}

.shop-items::-webkit-scrollbar {
    width: 8px;
}

.shop-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.shop-items::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 4px;
}

.shop-items::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
}

/* RESPONSIVIDADE PARA NOVO SISTEMA DE UPGRADES */
@media (max-width: 768px) {
    .upgrades-sidebar {
        left: 10px;
        padding: 10px 8px;
        gap: 12px;
    }
    
    .upgrade-icon-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .active-items-display {
        right: 10px;
        width: 320px;
        max-width: 320px;
    }
    
    .upgrade-tooltip {
        font-size: 0.8rem;
        padding: 10px 12px;
        max-width: 180px;
    }
    
    .active-section {
        font-size: 0.85rem;
    }
    
    .section-header {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .items-list {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .upgrades-sidebar {
        left: 5px;
        padding: 8px 6px;
        gap: 10px;
    }
    
    .upgrade-icon-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .upgrade-action-btn {
        width: 18px;
        height: 18px;
        top: -4px;
        right: -4px;
    }
    
    .upgrade-action-btn::before {
        font-size: 10px;
    }
    
    .active-items-display {
        right: 5px;
        width: 300px;
        max-width: 300px;
    }
    
    .active-section {
        font-size: 0.8rem;
    }
    
    .upgrade-tooltip {
        font-size: 0.75rem;
        padding: 8px 10px;
        max-width: 150px;
    }
    
    .item-timer {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
}

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

.shop-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(76, 175, 80, 0.3);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideInUp 0.6s ease-out;
}

.shop-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #45a049, #4CAF50);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shop-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2), 0 0 20px rgba(76, 175, 80, 0.1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
}

.shop-item:hover::before {
    opacity: 1;
}

.shop-item.owned {
    border-color: rgba(255, 215, 0, 0.6);
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.shop-item.owned::before {
    background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
    opacity: 1;
}

.shop-item.owned .shop-item-button {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Item com efeito ativo */
.shop-item.active-effect {
    border-color: rgba(243, 156, 18, 0.6);
    background: linear-gradient(145deg, rgba(243, 156, 18, 0.1), rgba(243, 156, 18, 0.05));
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
    opacity: 0.7;
}

.shop-item.active-effect::before {
    background: linear-gradient(90deg, #f39c12, #e67e22, #f39c12);
    opacity: 1;
}

.shop-item.active-effect .shop-item-button {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.6;
}

.shop-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    position: relative;
}

.shop-item-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.shop-item-icon {
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    border-radius: 12px;
    border: 2px solid rgba(76, 175, 80, 0.3);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.shop-item:hover .shop-item-icon {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(76, 175, 80, 0.2));
    border-color: rgba(76, 175, 80, 0.5);
    transform: scale(1.1);
}

.shop-item-name {
    font-size: 16px;
    font-weight: bold;
    color: #E8F5E8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.shop-item-price {
    font-size: 18px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    flex-shrink: 0;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.shop-item-description {
    color: #bdc3c7;
    line-height: 1.5;
    margin-bottom: 12px;
    font-size: 14px;
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid rgba(189, 195, 199, 0.5);
}

.shop-item-effect {
    color: #3498db;
    font-style: italic;
    font-size: 13px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(52, 152, 219, 0.08));
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.3);
    text-align: center;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 1px 3px rgba(52, 152, 219, 0.1);
}

.shop-item-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin-top: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.shop-item-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.shop-item-button:disabled {
    background: linear-gradient(135deg, #666, #555);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.shop-item-duration {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    margin: 10px 0 8px 0;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
    border: 1px solid rgba(231, 76, 60, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.regen-active {
    animation: regenPulse 2s infinite;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Sistema de Notificações */
.notifications-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
    pointer-events: none;
}

.notification {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    backdrop-filter: blur(10px);
    border-left: 4px solid;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    opacity: 0;
    animation: slideIn 0.3s ease-out forwards;
    max-width: 100%;
    word-wrap: break-word;
    pointer-events: auto;
}

.notification.success {
    border-left-color: #2ecc71;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(0, 0, 0, 0.9));
}

.notification.info {
    border-left-color: #3498db;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(0, 0, 0, 0.9));
}

.notification.warning {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1), rgba(0, 0, 0, 0.9));
}

.notification.error {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(0, 0, 0, 0.9));
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.notification-icon {
    font-size: 16px;
    min-width: 16px;
}

.notification-title {
    font-weight: bold;
    font-size: 14px;
    color: white;
}

.notification-message {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.notification.hide {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsividade para notificações */
@media (max-width: 768px) {
    .notifications-container {
        right: 10px;
        bottom: 10px;
        max-width: calc(100vw - 20px);
    }
    
    .notification {
        padding: 12px 15px;
        font-size: 12px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 11px;
    }
    
    /* Responsividade para informações dos inimigos */
    .enemy-info-item {
        padding: 8px 10px;
        gap: 10px;
    }
    
    .enemy-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .enemy-name {
        font-size: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .enemy-rarity {
        font-size: 0.55rem;
        padding: 1px 4px;
    }
    
    .enemy-stats {
        gap: 8px;
    }
    
    .enemy-stat {
        font-size: 0.65rem;
    }
}

/* BOTÃO DE DEBUG TEMPORÁRIO */
.debug-btn {
    margin-left: 10px;
    padding: 5px 10px;
    font-size: 12px;
    background: #e74c3c !important;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.debug-btn:hover {
    background: #c0392b !important;
    transform: scale(1.05);
}

.debug-btn:active {
    transform: scale(0.95);
}

/* ====================================================================
   SISTEMA DE PESQUISAS - INTERFACE
   ==================================================================== */

.research-modal-content {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border: 2px solid #9b59b6;
    box-shadow: 0 20px 40px rgba(155, 89, 182, 0.3);
}

.research-modal-content h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 25px 0;
    padding: 0;
    text-align: center;
    justify-content: center;
    font-size: 1.5em;
}

.research-modal-content h3 i {
    color: #9b59b6;
    font-size: 1.2em;
}

.research-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.crystals-balance {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: bold;
    color: #ecf0f1;
}

.crystals-balance i {
    font-size: 1.8em;
    color: #e8daef;
    text-shadow: 0 0 10px rgba(232, 218, 239, 0.5);
    animation: crystal-glow 2s ease-in-out infinite alternate;
}

@keyframes crystal-glow {
    0% { transform: scale(1); text-shadow: 0 0 10px rgba(232, 218, 239, 0.5); }
    100% { transform: scale(1.1); text-shadow: 0 0 20px rgba(232, 218, 239, 0.8); }
}

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

.research-card {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    border: 2px solid #7f8c8d;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.research-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(155, 89, 182, 0.1), transparent);
    transition: left 0.5s ease;
}

.research-card:hover {
    border-color: #9b59b6;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(155, 89, 182, 0.3);
}

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

.research-icon {
    text-align: center;
    margin-bottom: 10px;
}

.research-icon i {
    font-size: 3em;
    color: #9b59b6;
    text-shadow: 0 0 15px rgba(155, 89, 182, 0.5);
}

.research-info h4 {
    color: #ecf0f1;
    font-size: 1.4em;
    margin-bottom: 8px;
    text-align: center;
}

.research-description {
    color: #bdc3c7;
    font-size: 0.9em;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 15px;
}

.research-level {
    color: #f39c12;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.research-effect {
    color: #27ae60;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.research-cost {
    color: #e8daef;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.research-cost i {
    color: #e8daef;
    text-shadow: 0 0 5px rgba(232, 218, 239, 0.5);
}

.research-maxed {
    color: #f39c12;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(243, 156, 18, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.research-action {
    text-align: center;
    margin-top: auto;
}

.research-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.research-btn.primary {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.research-btn.primary:hover {
    background: linear-gradient(45deg, #219a52, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.5);
}

.research-btn.secondary {
    background: linear-gradient(45deg, #7f8c8d, #95a5a6);
    color: white;
    box-shadow: 0 4px 15px rgba(127, 140, 141, 0.3);
}

.research-btn.secondary:hover {
    background: linear-gradient(45deg, #6c7b7d, #7f8c8d);
    transform: translateY(-2px);
}

.research-btn.danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.research-btn.danger:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.5);
}

.research-btn.disabled {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

.research-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

.maxed-label {
    color: #f39c12;
    font-weight: bold;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.research-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px 0 0 0;
    border-top: 2px solid rgba(155, 89, 182, 0.3);
}

.research-actions .research-btn {
    flex: 0 0 auto;
    min-width: 140px;
}

/* Ajustar espaçamento geral do modal */
.research-modal-content {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border: 2px solid #9b59b6;
    box-shadow: 0 20px 40px rgba(155, 89, 182, 0.3);
    padding: 25px;
}

/* Cristais na UI principal */
.crystals-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
    border-radius: 20px;
    border: 2px solid rgba(155, 89, 182, 0.3);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.2);
    transition: all 0.3s ease;
}

.crystals-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.4);
}

.crystals-icon {
    font-size: 1.2em;
    color: #e8daef;
    text-shadow: 0 0 10px rgba(232, 218, 239, 0.5);
    animation: crystal-pulse 3s ease-in-out infinite;
}

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

.crystals-value {
    font-weight: bold;
    font-size: 1.1em;
    color: #ecf0f1;
    min-width: 40px;
    text-align: center;
}

/* Responsividade para pesquisas */
@media (max-width: 768px) {
    .research-modal-content {
        width: 95%;
        margin: 20px;
        max-height: 85vh;
        padding: 20px;
    }
    
    .research-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .research-card {
        padding: 15px;
    }
    
    .research-actions {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0 0 0;
    }
    
    .research-actions .research-btn {
        width: 100%;
        min-width: auto;
    }
}

/* Animações especiais para pesquisas */
@keyframes research-complete {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Modal do Histórico */
.history-modal-content {
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    overflow-y: auto;
    padding: 25px 30px;
}

.history-modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.3);
}

.history-content {
    max-height: 65vh;
    overflow-y: auto;
    margin-bottom: 25px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    font-size: 12px;
    table-layout: fixed;
}

.history-table th,
.history-table td {
    padding: 10px 6px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Larguras específicas para cada coluna */
.history-table th:nth-child(1),
.history-table td:nth-child(1) { width: 16%; } /* Data */

.history-table th:nth-child(2),
.history-table td:nth-child(2) { width: 8%; } /* Duração */

.history-table th:nth-child(3),
.history-table td:nth-child(3) { width: 6%; } /* Onda */

.history-table th:nth-child(4),
.history-table td:nth-child(4) { width: 9%; } /* Dinheiro */

.history-table th:nth-child(5),
.history-table td:nth-child(5) { width: 7%; } /* Inimigos */

.history-table th:nth-child(6),
.history-table td:nth-child(6) { width: 7%; } /* Precisão */

.history-table th:nth-child(7),
.history-table td:nth-child(7) { width: 10%; } /* Dano Causado */

.history-table th:nth-child(8),
.history-table td:nth-child(8) { width: 12%; } /* Dano Recebido */

.history-table th:nth-child(9),
.history-table td:nth-child(9) { width: 6%; } /* Botão Compartilhar */

/* Botão de compartilhar */
.share-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.share-btn:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.share-btn:active {
    transform: scale(0.95);
}

.history-table th {
    background: rgba(52, 152, 219, 0.3);
    color: #ecf0f1;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 11px;
}

.history-table th i {
    margin-right: 4px;
    font-size: 10px;
}

.history-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

.history-table tr:hover {
    background: rgba(52, 152, 219, 0.2);
}

.history-empty {
    text-align: center;
    padding: 40px;
    color: #bdc3c7;
    font-style: italic;
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 25px;
    padding: 0 5px;
}

.history-stat-card {
    background: rgba(52, 152, 219, 0.2);
    padding: 16px 12px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.history-stat-card:hover {
    background: rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.history-stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #3498db;
    display: block;
    margin-bottom: 5px;
}

.history-stat-label {
    font-size: 11px;
    color: #bdc3c7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Seção de informações do sistema de estatísticas */
.history-info {
    background: rgba(52, 73, 94, 0.3);
    border: 1px solid rgba(149, 165, 166, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    font-size: 13px;
    line-height: 1.5;
}

.history-info p {
    margin: 8px 0;
    color: #bdc3c7;
}

.history-info i {
    color: #3498db;
    margin-right: 8px;
}

.history-buttons-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(149, 165, 166, 0.2);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-buttons-info span {
    font-size: 12px;
    color: #95a5a6;
}

.history-buttons-info i {
    color: #e67e22;
    margin-right: 6px;
}

/* Responsividade do histórico */
@media (max-width: 1200px) {
    .history-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

@media (max-width: 1024px) {
    .history-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .history-modal-content {
        width: 98%;
        margin: 5px;
        padding: 20px 15px;
    }
    
    .history-modal-content h2 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .history-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .history-table {
        font-size: 10px;
    }
    
    .history-table th,
    .history-table td {
        padding: 8px 3px;
        font-size: 10px;
    }
    
    /* Ajustar larguras para mobile */
    .history-table th:nth-child(1),
    .history-table td:nth-child(1) { width: 18%; }
    
    .history-table th:nth-child(2),
    .history-table td:nth-child(2) { width: 9%; }
    
    .history-table th:nth-child(3),
    .history-table td:nth-child(3) { width: 5%; }
    
    .history-table th:nth-child(4),
    .history-table td:nth-child(4) { width: 8%; }
    
    .history-table th:nth-child(5),
    .history-table td:nth-child(5) { width: 6%; }
    
    .history-table th:nth-child(6),
    .history-table td:nth-child(6) { width: 6%; }
    
    .history-table th:nth-child(7),
    .history-table td:nth-child(7) { width: 7%; }
    
    .history-table th:nth-child(8),
    .history-table td:nth-child(8) { width: 7%; }
    
    .history-table th:nth-child(9),
    .history-table td:nth-child(9) { width: 20%; }
    
    .history-table th:nth-child(10),
    .history-table td:nth-child(10) { width: 8%; }
    
    .history-table td:nth-child(9) {
        font-size: 9px;
        max-height: 40px;
        padding: 6px 2px;
    }
    
    .share-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .history-stat-card {
        padding: 15px 10px;
    }
    
    .history-stat-value {
        font-size: 22px;
    }
    
    .history-stat-label {
        font-size: 10px;
    }
}

.research-card.completed {
    animation: research-complete 0.6s ease-in-out;
    border-color: #27ae60;
    box-shadow: 0 0 30px rgba(39, 174, 96, 0.5);
}

/* RESPONSIVIDADE PARA NOVOS LAYOUTS */
@media (max-width: 768px) {
    .upgrades-horizontal {
        left: 10px;
        transform: translateY(-50%);
        padding: 10px 8px;
        gap: 8px;
        max-width: 60px;
    }
    
    .upgrade-icon-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .consumables-horizontal {
        bottom: 10px;
        padding: 10px 15px;
        gap: 12px;
    }
    
    .consumable-icon-btn {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .consumable-price {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .upgrades-horizontal {
        left: 5px;
        padding: 8px 6px;
        gap: 6px;
        max-width: 50px;
    }
    
    .upgrade-icon-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .consumables-horizontal {
        bottom: 5px;
        padding: 8px 12px;
        gap: 10px;
    }
    
    .consumable-icon-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .consumable-price {
        font-size: 0.55rem;
    }
    
    .consumable-tooltip-enhanced {
        max-width: 250px;
        min-width: 200px;
        padding: 12px;
    }
}

/* Modal de Confirmação */
.confirm-modal-content {
    text-align: center;
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border: 2px solid #e74c3c;
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.3);
}

.confirm-modal-content h3 {
    color: #e74c3c;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.confirm-modal-content p {
    color: #ecf0f1;
    margin-bottom: 20px;
    line-height: 1.4;
}

#confirm-cancel {
    background: linear-gradient(145deg, #95a5a6, #7f8c8d);
    color: white;
    margin-right: 10px;
}

#confirm-cancel:hover {
    background: linear-gradient(145deg, #7f8c8d, #95a5a6);
    transform: translateY(-2px);
}

#confirm-ok {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    color: white;
}

#confirm-ok:hover {
    background: linear-gradient(145deg, #c0392b, #e74c3c);
    transform: translateY(-2px);
}

/* === SISTEMA DE ESPECIAIS - BARRAS DE PROGRESSO === */

.special-progress-bar {
    position: absolute;
    bottom: 3px;
    left: 6px; /* Aumentar padding da esquerda para 6px */
    right: 6px; /* Aumentar padding da direita para 6px */
    height: 4px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 2px;
    overflow: hidden;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.special-progress-fill {
    height: 100%;
    width: 0%;
    background: #3498db;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 1px;
    box-shadow: 0 0 6px rgba(52, 152, 219, 0.6);
}

.consumable-icon-btn.special-ready {
    animation: special-glow 2s ease-in-out infinite alternate;
    box-shadow: 0 5px 20px rgba(46, 204, 113, 0.6) !important;
}

@keyframes special-glow {
    from {
        box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
    }
    to {
        box-shadow: 0 5px 25px rgba(46, 204, 113, 0.8);
    }
}

.consumable-icon-btn.special-ready .special-progress-fill {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.8);
}

.consumable-icon-btn.active .special-progress-fill {
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
    box-shadow: 0 0 8px rgba(155, 89, 182, 0.8);
}

/* Label de ondas restantes no canto superior direito */
.special-waves-label {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 16px;
    text-align: center;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: waves-pulse 1.5s ease-in-out infinite alternate;
}

@keyframes waves-pulse {
    from {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
    }
    to {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.6);
    }
}

/* ====================================================================
   LAYOUT BÁSICO DO MENU (SEM BANNERS)
   ================================================================== */

.menu-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.menu-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ====================================================================
   FIM DOS ESTILOS
   ================================================================== */

/* Estilos para ícones de inimigos no modal de ajuda */
.enemy-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.enemy-icon.normal {
    background-color: #e74c3c;
}

.enemy-icon.fast {
    background-color: #f39c12;
}

.enemy-icon.heavy {
    background-color: #8e44ad;
}

.enemy-icon.armored {
    background-color: #34495e;
}

.enemy-icon.boss {
    background-color: #c0392b;
}

.enemy-icon.ghost {
    background-color: #add8e6;
    opacity: 0.8;
}

.enemy-icon.zombie {
    background-color: #556B2F;
}

.enemy-icon.shooter {
    background-color: #ff8c00;
}

/* Animação para timers dos especiais quando há pouco tempo restante */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
