body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: none;
    width: 66vw;
    min-width: 320px;
    margin: auto;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10), 0 1.5px 6px rgba(0,0,0,0.07);
}

h1, h2 {
    color: #0056b3; /* Bleu foncé */
    text-align: center;
    margin-bottom: 20px;
}

.controls {
    text-align: center;
    margin-bottom: 20px;
}

button {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    border: none;
    padding: 12px 28px;
    margin: 8px 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,123,255,0.08);
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    outline: none;
    letter-spacing: 0.5px;
}

button:hover, button:focus {
    background: linear-gradient(90deg, #0056b3 0%, #007bff 100%);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 16px rgba(0,123,255,0.13);
}

#revealAnswerBtn {
    background: linear-gradient(90deg, #28a745 0%, #218838 100%);
    margin: 18px auto 0 auto;
    display: block;
    width: fit-content;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(40,167,69,0.08);
}

#revealAnswerBtn:hover, #revealAnswerBtn:focus {
    background: linear-gradient(90deg, #1e7e34 0%, #28a745 100%);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px rgba(40,167,69,0.13);
}


.question-card {
    background-color: #e9ecef;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #ced4da;
}

.question-card h2 {
    color: #495057;
    font-size: 1.8em; /* Plus grand pour la question */
}

#random-a-details .details-section {
    margin-bottom: 15px;
}

#random-a-details h4 {
    color: #007bff;
    margin-bottom: 5px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th {
    background-color: #007bff;
    color: white;
}

td .chinese {
    font-size: 1.2em;
    color: #c00; /* Rouge pour le chinois */
    margin-bottom: 5px;
}

td .pinyin {
    font-style: italic;
    color: #555;
    margin-bottom: 5px;
}

td .translation, #random-a-details .translation {
    font-size: 0.9em;
    color: #777;
}

td .placeholder {
    font-weight: bold;
    color: #007bff; /* Bleu pour les placeholders */
    background-color: #e6f2ff;
    padding: 2px 4px;
    border-radius: 3px;
}

#random-q-text {
    font-size: 1.8em;
    color: #c00; /* Rouge pour la question principale */
    margin-bottom: 15px;
}

#random-q-pinyin {
    display: block;
    text-align: center;
    font-style: italic;
    color: #555;
    font-size: 1.2em;
    margin-top: -10px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

#random-a-details .chinese {
    font-size: 1.4em;
    color: #c00;
    margin-bottom: 5px;
}
#random-a-details .pinyin {
    font-style: italic;
    color: #555;
    margin-bottom: 5px;
}

hr {
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        width: 96vw;
        padding: 10px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .container {
        width: 100vw;
        padding: 8px;
    }
    th, td {
        padding: 8px;
        font-size: 0.9em;
    }
    button {
        padding: 8px 15px;
        font-size: 14px;
    }
    h1 {
        font-size: 1.8em;
    }
    h2 {
        font-size: 1.5em;
    }
}