/* ===== Оверлей ===== */
#fortuneOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

/* ===== Контейнер ===== */
.fortune-content {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 24px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    text-align: center;
    color: #fff;
    /*box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);*/
    position: relative;
}

.fortune-title {
    font-size: 28px;
    margin: 0 0 20px;
    font-weight: 700;
}

/* ===== Колесо ===== */
.fortune-canvas-wrapper {
    position: relative;
    display: inline-block;
    margin: 10px auto;
}

#fortuneCanvas {
    display: block;
    margin: 0 auto;
    border-radius: 50%;
}

/* ===== Кнопка ===== */
#spinBtn {
    margin-top: 20px;
    padding: 15px 50px;
    font-size: 20px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    background: linear-gradient(135deg, #E74C3C, #C0392B);
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    /*box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);*/
}

#spinBtn:hover {
    transform: scale(1.05);
    /*box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);*/
}

#spinBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== Модальные блоки ===== */
.fortune-spin-again,
.fortune-result,
.fortune-register-form {
    padding: 20px;
}

.fortune-emoji {
    font-size: 80px;
    margin-bottom: 15px;
}

.fortune-content h2 {
    font-size: 32px;
    margin: 0 0 10px;
    color: #fff;
}

.fortune-subtitle {
    font-size: 18px;
    color: #bdc3c7;
    margin: 0 0 15px;
}

.fortune-prize {
    font-size: 28px;
    font-weight: 700;
    color: #F39C12;
    margin: 10px 0 20px;
}

.fortune-hint {
    color: #95a5a6;
    margin-bottom: 20px;
}

/* ===== Кнопки формы ===== */
.fortune-btn {
    padding: 14px 40px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 5px;
}

.fortune-btn:hover {
    transform: scale(1.03);
}

.fortune-btn-primary {
    background: linear-gradient(135deg, #3498DB, #2980B9);
    color: #fff;
    /*box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);*/
}

.fortune-btn-success {
    background: linear-gradient(135deg, #2ECC71, #27AE60);
    color: #fff;
    /*box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);*/
}

.fortune-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== Форма ===== */
.fortune-register-form form {
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
}

#registerForm .form-group {
    margin-bottom: 15px;
}

#registerForm .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #ecf0f1;
    font-size: 14px;
}

#registerForm .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #34495e;
    border-radius: 10px;
    background: #2c3e50;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

#registerForm .form-group input:focus {
    outline: none;
    border-color: #3498DB;
}

#registerForm .form-group input::placeholder {
    color: #7f8c8d;
}

/* ===== Сообщения ===== */
.fortune-message {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.fortune-message-error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.fortune-message-success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

/* ===== Адаптивность ===== */
@media (max-width: 600px) {
    .fortune-content {
        padding: 20px 15px;
        border-radius: 16px;
    }

    .fortune-title {
        font-size: 22px;
    }

    .fortune-content h2 {
        font-size: 24px;
    }

    .fortune-prize {
        font-size: 22px;
    }

    .fortune-emoji {
        font-size: 60px;
    }

    .fortune-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* ===== Кнопка закрытия ===== */
.fortune-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 100;
    padding: 0;
}

.fortune-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.fortune-close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}

@media (max-width: 480px) {
    .fortune-close-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
        top: 8px;
        right: 8px;
    }
}
