:root {
    --primary-color: #07111c;
    --secondary-color: #0d1a2d;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #07111c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --card-shadow: 0 10px 20px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #07111c 0%, #0d1a2d 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 600px;
    background: linear-gradient(145deg, #0d1a2d 0%, #07111c 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255,255,255,0.1);
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    background: linear-gradient(145deg, #0d1a2d 0%, #07111c 100%);
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 20px;
    color: white;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
    margin-top: 20px;
}

.elegant-btn {
    background: linear-gradient(145deg, #1a2a3a 0%, #07111c 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    font-family: 'Roboto', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.1);
}

.elegant-btn:hover {
    background: linear-gradient(145deg, #233344 0%, #0d1a2d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.3);
}

.elegant-btn:active {
    transform: translateY(0);
}

.back-btn {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    margin-top: 20px;
}

.back-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

input {
    padding: 12px 15px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
    color: white;
}

input::placeholder {
    color: rgba(255,255,255,0.7);
}

input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3);
}

/* Animation des cartes */
.card-animation {
    position: relative;
    width: 200px;
    height: 120px;
    margin-bottom: 30px;
}

.card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #1a2a3a 0%, #0d1a2d 100%);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    transform-origin: bottom center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    border: 1px solid rgba(255,255,255,0.1);
}

.card:nth-child(1) {
    transform: rotate(-5deg) translateY(0);
    animation: float 3s ease-in-out infinite;
    z-index: 3;
    background: url('../images/logo/nzebi.png') no-repeat center center;
    background-size: cover;
}

.card:nth-child(2) {
    transform: rotate(5deg) translateY(10px);
    background: linear-gradient(145deg, #2a3a4a 0%, #1d2b3d 100%);
    animation: float 3.5s ease-in-out infinite 0.5s;
    z-index: 2;
}

.card:nth-child(3) {
    transform: rotate(0deg) translateY(20px);
    background: linear-gradient(145deg, #3a4a5a 0%, #2d3b4d 100%);
    animation: float 4s ease-in-out infinite 1s;
    z-index: 1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-20px) rotate(-5deg);
    }
}

/* Écran de sélection de pays */
.country-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    margin-bottom: 30px;
}

.country-card {
    background: linear-gradient(145deg, #1a2a3a 0%, #0d1a2d 100%);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255,255,255,0.1);
}

.country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.3);
}

.country-card h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

.country-card p {
    color: rgba(255,255,255,0.8);
}

/* Cartes d'état */
.state-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
    width: 100%;
    padding: 10px;
}

.state-card {
    width: 120px;
    height: 180px;
    background: linear-gradient(145deg, #1a2a3a 0%, #0d1a2d 100%);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.state-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.state-card .state-flag {
    width: 80px;
    height: 50px;
    background-size: cover;
    background-position: center;
    border-radius: 5px;
    margin-bottom: 10px;
    background-color: rgba(255,255,255,0.1);
}

.state-card .state-name {
    font-size: 1rem;
    text-align: center;
    font-weight: bold;
}

.state-card.selected {
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
}

/* Écran de sélection de catégorie */
.category-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    margin-bottom: 30px;
}

.category-card {
    background: linear-gradient(145deg, #1a2a3a 0%, #0d1a2d 100%);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.category-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.category-card h3 {
    margin: 0;
    color: white;
}

/* Écran de jeu */
.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.user-info {
    display: flex;
    flex-direction: column;
    color: white;
}

.score-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 5px;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    width: 0%;
    transition: width 0.5s ease;
}

.question-container {
    width: 100%;
    text-align: center;
}

.question-card {
    background: linear-gradient(145deg, #1a2a3a 0%, #0d1a2d 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.question-card::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 20px;
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    background-size: 400%;
    z-index: -1;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.question-card:hover::before {
    opacity: 0.3;
    animation: animate 20s linear infinite;
}

@keyframes animate {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 400% 0;
    }
    100% {
        background-position: 0 0;
    }
}

#question-category {
    color: var(--accent-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
}

.answers-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
}

.answer-btn {
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: left;
    font-size: 1rem;
    color: white;
}

.answer-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.answer-btn.correct {
    background-color: var(--success-color);
    color: white;
    border-color: transparent;
}

.answer-btn.incorrect {
    background-color: var(--error-color);
    color: white;
    border-color: transparent;
}

.hidden {
    display: none;
}

/* Écran de résultats */
.results-card {
    background: linear-gradient(145deg, #1a2a3a 0%, #0d1a2d 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 500px;
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.result-stats {
    margin: 30px 0;
}

#final-score {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Paramètres */
.settings-option {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
}

.settings-option input {
    margin-right: 10px;
    width: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .app-container {
        height: auto;
        min-height: 100vh;
        border-radius: 0;
    }
    
    .country-cards, .category-cards {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}

/* Police chinoise */
.chinese-font {
    font-family: 'Noto Sans SC', sans-serif;
}

/* Animation de transition entre écrans */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInFromRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}






.state-card {
    position: relative;
    transition: all 0.3s ease;
}

.state-card.disabled {
    opacity: 0.6;
    filter: grayscale(50%);
}

.no-questions-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.error-message {
    text-align: center;
    padding: 20px;
    color: #ff4757;
}