/* CSS для игры Towers */

.towers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

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

.towers-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.towers-subtitle {
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-bottom: 10px;
}

.towers-balance {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.towers-balance span {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.towers-balance b {
    color: #10b981;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Панель настроек игры */
.towers-settings {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.settings-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.settings-group {
    flex: 1;
    min-width: 200px;
}

.settings-label {
    display: block;
    font-size: 0.9rem;
    color: #b0b0b0;
    margin-bottom: 8px;
    font-weight: 500;
}

.settings-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.settings-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.difficulty-buttons {
    display: flex;
    gap: 10px;
}

.difficulty-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

.difficulty-btn.active {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.2);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
}

.start-game-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.start-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
}

.start-game-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}



/* Игровое поле */
.towers-game {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-info-item {
    text-align: center;
}

.game-info-label {
    font-size: 0.8rem;
    color: #b0b0b0;
    margin-bottom: 5px;
}

.game-info-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
}

.current-multiplier {
    color: #10b981;
    font-size: 1.5rem;
}

/* Башня */
.towers-tower {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-bottom: 30px;
}

.tower-level {
    display: flex;
    gap: 8px;
    align-items: center;
}

.level-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid transparent;
}

.level-number.current {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.2);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.4);
}

.level-number.completed {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.tower-tiles {
    display: flex;
    gap: 8px;
}

.tower-tile {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    overflow: hidden;
}

.tower-tile:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tower-tile.selected {
    background: rgba(16, 185, 129, 0.3);
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.tower-tile.bomb {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.tower-tile.bomb::before {
    content: "💣";
    font-size: 1.5rem;
}

.tower-tile.selected::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    font-size: 1.5rem;
}

.tower-tile.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Кнопки управления */
.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.cash-out-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cash-out-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.new-game-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4);
}

/* Модальные окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
}

.modal-message {
    font-size: 1rem;
    color: #b0b0b0;
    margin-bottom: 25px;
    line-height: 1.5;
}

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

.modal-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
}

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

.modal-btn:hover {
    transform: translateY(-2px);
}

/* Анимации */
@keyframes tileSelect {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.tower-tile.selected {
    animation: tileSelect 0.3s ease;
}

@keyframes bombExplode {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.tower-tile.bomb {
    animation: bombExplode 0.5s ease;
}

/* Адаптивность */
@media (max-width: 768px) {
    .towers-container {
        padding: 15px;
    }
    
    .towers-title {
        font-size: 2rem;
    }
    
    .settings-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .settings-group {
        min-width: auto;
    }
    
    .game-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .tower-tiles {
        gap: 5px;
    }
    
    .tower-tile {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .game-controls {
        flex-direction: column;
    }
}

/* Скрытие элементов */
.hidden {
    display: none !important;
}

/* Состояния загрузки */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* История игр */
.towers-history {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.towers-history h3 {
    margin: 0 0 15px 0;
    color: #ffffff;
    font-size: 1.2rem;
    text-align: center;
}

.towers-history-list {
    max-height: 300px;
    overflow-y: auto;
}

.towers-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.history-game-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-difficulty {
    font-size: 0.8rem;
    color: #b0b0b0;
    text-transform: uppercase;
}

.history-status {
    font-size: 0.9rem;
    font-weight: 600;
}

.history-amounts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.history-bet {
    font-size: 0.8rem;
    color: #b0b0b0;
}

.history-payout {
    font-size: 0.9rem;
    font-weight: 600;
}

.history-payout:not(:empty) {
    color: #10b981;
}

.loading {
    text-align: center;
    color: #b0b0b0;
    font-style: italic;
} 