/* games/bible-challenge/style.css */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #2d3748;
    --text-light: #718096;
    --danger-color: #e53e3e;
    --success-color: #48bb78;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-wrapper {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 10; 
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stats-pill {
    background: var(--card-bg);
    padding: 8px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-soft);
    gap: 10px;
    font-weight: 600;
}
.heart-icon { color: var(--danger-color); }
.star-icon { color: #f6ad55; }
.attempt-icon { color: #4299e1; }
.divider { width: 1px; height: 15px; background: #e2e8f0; }

.btn-circle {
    background: var(--card-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    color: var(--text-light);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-circle:hover { transform: translateY(-2px); }

/* Bouton Ajout vie (+) */
.btn-add {
    background: var(--success-color);
    color: white; border: none; border-radius: 50%; width: 20px; height: 20px;
    line-height: 20px; font-size: 14px; margin-left: 5px; cursor: pointer;
}
.btn-add:hover { transform: scale(1.1); }

/* Game Container */
.game-container {
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    min-height: 650px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none;
    flex-direction: column;
    padding: 25px;
    height: 100%;
    flex: 1;
    position: relative; 
}
.screen.active { display: flex; }

/* Styles Pseudo et Header Dashboard */
.player-header {
    text-align: center;
    margin-bottom: 5px;
}
#user-pseudo-display {
    font-size: 1em;
    font-weight: 800;
    color: #5a67d8;
    background: #ebf8ff;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    letter-spacing: 1px;
}

.hero-section { text-align: center; margin-bottom: 20px; }
.hero-section h1 { margin: 0; font-size: 1.8em; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.action-area { margin-bottom: 20px; }
.big-btn {
    width: 100%; padding: 18px; border-radius: 16px; font-size: 1.2em; font-weight: 700;
    cursor: pointer; border: none; text-transform: uppercase; letter-spacing: 1px;
    background: var(--primary-gradient); color: white;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s;
}
.big-btn:hover { transform: translateY(-3px); }

.user-score-display {
    text-align: center; margin-bottom: 20px;
    background: #f7fafc; padding: 15px; border-radius: 12px; border: 1px solid #e2e8f0;
}
.score-label { display: block; font-size: 0.85em; color: var(--text-light); text-transform: uppercase; }
.score-value { font-size: 2em; font-weight: 800; color: #5a67d8; }

.stats-filters {
    display: flex; gap: 10px; margin-bottom: 15px;
}
.select-wrapper {
    flex: 1; position: relative;
    background: #edf2f7; border-radius: 8px;
}
.select-wrapper select {
    width: 100%; padding: 10px; background: transparent; border: none;
    appearance: none; font-weight: 600; color: var(--text-main); font-family: inherit;
    cursor: pointer;
}
.select-wrapper i {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    pointer-events: none; color: var(--text-light); font-size: 0.8em;
}

/* Zone Message Rang */
.rank-message-box {
    background-color: #f0fff4;
    border: 1px solid #c6f6d5;
    color: #2f855a;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9em;
    margin-bottom: 15px;
    font-weight: 600;
}

.leaderboard-container {
    flex: 1; overflow-y: auto;
    border: 1px solid #edf2f7; border-radius: 12px;
}
.leaderboard-table {
    width: 100%; border-collapse: collapse; font-size: 0.9em;
}
.leaderboard-table th {
    background: #f8fafc; color: var(--text-light); padding: 10px; text-align: left;
    position: sticky; top: 0; font-size: 0.8em; text-transform: uppercase;
}
.leaderboard-table td {
    padding: 12px 10px; border-bottom: 1px solid #edf2f7;
}
.leaderboard-table tr:last-child td { border-bottom: none; }

/* Game Screen */
.verse-ref-display {
    background: #ebf8ff; color: #2b6cb0; padding: 8px 16px;
    border-radius: 50px; display: inline-block; font-weight: 700;
    margin-bottom: 10px;
}
.question-prompt { font-size: 1.1em; line-height: 1.5; margin-top: 0; }

.answers-grid { display: grid; gap: 15px; }
.answer-btn {
    background: white; border: 2px solid #e2e8f0; padding: 20px;
    border-radius: 16px; font-size: 1em; text-align: left; cursor: pointer;
    font-family: inherit; transition: all 0.2s; color: var(--text-main);
}
.answer-btn:hover { border-color: #667eea; background: #f7fafc; }
.answer-btn.correct { background: var(--success-color); border-color: var(--success-color); color: white; }
.answer-btn.wrong { background: var(--danger-color); border-color: var(--danger-color); color: white; animation: shake 0.5s; }

/* Timer */
.timer-wrapper { margin-bottom: 25px; }
.progress-bar-bg { height: 10px; background: #edf2f7; border-radius: 10px; overflow: hidden; }
#timer-bar { height: 100%; background: linear-gradient(90deg, #f6d365, #fda085); width: 100%; transition: width 0.1s linear; }
.timer-info { display: flex; justify-content: space-between; font-weight: bold; margin-bottom: 5px; }

/* Bouton Suivant Flottant */
.floating-next-btn {
    position: absolute;
    top: 200px;
    right: 20px;
    padding: 12px 25px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.5);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.floating-next-btn:hover { transform: translateY(-2px); }
.floating-next-btn.hidden { display: none !important; }

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.pulse-animation { animation: pulse 2s infinite; }
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

.floating-bubble {
    position: fixed;
    font-weight: 800;
    font-size: 1.8em;
    pointer-events: none;
    animation: floatUpFade 1.5s ease-out forwards;
    z-index: 10000;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.9);
    padding: 5px 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.floating-bubble.gain { color: #48bb78; }
.floating-bubble.loss { color: #e53e3e; }

@keyframes floatUpFade {
    0% { opacity: 1; transform: translateY(0) scale(0.8); }
    50% { transform: translateY(-30px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-60px) scale(1); }
}

#fireworks-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 5;
}
.firework-particle {
    position: absolute; width: 8px; height: 8px; border-radius: 50%;
    animation: explode 1s ease-out forwards;
}
@keyframes explode {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

.hidden { display: none !important; }
#modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center; z-index: 1000;
}
.modal-card {
    background: white; padding: 30px; border-radius: 20px;
    text-align: center; width: 85%; max-width: 350px;
    box-shadow: 0 20px 25px rgba(0,0,0,0.2);
}
.modal-buttons {
    display: flex; justify-content: center; gap: 10px; margin-top: 20px;
}
.modal-buttons button {
    padding: 10px 25px; border-radius: 10px;
    border: none; background: var(--primary-gradient); color: white;
    font-weight: 600; cursor: pointer; min-width: 100px;
}
.modal-buttons button.btn-secondary { background: #e53e3e; }

/* Loader Overlay */
.loader-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color); z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.5s ease; pointer-events: none; opacity: 0;
}
.loader-overlay.active { pointer-events: all; opacity: 1; }
.loader-content { text-align: center; width: 80%; max-width: 300px; }
.loader-bar-bg { width: 100%; height: 15px; background: #e2e8f0; border-radius: 10px; overflow: hidden; margin: 15px 0; }
.loader-bar-fill { height: 100%; background: var(--primary-gradient); width: 0%; transition: width 0.3s; }

/* Paiement Modal Styles */
#payment-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center; z-index: 1100;
}
.payment-card-wrapper {
    background: white; padding: 30px; border-radius: 20px;
    width: 90%; max-width: 400px; text-align: center; position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.close-payment-btn {
    position: absolute; top: 10px; right: 15px; background: none; border: none;
    font-size: 24px; cursor: pointer; color: #718096;
}
.plans-container { display: flex; gap: 15px; margin: 25px 0; justify-content: center; }
.plan-card {
    border: 2px solid #e2e8f0; border-radius: 15px; padding: 15px; flex: 1;
    position: relative; transition: transform 0.2s;
}
.plan-card:hover { transform: translateY(-5px); border-color: #667eea; }
.plan-card.popular { border-color: #667eea; background: #f0f4ff; }
.badge-pop {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: #667eea; color: white; font-size: 10px; padding: 2px 8px;
    border-radius: 10px; text-transform: uppercase; font-weight: bold;
}
.plan-lives { font-size: 1.1em; font-weight: 800; color: #2d3748; margin-bottom: 5px; }
.plan-price { font-size: 1.5em; color: #667eea; font-weight: 600; margin-bottom: 15px; }
.btn-buy {
    width: 100%; padding: 10px; border-radius: 8px; border: none;
    background: var(--text-main); color: white; font-weight: 600; cursor: pointer;
}
.plan-card.popular .btn-buy { background: var(--primary-gradient); }
.secure-info { font-size: 0.8em; color: #718096; margin-top: 15px; }