* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a0a0a 0%, #4a0000 100%);
    min-height: 100vh;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

/* Улучшение касаний на мобильных */
button, .bet-btn, .link, .game-card {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

/* Минимальный размер для удобного нажатия */
button, .bet-btn, .play-button, .spin-button {
    min-height: 44px;
    min-width: 44px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Шапка */
.header {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #b8860b 0%, #ffd700 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.header h1 {
    font-size: 3em;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    color: #1a0a0a;
    margin-bottom: 10px;
}

.promo {
    font-size: 1.5em;
    color: #ff0000;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    animation: pulse 2s infinite;
}

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

/* Панель пользователя */
.user-panel {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.user-name, .user-balance {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1em;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn, .back-btn {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.logout-btn:hover, .back-btn:hover {
    transform: scale(1.05);
}

/* Авторизация */
.auth-container {
    max-width: 500px;
    margin: 0 auto;
}

.auth-form {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.3) 0%, rgba(255, 215, 0, 0.2) 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #ffd700;
    font-size: 2em;
}

.auth-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #ffd700;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1em;
}

.auth-form input::placeholder {
    color: #ccc;
}

.auth-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
    border: none;
    border-radius: 10px;
    color: #1a0a0a;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    margin-bottom: 15px;
}

.auth-button:hover {
    transform: scale(1.02);
}

.bonus-hint {
    text-align: center;
    color: #4caf50;
    font-size: 0.95em;
    margin: -10px 0 15px 0;
    font-weight: bold;
}

.switch-form {
    text-align: center;
    margin-top: 15px;
}

.link {
    color: #ffd700;
    cursor: pointer;
    text-decoration: underline;
}

.link:hover {
    color: #ffed4e;
}

.error-message {
    color: #ff4444;
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

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

.modal-content {
    background: linear-gradient(135deg, #1a0a0a 0%, #4a0000 100%);
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 3px solid #ffd700;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
    animation: slideDown 0.5s;
}

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

.modal-content h2 {
    text-align: center;
    color: #ffd700;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.welcome-info {
    text-align: center;
    margin-bottom: 30px;
}

.success-text {
    font-size: 1.3em;
    color: #4caf50;
    margin-bottom: 15px;
}

.bonus-text {
    font-size: 1.5em;
    color: #ffd700;
}

.extra-bonus {
    color: #4caf50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.bonus-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.feature-item {
    background: rgba(255, 215, 0, 0.1);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #ffd700;
    text-align: center;
}

.cta-button {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
    border: none;
    border-radius: 15px;
    color: #1a0a0a;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    margin-bottom: 20px;
}

.cta-button:hover {
    transform: scale(1.05);
}

.disclaimer {
    text-align: center;
    color: #999;
    font-size: 0.9em;
}

/* Список игр */
.games-container {
    text-align: center;
}

.games-container h2 {
    color: #ffd700;
    font-size: 2.5em;
    margin-bottom: 40px;
}

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

.game-card {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.3) 0%, rgba(255, 215, 0, 0.2) 100%);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid #ffd700;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}

.game-icon {
    font-size: 5em;
    margin-bottom: 15px;
}

.game-card h3 {
    color: #ffd700;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.game-card p {
    color: #ccc;
    margin-bottom: 15px;
}

.game-stats {
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 20px;
}

.play-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.play-button:hover {
    transform: scale(1.05);
}

.promo-banner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(184, 134, 11, 0.3) 100%);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid #ffd700;
}

.promo-banner p {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.bonus-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
    border: none;
    border-radius: 15px;
    color: #1a0a0a;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

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

/* Игровой контейнер */
.game-container {
    max-width: 800px;
    margin: 0 auto;
}

.info-panel {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    background: rgba(255, 215, 0, 0.1);
    padding: 20px;
    border-radius: 15px;
}

.bet-control, .win-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.bet-control select {
    padding: 10px 20px;
    border: 2px solid #ffd700;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
}

.win-amount {
    color: #4caf50;
    font-size: 1.5em;
    font-weight: bold;
}

/* Слот-машина */
.slot-machine {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(184, 134, 11, 0.3) 100%);
    padding: 40px;
    border-radius: 20px;
    border: 3px solid #ffd700;
    margin-bottom: 30px;
}

.slots {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.slot {
    width: 150px;
    height: 150px;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #ffd700;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.slot-inner {
    font-size: 5em;
    animation: spinSlot 0.5s ease-in-out;
}

@keyframes spinSlot {
    0% { transform: translateY(-200px); opacity: 0; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}

.spin-button {
    width: 100%;
    padding: 25px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

.spin-button:hover:not(:disabled) {
    transform: scale(1.05);
}

.spin-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.win-message {
    text-align: center;
    font-size: 1.8em;
    font-weight: bold;
    min-height: 50px;
    margin-bottom: 20px;
    color: #4caf50;
}

.paytable {
    background: rgba(255, 215, 0, 0.1);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

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

.paytable p {
    margin: 5px 0;
    font-size: 1.1em;
}

/* Перенос длинных текстов */
.user-name, .user-balance, td, .info-item .value, input[type="email"], input[type="text"], input[type="tel"] {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Адаптивность */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 10px;
    }

    .header {
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 1.8em;
        word-break: break-word;
    }
    
    .promo {
        font-size: 1em;
    }

    /* Панель пользователя */
    .user-panel {
        flex-direction: column;
        gap: 10px;
        font-size: 0.9em;
    }

    .user-name, .user-balance {
        padding: 8px 15px;
        font-size: 1em;
    }

    /* Формы */
    .auth-container {
        padding: 0;
    }

    .auth-form {
        padding: 25px 20px;
    }

    .auth-form h2 {
        font-size: 1.5em;
    }

    .auth-form input {
        padding: 12px;
        font-size: 16px; /* Предотвращает зум на iOS */
    }

    .auth-button {
        padding: 12px;
        font-size: 1em;
    }

    /* Модальные окна */
    .modal-content {
        width: 95%;
        padding: 25px 20px;
        max-height: 85vh;
    }

    .modal-content h2 {
        font-size: 1.8em;
    }

    .success-text {
        font-size: 1.1em;
    }

    .bonus-text {
        font-size: 1.2em;
    }

    .bonus-features {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .feature-item {
        padding: 12px;
        font-size: 0.9em;
    }

    .cta-button {
        padding: 15px;
        font-size: 1.2em;
    }
    
    /* Список игр */
    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .game-card {
        padding: 25px 20px;
    }

    .game-icon {
        font-size: 4em;
    }

    .game-card h3 {
        font-size: 1.5em;
    }

    /* Игровой контейнер */
    .game-container {
        padding: 0;
    }

    .info-panel {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .bet-control select {
        padding: 10px 15px;
        font-size: 1em;
    }

    /* Слоты */
    .slot-machine {
        padding: 25px 15px;
    }

    .slots {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .slot {
        width: 120px;
        height: 120px;
    }

    .slot-inner {
        font-size: 4em;
    }

    .spin-button {
        padding: 18px;
        font-size: 1.4em;
    }

    .win-message {
        font-size: 1.3em;
    }

    .paytable {
        padding: 15px;
        font-size: 0.85em;
    }

    .paytable p {
        font-size: 0.95em;
        line-height: 1.6;
    }

    /* Прокрутка */
    .slots {
        overflow-x: hidden;
    }
}

