/* Diamond Fortune Slots - Современные стили */

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffd93d;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gold-gradient: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    --diamond-gradient: linear-gradient(45deg, #e3f2fd, #bbdefb, #90caf9, #64b5f6);
    --win-gradient: linear-gradient(45deg, #ff9a9e, #fecfef, #fecfef);
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 8px 25px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(255, 215, 0, 0.6);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--gradient-bg);
    color: var(--light-color);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Заставка загрузки */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader {
    text-align: center;
    color: white;
}

.diamond-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--diamond-gradient);
    transform: rotate(45deg);
    animation: spin 2s linear infinite;
    border-radius: 8px;
    position: relative;
}

.diamond-spinner::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 12px;
    animation: shine 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(45deg); }
    100% { transform: rotate(405deg); }
}

@keyframes shine {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.progress-bar {
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: var(--gold-gradient);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Основной контейнер игры */
.app-container {
    width: 100%;
    min-height: 100vh;
}

.game-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--gradient-bg);
    position: relative;
}

/* Заголовок */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.game-logo {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 900;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-logo i {
    -webkit-text-fill-color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.jackpot-display {
    text-align: center;
    padding: 15px 30px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glow);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.jackpot-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    opacity: 0.9;
}

.jackpot-amount {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: jackpot-glow 3s ease-in-out infinite;
}

@keyframes jackpot-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.8); }
    50% { text-shadow: 0 0 20px rgba(255, 215, 0, 1), 0 0 30px rgba(255, 215, 0, 0.5); }
}

.player-stats {
    display: flex;
    gap: 20px;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1.1rem;
}

.stat-item i {
    color: var(--accent-color);
}

.settings-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Основная игровая область */
.game-main {
    flex: 1;
    display: flex;
    gap: 30px;
    padding: 30px 40px;
}

.slot-machine-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Слот-машина */
.slot-machine {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-heavy);
    border: 3px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.slot-machine::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    pointer-events: none;
}

.machine-frame {
    background: linear-gradient(145deg, #1a252f, #2c3e50);
    border-radius: 15px;
    padding: 20px;
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.reels-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    background: #000;
    padding: 20px;
    border-radius: 10px;
    position: relative;
}

.reel {
    height: 240px; /* 3 символа * 80px = 240px */
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(180deg, #1a1a1a, #333);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.symbol-track {
    display: flex;
    flex-direction: column;
    transition: transform 0.1s ease-out;
    position: relative;
}

.symbol {
    height: 80px; /* Точная высота символа */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: var(--transition);
    flex-shrink: 0; /* Предотвращаем сжатие символов */
}

.symbol.winning {
    background: var(--win-gradient);
    box-shadow: 0 0 20px rgba(255, 154, 158, 0.8);
    animation: symbol-win 1s ease-in-out;
    transform: scale(1.1);
}

@keyframes symbol-win {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.symbol:hover {
    transform: scale(1.05);
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
}

/* Линии выплат */
.paylines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.payline {
    position: absolute;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 10px var(--accent-color);
}

.payline.active {
    opacity: 1;
    animation: payline-pulse 2s ease-in-out infinite;
}

@keyframes payline-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Эффекты победы */
.win-effects {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.fireworks {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="%23ffd700"/></svg>') no-repeat center;
    opacity: 0;
    animation: fireworks 2s ease-out;
}

@keyframes fireworks {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(2); }
    100% { opacity: 0; transform: scale(4); }
}

.coins-rain {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 215, 0, 0.1));
    opacity: 0;
}

.coins-rain.active {
    opacity: 1;
    animation: coins-fall 3s ease-out;
}

@keyframes coins-fall {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Панель управления */
.control-panel {
    background: linear-gradient(145deg, #34495e, #2c3e50);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-light);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.bet-controls {
    display: flex;
    gap: 30px;
    align-items: center;
}

.bet-section, .lines-section, .total-bet {
    text-align: center;
}

.bet-section label, .lines-section label, .total-bet label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.bet-input, .lines-input {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 25px;
    padding: 5px;
}

.bet-btn, .lines-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.bet-btn:hover, .lines-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.bet-amount, .lines-amount {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
    min-width: 50px;
    text-align: center;
}

.total-amount {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 211, 61, 0.5);
}

.action-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.game-btn {
    padding: 15px 25px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-btn.primary {
    background: linear-gradient(45deg, var(--primary-color), #ff5252);
    color: white;
    box-shadow: var(--shadow-light);
    font-size: 1.2rem;
    padding: 18px 35px;
}

.game-btn.secondary {
    background: linear-gradient(45deg, var(--secondary-color), #26a69a);
    color: white;
    box-shadow: var(--shadow-light);
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.game-btn:active {
    transform: translateY(0);
}

.game-btn.spinning {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    cursor: not-allowed;
    animation: spin-button 2s linear infinite;
}

@keyframes spin-button {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin-btn i {
    margin-right: 8px;
    transition: var(--transition);
}

.spin-btn.spinning i {
    animation: spin 1s linear infinite;
}

/* Боковые панели */
.side-panels {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bonus-panel, .achievements-panel {
    background: linear-gradient(145deg, #34495e, #2c3e50);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow-light);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.bonus-panel h3, .achievements-panel h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.bonus-progress {
    text-align: center;
    margin-bottom: 20px;
}

.progress-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--accent-color) 0deg, var(--accent-color) 216deg, rgba(255, 255, 255, 0.1) 216deg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    position: relative;
}

.progress-ring::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--dark-color);
}

.progress-value {
    font-family: 'Orbitron', monospace;
    font-weight: bold;
    color: var(--accent-color);
    z-index: 1;
}

.active-bonuses {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bonus-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    border-left: 4px solid var(--accent-color);
}

.achievement-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.achievement {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.achievement.unlocked {
    background: var(--gold-gradient);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.achievement:hover {
    transform: scale(1.1);
}

/* Подвал */
.game-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.game-info {
    display: flex;
    gap: 30px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.info-btn {
    background: linear-gradient(45deg, var(--secondary-color), #26a69a);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.info-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(145deg, #34495e, #2c3e50);
    border-radius: 15px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.7);
    transition: var(--transition);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.setting-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1.1rem;
}

.setting-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.setting-group select {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    font-size: 1rem;
    width: 100%;
}

/* Таблица выплат */
.paytable-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.paytable-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.paytable-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.paytable-symbol {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.paytable-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--accent-color);
}

.paytable-payouts {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Полноэкранные модальные окна */
.modal.fullscreen {
    padding: 0;
}

.modal.fullscreen .modal-content {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.bonus-game-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bonus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.bonus-header h2 {
    font-size: 2.5rem;
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(255, 211, 61, 0.8);
}

.bonus-winnings {
    font-size: 1.8rem;
    font-family: 'Orbitron', monospace;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.bonus-game-area {
    flex: 1;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .game-main {
        flex-direction: column;
    }
    
    .side-panels {
        width: 100%;
        flex-direction: row;
    }
    
    .reels-container {
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
    }
    
    .symbol {
        font-size: 2.5rem;
        height: 70px;
    }
}

@media (max-width: 768px) {
    .game-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .jackpot-display {
        order: -1;
    }
    
    .game-main {
        padding: 20px;
    }
    
    .control-panel {
        flex-direction: column;
        gap: 20px;
    }
    
    .bet-controls {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .reels-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .symbol {
        font-size: 2rem;
        height: 60px;
    }
    
    .side-panels {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .game-logo {
        font-size: 1.5rem;
    }
    
    .jackpot-amount {
        font-size: 1.4rem;
    }
    
    .symbol {
        font-size: 1.5rem;
        height: 50px;
    }
    
    .game-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* Анимации для улучшения UX */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3) rotate(-5deg); opacity: 0; }
    50% { transform: scale(1.05) rotate(2deg); }
    70% { transform: scale(0.9) rotate(-1deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.game-container {
    animation: fadeIn 0.8s ease-out;
}

.slot-machine {
    animation: slideIn 0.6s ease-out;
}

.side-panels > * {
    animation: bounceIn 0.8s ease-out;
}

/* Дополнительные эффекты */
.particle-effect {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    animation: particle-float 3s ease-out forwards;
}

@keyframes particle-float {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}

.glow-effect {
    box-shadow: 0 0 20px var(--accent-color), 0 0 40px var(--accent-color), 0 0 60px var(--accent-color);
}

/* Улучшенные переходы */
* {
    transition: var(--transition);
}

button, .game-btn, .bet-btn, .lines-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.symbol, .reel {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
