/* ===== VARIABLES & RESET ===== */
:root {
    --primary-color: #ff6b9d;
    --secondary-color: #c44569;
    --accent-color: #ffa07a;
    --bg-gradient-1: #fff5f7;
    --bg-gradient-2: #ffe8ec;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --card-bg: #ffffff;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.15);
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
    color: var(--text-dark);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* ===== ÉCRANS ===== */
.screen {
    display: none;
    width: 100%;
    max-width: 600px;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ÉCRAN DE CONNEXION ===== */
.login-container {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 50px 35px;
    box-shadow: var(--shadow);
    text-align: center;
}

.app-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 35px;
}

.login-prompt {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 500;
}

.user-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-user {
    padding: 20px 30px;
    font-size: 1.2rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-arthur {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-arthur:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-lydie {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-lydie:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.5);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

input[type="text"],
textarea {
    padding: 15px 20px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
    -webkit-appearance: none;
}

input[type="text"]:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.login-hint {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== BOUTONS ===== */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== ÉCRAN DE JEU ===== */
.game-container {
    width: 100%;
}

.header {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
}

.welcome {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.history-link {
    position: absolute;
    top: 25px;
    right: 30px;
    text-decoration: none;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 15px;
    border-radius: 20px;
    background: rgba(255, 107, 157, 0.1);
}

.history-link:hover {
    background: rgba(255, 107, 157, 0.2);
    transform: translateY(-2px);
}

.section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.section.hidden {
    display: none;
}

/* ===== ROUE ===== */
.wheel-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto 30px;
}

.wheel {
    width: 100%;
    height: 100%;
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--secondary-color);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ===== QUESTION ===== */
.question-card {
    text-align: center;
    margin-bottom: 30px;
}

.theme-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-Fun {
    background: linear-gradient(135deg, #ffd93d, #ff9f43);
    color: white;
}

.theme-Deep {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
}

.theme-Couple {
    background: linear-gradient(135deg, #fd79a8, #fab1a0);
    color: white;
}

.theme-Spicy {
    background: linear-gradient(135deg, #ff6348, #ff4757);
    color: white;
}

.question-text {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-dark);
    font-weight: 600;
}

/* ===== RÉPONSES ===== */
.answer-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.reveal-section {
    margin-top: 30px;
}

.reveal-title {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.answer-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    transition: var(--transition);
}

.answer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.answer-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.answer-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.answer-content {
    color: var(--text-dark);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ===== COUNTDOWN ===== */
.countdown-section {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    border-radius: 15px;
    animation: fadeIn 0.3s ease;
}

.countdown-text {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 500;
}

#countdownNumber {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    min-width: 30px;
    animation: pulse 1s infinite;
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

.notification.error {
    background: #ff4757;
    color: white;
}

.notification.success {
    background: #2ecc71;
    color: white;
}

.notification.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    body {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }

    .login-container {
        padding: 35px 25px;
    }

    .app-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }

    .btn-user {
        padding: 18px 25px;
        font-size: 1.1rem;
    }

    .header {
        padding: 20px;
        margin-bottom: 15px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .history-link {
        position: static;
        align-self: center;
        margin-top: 5px;
    }

    .welcome {
        font-size: 1.2rem;
    }

    .section {
        padding: 25px 20px;
        margin-bottom: 15px;
    }

    .wheel-container {
        width: 180px;
        height: 180px;
        margin-bottom: 20px;
    }

    .btn-large {
        padding: 15px 30px;
        font-size: 1rem;
        width: 100%;
    }

    .question-text {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .theme-badge {
        padding: 6px 15px;
        font-size: 0.8rem;
    }

    textarea {
        min-height: 80px;
        font-size: 1rem;
    }

    .answer-card {
        padding: 15px;
    }

    .answer-name {
        font-size: 1rem;
    }

    .reveal-title {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        text-align: center;
    }
}

@media (max-width: 380px) {
    .app-title {
        font-size: 1.7rem;
    }

    .wheel-container {
        width: 160px;
        height: 160px;
    }

    .question-text {
        font-size: 1rem;
    }
}

/* Support for notch/safe areas on iOS */
@supports (padding: max(0px)) {
    body {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
}

/* ===== ANIMATIONS SUPPLÉMENTAIRES ===== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}
