/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Menú principal */
.menu-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.menu-content {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
    width: 90%;
}

.game-title {
    font-size: 48px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 10px;
}

.game-subtitle {
    font-size: 18px;
    color: #ffffff;
    opacity: 0.8;
    margin-bottom: 30px;
}

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

.menu-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-btn.primary {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1e3c72;
}

.menu-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.menu-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.game-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.6;
}

.game-info p {
    margin-bottom: 8px;
}

#game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header del juego */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.year-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-label {
    font-size: 18px;
    font-weight: 300;
}

.year-number {
    font-size: 32px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.year-max {
    font-size: 16px;
    opacity: 0.7;
}

.time-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.day-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
}

.day-spinner.spinning {
    animation: spin linear infinite;
}

.day-spinner.speed-1 { animation-duration: 21s; }
.day-spinner.speed-2 { animation-duration: 7s; }
.day-spinner.speed-4 { animation-duration: 1s; }

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

.day-spinner .day {
    position: absolute;
    width: 24px;
    height: 24px;
    left: 50%;
    top: 50%;
    margin-left: -12px;
    margin-top: -12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.day-spinner .day.active {
    background: #ffd700;
    color: #1e3c72;
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    border-color: #fff;
}

.speed-controls {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.speed-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 40px;
}

.speed-btn.active {
    background: #ffd700;
    color: #1e3c72;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.game-actions {
    display: flex;
    gap: 10px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

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

.control-btn:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
    transform: none;
}

.control-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

/* Panel principal */
.main-panel {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.player-country-panel {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.player-country-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.player-country-panel h2 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin-bottom: 20px;
    font-size: 24px;
}

.country-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.country-header h2 {
    margin-bottom: 0;
    flex: 1;
}

.country-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-widget {
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.info-widget:hover {
    background: rgba(0, 0, 0, 0.4);
}

.info-widget .widget-value {
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.info-widget .widget-income {
    font-weight: bold;
    color: #4CAF50; /* Green for income */
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

#player-population {
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.economy-info {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #FFD700;
    font-weight: 500;
}

.economy-info::before {
    content: '💰';
    font-size: 16px;
}

#player-money {
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

#player-income {
    font-weight: bold;
    color: #4CAF50;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

/* Contenedor de estadísticas */
.stats-container {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-item {
    display: grid;
    grid-template-columns: 120px 1fr 60px 80px;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    font-weight: 600;
    font-size: 16px;
}

.stat-bar {
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    flex-grow: 1;
    margin: 0 15px;
    position: relative;
}

.stat-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
    width: 0%;
    transition: width 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.stat-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent);
    background-size: 40px 40px;
    animation: shimmer 2s linear infinite;
    opacity: 0.5;
}

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

.stat-value {
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    color: #ffd700;
}

.stat-dev-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dev-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dev-btn:hover {
    background: #ffd700;
    color: #1e3c72;
    transform: scale(1.1);
}

.dev-btn:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

/* Panel de desarrollo Global */
.global-development-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    text-align: center;
}

.global-development-panel h3 {
    margin-bottom: 15px;
    color: #ffd700;
}

/* Panel de otros países */
.other-countries-panel {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.other-countries-panel h3 {
    margin-bottom: 15px;
    color: #ffd700;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.country-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.country-name {
    font-weight: bold;
    margin-bottom: 10px;
    color: #ffd700;
}

.country-rumor {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.country-strength {
    font-size: 11px;
    color: #ffd700;
    margin-top: 3px;
    font-weight: 600;
}

/* Panel del Ministerio de Guerra */
.war-ministry-panel {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.war-ministry-panel h3 {
    margin-bottom: 20px;
    color: #ffd700;
    text-align: center;
    font-size: 20px;
}

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

.war-stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.war-stat-label {
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 8px;
    font-size: 14px;
}

.war-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
}

.war-stat-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.war-stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ff6666);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.experience-stars {
    margin-top: 8px;
    font-size: 12px;
}

.experience-stars .star {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.experience-stars .star.active {
    opacity: 1;
    color: #ffd700;
}

.war-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    align-items: start;
}

.war-action-item.full-width {
    grid-column: 1 / -1;
}

/* Los estilos de .war-btn.attack ahora están definidos en la sección principal de botones de guerra */

/* --- Estilos para el Modal de Batalla --- */
.battle-enemy-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.battle-enemy-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.battle-enemy-info h4 {
    color: #ffd700;
    margin-bottom: 8px;
}

.battle-enemy-intel {
    display: flex;
    gap: 20px;
    font-size: 14px;
    opacity: 0.8;
}

.battle-enemy-intel span {
    font-weight: bold;
}

.battle-attack-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #c62828, #e53935);
    color: white;
    transition: transform 0.2s ease;
}

.battle-attack-btn:hover {
    transform: scale(1.05);
}

/* Vista de Resultados de Batalla */
.battle-result-view {
    text-align: center;
}

.battle-result-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}

.battle-result-title.victory { color: #4CAF50; }
.battle-result-title.defeat { color: #c62828; }
.battle-result-title.draw { color: #fdd835; }

.casualties-container {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 30px;
}

.casualty-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
    width: 45%;
}

.casualty-box h4 {
    margin-bottom: 10px;
    color: #ffd700;
    font-size: 18px;
}

.casualty-box p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px;
}

.casualty-box p.casualties {
    margin-top: 10px;
    font-weight: bold;
}

.casualty-box p span {
    font-weight: bold;
    color: #ffffff;
}

/* Opciones Post-Batalla */
.battle-options-view {
    text-align: center;
}

.battle-options-view h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
}

.battle-options-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.battle-option-item {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.battle-option-item .control-btn {
    flex-shrink: 0;
    min-width: 120px;
}

.option-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* Panel de eventos */
.events-panel {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.events-panel h3 {
    margin-bottom: 15px;
    color: #ffd700;
}

.event-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border-left: 4px solid #ffd700;
}

.event-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.event-description {
    font-size: 14px;
    opacity: 0.9;
}

/* Canvas container */
.canvas-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

#game-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

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

.modal-content {
    background: linear-gradient(135deg, #2a3a5b, #1e2a4a);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 700px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-rows: auto 1fr auto;
    max-height: 90vh;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    margin: 20px 0;
    overflow-y: auto; /* Permitir scroll si el contenido es muy largo */
}

.continue-btn, .new-game-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.continue-btn:hover, .new-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.victory-content {
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    border-color: #ffd700;
    color: #ffffff;
}

.victory-content h2 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

#final-stats {
    margin-top: 20px;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-item {
    display: grid;
    grid-template-columns: 40px 1.5fr 1fr 1fr;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.ranking-item.winner .country-name {
    color: #ffd700;
}

.ranking-item .country-score {
    text-align: right;
    font-weight: bold;
}

.ranking-item .country-population {
    text-align: right;
    color: rgba(255, 255, 255, 0.7);
}

.ranking-item:hover {
    background: rgba(0, 0, 0, 0.4);
}

.ranking-item.winner {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
}

.ranking-item.player {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.ranking-item .rank {
    font-size: 14px;
    font-weight: bold;
}

.ranking-item .country-name {
    font-weight: 600;
}

.ranking-item .country-score,
.ranking-item .country-population {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-align: right;
}

/* Utilidades */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .main-panel {
        flex-direction: column;
    }

    .main-panel > [class$="-panel"], .main-panel > .country-item {
        width: 100%;
        min-width: 0;
        margin-bottom: 20px;
    }

    .game-header {
        flex-direction: column;
        gap: 15px;
    }

    .stat-item {
        margin-bottom: 15px;
    }

    .dev-control {
        flex-direction: column;
    }

    .dev-btn {
        width: 100%;
        margin-bottom: 5px;
    }

    .country-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .country-header h2 {
        margin-bottom: 10px;
    }

    .country-info {
        justify-content: center;
    }

    .population-info {
        font-size: 14px;
        padding: 6px 10px;
    }

    .ranking-item {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 8px 15px;
        text-align: left;
    }

    .ranking-item .rank {
        grid-row: 1 / 3;
        grid-column: 1 / 2;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5em;
    }

    .ranking-item .country-name {
        grid-row: 1 / 2;
        grid-column: 2 / 3;
        text-align: left;
    }

    .ranking-item .country-score {
        grid-row: 2 / 3;
        grid-column: 2 / 3;
        text-align: left;
    }

    .ranking-item .country-population {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.7);
    }

    /* Panel del Ministerio de Guerra responsive */
    .war-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .war-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .war-stat-item {
        padding: 12px;
    }

    .war-stat-value {
        font-size: 16px;
    }

    .experience-stars {
        font-size: 10px;
    }

    .war-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
}

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

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

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

.pulse {
    animation: pulse 2s infinite;
}

/* Estados especiales */
.victory {
    animation: victoryPulse 2s infinite;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.notification.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-left: 4px solid #2E7D32;
}

.notification.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-left: 4px solid #c62828;
}

.notification.info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border-left: 4px solid #1565C0;
}

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

/* Efectos especiales */
.victory {
    animation: victoryPulse 2s infinite;
}

.modal-footer {
    padding: 20px;
    text-align: right;
}

/* Estilos para el nuevo modal de configuración */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #a7d1ff;
}

.input-group {
    display: flex;
}

.input-group input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
}

.input-group input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.input-group button {
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s ease;
}

.input-group button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.victory-content #victory-message {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Los botones del ministerio de guerra ahora usan la clase .war-btn para mayor coherencia */

/* --- Ministerio de Economía --- */

.economic-ministry-panel {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.economic-ministry-panel:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.economic-ministry-panel h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.economic-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

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

.economic-stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.economic-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    display: block;
}

.economic-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

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

.economic-section h4 {
    color: #a7d1ff;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

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

.industry-item, .infrastructure-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.industry-item:hover, .infrastructure-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.industry-header, .infrastructure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.industry-name, .infrastructure-name {
    font-weight: 600;
    color: #ffd700;
}

.industry-level {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.infrastructure-status {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
}

.infrastructure-status.built {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.economic-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.economic-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

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

/* Botones del Ministerio de Guerra - Coherente con el diseño del juego */
.war-btn {
    width: 100%;
    padding: 12px 15px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.war-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
    background: linear-gradient(135deg, #ff7a47, #f7a43e);
}

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

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

/* Variante especial para el botón de ataque */
.war-btn.attack {
    background: linear-gradient(135deg, #c62828, #e53935);
    font-size: 16px;
    padding: 15px 20px;
    box-shadow: 0 3px 10px rgba(198, 40, 40, 0.3);
}

.war-btn.attack:hover:not(:disabled) {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    box-shadow: 0 5px 15px rgba(198, 40, 40, 0.5);
    transform: translateY(-3px);
}

.war-cost {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
    text-align: center;
    font-style: italic;
}

.economic-cost {
    font-size: 12px;
    color: #ff6b6b;
    margin-bottom: 5px;
}

.economic-benefit {
    font-size: 12px;
    color: #90EE90;
    font-style: italic;
}

/* Estilos para inversiones */
.investment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.investment-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.investment-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.investment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.investment-name {
    font-weight: 600;
    color: #ffd700;
}

.investment-amount {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.investment-summary {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.summary-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-value {
    font-size: 16px;
    font-weight: bold;
    color: #4CAF50;
}

/* Estilos para desglose de finanzas */
.finance-breakdown {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.finance-breakdown .breakdown-section {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.finance-breakdown .breakdown-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.finance-breakdown h5 {
    color: #ffd700;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 5px;
}

.breakdown-item.total {
    font-weight: bold;
    color: #ffd700;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.breakdown-label {
    color: rgba(255, 255, 255, 0.8);
}

.breakdown-value {
    font-weight: 600;
}

.breakdown-value.positive {
    color: #90EE90; /* Verde pálido */
}

.breakdown-value.negative {
    color: #ff6b6b; /* Rojo pálido */
}

.breakdown-item.total .breakdown-value {
    color: #ffd700;
}

/* Responsive para el Ministerio de Economía */
@media (max-width: 768px) {
    .economic-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .economic-stat-item {
        padding: 12px;
    }
    
    .economic-stat-value {
        font-size: 16px;
    }
    
    .industries-grid, .infrastructure-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .industry-item, .infrastructure-item {
        padding: 12px;
    }
    
    .economic-btn {
        padding: 8px;
        font-size: 13px;
    }
}

/* Estilos para eventos financieros activos */
.financial-event-info {
    margin-top: 15px;
    padding: 10px;
    background: rgba(50, 205, 50, 0.1);
    border: 1px solid rgba(50, 205, 50, 0.3);
    border-radius: 8px;
    animation: pulse 2s infinite;
}

.financial-event-active {
    color: #32CD32;
    font-weight: bold;
}

.financial-event-active .summary-value {
    color: #32CD32;
    text-shadow: 0 0 5px rgba(50, 205, 50, 0.5);
}

.financial-event-info .summary-item {
    margin-bottom: 8px;
}

.financial-event-info .summary-item:last-child {
    margin-bottom: 0;
}

/* Estilos para multiplicadores de inversión */
.financial-event-info .summary-value {
    font-size: 0.9em;
    font-weight: 500;
}

/* Animación para eventos financieros activos */
@keyframes financialPulse {
    0% { 
        box-shadow: 0 0 5px rgba(50, 205, 50, 0.3);
    }
    50% { 
        box-shadow: 0 0 15px rgba(50, 205, 50, 0.6);
    }
    100% { 
        box-shadow: 0 0 5px rgba(50, 205, 50, 0.3);
    }
}

.financial-event-info {
    animation: financialPulse 3s infinite;
}

/* Estilos para eventos financieros negativos */
.financial-event-info.negative {
    background: rgba(255, 68, 68, 0.1);
    border-color: rgba(255, 68, 68, 0.3);
}

.financial-event-info.negative .financial-event-active {
    color: #ff4444;
}

.financial-event-info.negative .financial-event-active .summary-value {
    color: #ff4444;
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

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

.financial-event-info.negative {
    animation: financialPulseNegative 3s infinite;
}

/* Panel de Alertas */
.alerts-panel {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.alerts-panel:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.alerts-panel h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alerts-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.clear-alerts-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-alerts-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.alerts-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

.alert-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.alert-item.crisis {
    border-left-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.alert-item.opportunity {
    border-left-color: #32CD32;
    background: rgba(50, 205, 50, 0.1);
}

.alert-item.warning {
    border-left-color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.alert-item.info {
    border-left-color: #4488ff;
    background: rgba(68, 136, 255, 0.1);
}

.alert-item.success {
    border-left-color: #44ff44;
    background: rgba(68, 255, 68, 0.1);
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.alert-title {
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.alert-priority {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

.alert-priority.high {
    background: #ff4444;
    color: white;
}

.alert-priority.medium {
    background: #ffaa00;
    color: white;
}

.alert-priority.low {
    background: #4488ff;
    color: white;
}

.alert-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    line-height: 1.4;
}

.alert-action {
    font-size: 12px;
    color: #ffd700;
    font-style: italic;
    font-weight: 500;
}

/* Animación para nuevas alertas */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Estilos para alertas críticas con pulso */
.alert-item.crisis.high {
    animation: crisisPulse 2s infinite;
}

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

/* Estilos para alertas de oportunidad con brillo */
.alert-item.opportunity.high {
    animation: opportunityGlow 3s infinite;
}

@keyframes opportunityGlow {
    0% {
        box-shadow: 0 0 5px rgba(50, 205, 50, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(50, 205, 50, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(50, 205, 50, 0.3);
    }
}

/* Responsive para el panel de alertas */
@media (max-width: 768px) {
    .alerts-panel {
        margin-top: 15px;
        padding: 15px;
    }
    
    .alerts-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .alerts-list {
        max-height: 200px;
    }
    
    .alert-item {
        padding: 10px;
    }
    
    .alert-title {
        font-size: 13px;
    }
    
    .alert-message {
        font-size: 12px;
    }
}

/* Sinergias Militares */
.military-synergies {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.military-synergies h4 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.synergies-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.active-bonuses h5,
.available-synergies h5 {
    color: #32CD32;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.bonus-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(50, 205, 50, 0.1);
    border-radius: 6px;
    border-left: 3px solid #32CD32;
    margin-bottom: 5px;
}

.bonus-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.bonus-value {
    font-size: 13px;
    color: #32CD32;
    font-weight: 600;
}

.synergy-item {
    padding: 12px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ffd700;
    transition: all 0.3s ease;
}

.synergy-item:hover {
    background: rgba(255, 215, 0, 0.15);
    transform: translateX(3px);
}

.synergy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.synergy-name {
    font-size: 14px;
    color: #ffd700;
    font-weight: 600;
}

.synergy-type {
    font-size: 16px;
}

.synergy-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
    line-height: 1.4;
}

.synergy-bonus {
    font-size: 12px;
    color: #32CD32;
    font-weight: 500;
    font-style: italic;
}

.no-synergies {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.no-synergies p {
    margin-bottom: 8px;
    font-size: 13px;
}

.no-synergies p:last-child {
    margin-bottom: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive para sinergias militares */
@media (max-width: 768px) {
    .military-synergies {
        margin-top: 15px;
        padding: 12px;
    }
    
    .synergy-item {
        padding: 10px;
    }
    
    .synergy-name {
        font-size: 13px;
    }
    
    .synergy-description {
        font-size: 11px;
    }
    
    .bonus-item {
        padding: 6px 10px;
    }
    
    .bonus-name,
    .bonus-value {
        font-size: 12px;
    }
}

/* ===========================================
   MEJORAS CRÍTICAS PARA MÓVIL - TAMAÑOS TÁCTILES
   =========================================== */

/* Mejoras críticas para elementos táctiles */
@media (max-width: 768px) {
    
    /* CRÍTICO: Botones de desarrollo más grandes para táctil */
    .dev-btn {
        width: 48px !important;
        height: 48px !important;
        font-size: 20px !important;
        margin: 2px; /* Separación adicional entre botones */
    }
    
    /* CRÍTICO: Días del spinner más grandes para táctil */
    .day-spinner .day {
        width: 32px !important;
        height: 32px !important;
        margin-left: -16px !important;
        margin-top: -16px !important;
        font-size: 14px !important;
    }
    
    /* Ajustar el spinner contenedor */
    .day-spinner {
        width: 90px !important;
        height: 90px !important;
    }
    
    /* CRÍTICO: Botones de velocidad más grandes */
    .speed-btn {
        min-width: 48px !important;
        min-height: 44px !important;
        padding: 12px 14px !important;
        font-size: 16px !important;
    }
    
    /* CRÍTICO: Botones de control más grandes */
    .control-btn {
        padding: 15px 20px !important;
        font-size: 16px !important;
        min-height: 44px !important;
    }
    
    /* CRÍTICO: Botones económicos más accesibles */
    .economic-btn {
        padding: 15px !important;
        font-size: 16px !important;
        min-height: 48px !important;
    }
    
    /* CRÍTICO: Botones de guerra más grandes para móvil */
    .war-btn {
        padding: 15px 20px !important;
        font-size: 16px !important;
        min-height: 48px !important;
        margin-bottom: 12px !important;
    }
    
    /* Botón de ataque aún más prominente en móvil */
    .war-btn.attack {
        padding: 18px 25px !important;
        font-size: 18px !important;
        min-height: 52px !important;
    }
    
    /* CRÍTICO: Botones de batalla más accesibles */
    .battle-attack-btn {
        padding: 18px 30px !important;
        min-height: 48px !important;
        font-size: 16px !important;
    }
    
    /* CRÍTICO: Botón cerrar modal más grande */
    .close-btn {
        width: 48px !important;
        height: 48px !important;
        font-size: 28px !important;
    }
    
    /* CRÍTICO: Inputs más grandes para táctil */
    .input-group input {
        padding: 15px !important;
        font-size: 18px !important;
        min-height: 44px !important;
    }
    
    .input-group button {
        padding: 0 20px !important;
        font-size: 20px !important;
        min-height: 44px !important;
    }
    
    /* CRÍTICO: Botones principales de menú optimizados */
    .menu-btn {
        padding: 18px 35px !important;
        font-size: 18px !important;
        min-height: 50px !important;
    }
    
    /* CRÍTICO: Mejorar separación entre elementos táctiles */
    .stat-dev-control {
        gap: 15px !important;
    }
    
    .speed-controls {
        padding: 8px !important;
    }
    
    .game-actions {
        gap: 15px !important;
    }
    
    /* CRÍTICO: Agregar estados táctiles para mejor feedback */
    .dev-btn:active,
    .speed-btn:active,
    .control-btn:active,
    .economic-btn:active,
    .war-btn:active,
    .battle-attack-btn:active {
        transform: scale(0.95) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* Mejorar contraste para mejor visibilidad en móvil */
    .dev-btn {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
    }
    
    .dev-btn:hover,
    .dev-btn:active,
    .dev-btn:focus {
        background: #ffd700 !important;
        color: #1e3c72 !important;
        transform: scale(1.05) !important;
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.6) !important;
    }
}

/* Mejoras adicionales para pantallas muy pequeñas */
@media (max-width: 480px) {
    
    /* Para móviles muy pequeños, botones aún más grandes */
    .dev-btn {
        width: 52px !important;
        height: 52px !important;
        font-size: 22px !important;
    }
    
    .speed-btn {
        min-width: 52px !important;
        min-height: 48px !important;
        padding: 14px 16px !important;
    }
    
    /* Espaciado adicional en pantallas muy pequeñas */
    .stat-dev-control {
        gap: 20px !important;
    }
}

/* ===========================================
   MEJORAS CRÍTICAS PARA MÓVIL - LAYOUT RESPONSIVE
   =========================================== */

/* Optimización completa del header para móvil */
@media (max-width: 768px) {
    
    /* CRÍTICO: Header responsive mejorado - TODO CENTRADO EN MÓVIL */
    .game-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 25px !important;
        padding: 20px !important;
        text-align: center !important;
    }
    
    /* CENTRADO: Display de año/semana */
    .year-display {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    .year-label {
        font-size: 16px !important;
        margin-bottom: 5px !important;
    }
    
    .year-number {
        font-size: 36px !important;
        font-weight: bold !important;
    }
    
    .year-max {
        font-size: 14px !important;
        margin-top: 2px !important;
    }
    
    /* CENTRADO: Controles de tiempo completos */
    .time-controls {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 20px !important;
        width: 100% !important;
    }
    
    /* CENTRADO: Day spinner */
    .day-spinner {
        margin: 0 auto !important;
        display: block !important;
    }
    
    /* CENTRADO: Botones de velocidad */
    .speed-controls {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }
    
    /* CENTRADO: Botones de guardar/cargar */
    .game-actions {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
    }
    
    /* CRÍTICO: Grid de estadísticas optimizado para móvil */
    .stat-item {
        display: grid !important;
        grid-template-areas:
            "label label"
            "bar value"
            "control control" !important;
        grid-template-columns: 1fr auto !important;
        grid-template-rows: auto auto auto !important;
        gap: 12px !important;
        padding: 15px !important;
        text-align: center !important;
    }
    
    .stat-label {
        grid-area: label !important;
        text-align: center !important;
        font-size: 18px !important;
        margin-bottom: 5px !important;
    }
    
    .stat-bar {
        grid-area: bar !important;
        margin: 0 !important;
        height: 25px !important;
    }
    
    .stat-value {
        grid-area: value !important;
        font-size: 20px !important;
        margin-left: 15px !important;
    }
    
    .stat-dev-control {
        grid-area: control !important;
        justify-content: center !important;
    }
    
    /* CRÍTICO: Panel de país del jugador optimizado */
    .country-header {
        display: grid !important;
        grid-template-areas:
            "title"
            "info" !important;
        gap: 15px !important;
        text-align: center !important;
    }
    
    .country-header h2 {
        grid-area: title !important;
        margin-bottom: 0 !important;
        font-size: 28px !important;
    }
    
    .country-info {
        grid-area: info !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        justify-items: center !important;
    }
    
    .info-widget {
        padding: 12px 20px !important;
        font-size: 18px !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    /* CRÍTICO: Panel principal más fluido en móvil */
    .main-panel {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
    
    .side-panel {
        display: grid !important;
        gap: 20px !important;
    }
}

/* Mejoras adicionales para pantallas muy pequeñas */
@media (max-width: 480px) {
    
    /* Header aún más compacto y centrado */
    .game-header {
        padding: 15px !important;
        gap: 20px !important;
    }
    
    /* Centrado perfecto para pantallas muy pequeñas */
    .year-display {
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .year-label {
        font-size: 14px !important;
    }
    
    .year-number {
        font-size: 32px !important;
    }
    
    .year-max {
        font-size: 12px !important;
    }
    
    /* Controles de tiempo más compactos pero centrados */
    .time-controls {
        gap: 15px !important;
    }
    
    /* Botones de velocidad más pequeños pero centrados */
    .speed-controls {
        max-width: 250px !important;
        gap: 8px !important;
    }
    
    /* Botones de acción más compactos pero centrados */
    .game-actions {
        max-width: 240px !important;
        gap: 12px !important;
    }
    
    /* Estadísticas más compactas */
    .stat-item {
        padding: 12px !important;
        gap: 10px !important;
    }
    
    .stat-label {
        font-size: 16px !important;
    }
    
    .stat-bar {
        height: 20px !important;
    }
    
    .stat-value {
        font-size: 18px !important;
    }
    
    /* Info widgets más pequeños */
    .info-widget {
        padding: 10px 15px !important;
        font-size: 16px !important;
    }
    
    .country-header h2 {
        font-size: 24px !important;
    }
}

/* ===========================================
   MEJORAS CRÍTICAS PARA MÓVIL - PANELES ECONÓMICOS Y MILITARES
   =========================================== */

/* Optimización de paneles para móvil */
@media (max-width: 768px) {
    
    /* CRÍTICO: Ministerio de Guerra optimizado */
    .war-stats {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .war-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .war-stat-item {
        padding: 15px !important;
        text-align: center !important;
    }
    
    .war-stat-label {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }
    
    .war-stat-value {
        font-size: 20px !important;
    }
    
    /* Estrellas de experiencia en dos filas para móvil */
    .experience-stars {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        grid-template-rows: repeat(2, 1fr) !important;
        gap: 5px !important;
        justify-items: center !important;
        margin-top: 10px !important;
    }
    
    .experience-stars .star {
        font-size: 16px !important;
    }
    
    /* CRÍTICO: Ministerio de Economía optimizado */
    .economic-stats {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .economic-stat-item {
        padding: 15px !important;
    }
    
    .economic-stat-value {
        font-size: 20px !important;
    }
    
    .industries-grid,
    .infrastructure-grid,
    .investment-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .industry-item,
    .infrastructure-item,
    .investment-item {
        padding: 15px !important;
    }
    
    .industry-header,
    .infrastructure-header,
    .investment-header {
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
    }
    
    /* CRÍTICO: Modales optimizados para móvil */
    .modal-content {
        width: 95% !important;
        max-width: none !important;
        margin: 10px !important;
        padding: 20px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    
    .modal-header h2 {
        font-size: 22px !important;
    }
    
    .modal-body {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }
    
    /* CRÍTICO: Panel de otros países optimizado */
    .other-countries-panel {
        padding: 15px !important;
    }
    
    .country-item {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }
    
    .country-name {
        font-size: 18px !important;
        margin-bottom: 12px !important;
    }
    
    .country-rumor,
    .country-strength {
        font-size: 14px !important;
    }
    
    /* CRÍTICO: Panel de alertas optimizado */
    .alerts-panel {
        padding: 15px !important;
    }
    
    .alert-item {
        padding: 15px !important;
    }
    
    .alert-title {
        font-size: 16px !important;
    }
    
    .alert-message {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    
    /* CRÍTICO: Mejorar readabilidad de texto */
    .economic-cost,
    .economic-benefit {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
    
    .war-cost {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
    
    /* CRÍTICO: Botones de modal más accesibles */
    .continue-btn,
    .new-game-btn {
        padding: 18px !important;
        font-size: 18px !important;
        min-height: 50px !important;
    }
    
    /* CRÍTICO: Campos de entrada más grandes */
    input[type="text"] {
        font-size: 18px !important;
        padding: 15px !important;
        min-height: 44px !important;
    }
}

/* Optimizaciones adicionales para pantallas muy pequeñas */
@media (max-width: 480px) {
    
    /* Estadísticas económicas en una columna */
    .economic-stats {
        grid-template-columns: 1fr !important;
    }
    
    /* Modales aún más compactos */
    .modal-content {
        padding: 15px !important;
        margin: 5px !important;
        width: 98% !important;
    }
    
    .modal-header h2 {
        font-size: 20px !important;
    }
    
    /* Texto más grande para mejor legibilidad */
    .country-name {
        font-size: 16px !important;
    }
    
    .country-rumor,
    .country-strength {
        font-size: 13px !important;
    }
    
    /* Paneles más compactos */
    .war-ministry-panel,
    .economic-ministry-panel,
    .other-countries-panel,
    .alerts-panel {
        padding: 12px !important;
        margin-bottom: 15px !important;
    }
    
    /* Títulos de paneles más pequeños */
    .war-ministry-panel h3,
    .economic-ministry-panel h3,
    .other-countries-panel h3,
    .alerts-panel h3 {
        font-size: 18px !important;
        margin-bottom: 12px !important;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .main-panel {
        grid-template-columns: 1fr;
    }
} 