/* Variables CSS para colores y estilos */
:root {
    /* Colores relacionados con bambú */
    --bamboo-dark: #4A6B3D;
    --bamboo-medium: #6B8E23;
    --bamboo-light: #9ABC7E;
    --bamboo-pale: #C9D9B0;
    
    /* Colores amarillos pastel */
    --yellow-pastel: #FFF9C4;
    --yellow-light: #FFFDE7;
    
    /* Colores para botones y elementos interactivos */
    --button-primary: #8BC34A;
    --button-hover: #7CB342;
    --button-active: #689F38;
    
    /* Colores para feedback */
    --success-color: #8dd990;
    --error-color: #e0766e;
    --warning-color: #f5dc90;
    
    /* Sombras */
    --shadow-light: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bamboo-pale);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Barra superior */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--bamboo-medium);
    color: white;
    box-shadow: var(--shadow-medium);
    position: relative;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.2s;
}
.logo-container:hover {
    opacity: 0.8;
}

.logo {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.app-title {
    font-size: 1.2rem;
    font-weight: bold;
}

.header-stats {
    display: none;
    gap: 0.8rem;
    font-size: 0.9rem;
    margin-left: auto; /* Esto empujará las estadísticas a la derecha */
    margin-right: 1rem; /* Espacio a la derecha */
}
.header-stats.visible {
    display: flex;
}
.settings-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.settings-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Contenido principal */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.screen {
    display: none;
    flex-direction: column;
    padding: 1rem;
    height: 100%;
    overflow-y: auto;
}

.screen.active {
    display: flex;
}

/* Pantalla de Menú */
.menu-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 0;
}

.menu-btn {
    display: flex;
    align-items: center;
    background-color: var(--yellow-pastel);
    border: none;
    border-radius: 12px;
    padding: 1rem 1.4rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-light);
    text-align: center;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.menu-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-light);
}

.menu-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

/* Pantalla de Configuración */
.settings-container {
    background-color: var(--yellow-light);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    align-items: center;
    box-shadow: var(--shadow-light);
}

.settings-container h2 {
    margin-bottom: 1rem;
    text-align: center;
    color: var(--bamboo-dark);
}

/* Modificar estilos de setting-group */
.setting-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: 0.2rem;
    padding: 0.2rem 0;
    width: 100%; 
    min-width: 0;
    flex: 0 0 auto;
    /*border-bottom: 1px solid var(--bamboo-light);*/
}

.setting-group label {
    margin-bottom: 0;
    flex: 1;
}
.label-fixed-width {
    display: inline-block;
    width: 60px; /* Ancho deseado */
    min-width: 60px;
    text-align: right;
    margin-right: 0rem;
    vertical-align: middle;
}

.setting-group .ios-switch {
    margin-left: 1rem;
}

.setting-group input[type="range"],
.setting-group select {
    width: 90%;
    margin-left: 1rem;
}

/* Para móviles */
@media (max-width: 768px) {
    .setting-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .setting-group .ios-switch,
    .setting-group input[type="range"],
    .setting-group select {
        margin-left: 0;
        margin-top: 0.2rem;
        align-items: center;
    }
}

.settings-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.action-btn {
    padding: 0.8rem 0.5rem;
    border: none;
    border-radius: 8px;
    background-color: var(--button-primary);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    flex: 1;
}

.action-btn:hover {
    background-color: var(--button-hover);
}

.action-btn:active {
    background-color: var(--button-active);
}

/* Pantalla de Review */
.review-container {
    background-color: var(--yellow-light);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 70%;
    max-width: 100%;
    margin: 0 auto;
    box-shadow: var(--shadow-light);
}

.review-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--bamboo-dark);
}
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.review-header h2 {
    margin: 0;
    color: var(--bamboo-dark);
    flex: 1;
    min-width: 150px;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-bottom: 1rem;
}

.review-item {
    background-color: white;
    padding: 0.2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-word {
    font-size: 1rem;
    line-height: 1.7;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.review-ch {
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    font-weight: normal; /* No negrita */
    font-size: 1.3em;
}

.review-pin {
    color: #999; /* Gris 60% */
    font-weight: normal;
    font-size: 1.0em;
}

.review-trans {
    color: #0066cc; /* Azul */
    font-style: italic;
    font-weight: normal;
    font-size: 1.0em;
}

.percentage-text {
    color: #666; /* Gris 40% */
    font-size: 0.85em;
    font-weight: normal;
}

/* Para móviles */
@media (max-width: 768px) {
    .review-word {
        font-size: 1rem;
        gap: 0.2rem;
    }
    
    .review-ch {
        font-size: 1.1em;
    }
    
    .review-pin,
    .review-trans,
    .percentage-text {
        font-size: 1em;
    }
}
.review-stats {
    color: #666;
    font-size: 0.9rem;
}
/* Estilos para los filtros */
.review-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    justify-content: center;
}

.toggle-btn {
    padding: 0.25rem 0.5rem;
    border: 2px solid var(--bamboo-medium);
    background-color: white;
    color: var(--bamboo-dark);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.toggle-btn.active {
    background-color: var(--bamboo-medium);
    color: white;
}

/*.toggle-btn:hover {
    background-color: var(--bamboo-light);
    color: white;
}*/

/* Pantalla de Estadísticas */
.stats-container {
    background-color: var(--yellow-light);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-light);
    text-align: center;
}

.stats-container h2 {
    margin-bottom: 1.5rem;
    color: var(--bamboo-dark);
}

/* Pantalla de Juego */
.game-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.question-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 1rem;
}

.question-text {
    font-size: 2.5rem;
    text-align: center;
    font-weight: bold;
    color: var(--bamboo-dark);
    background-color: var(--yellow-pastel);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
}

.timer-container {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 1rem 0;
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    width: 100%;
    background-color: var(--bamboo-medium);
    transition: width 0.1s linear;
}

.options-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.option-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 65px;
    word-break: break-word;
    text-align: center;
    padding: 0.7rem;
    border: none;
    border-radius: 10px;
    background-color: var(--yellow-pastel);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-light);
}

.option-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.option-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-light);
}

.option-btn.correct {
    background-color: var(--success-color);
    color: white;
}

.option-btn.incorrect {
    background-color: var(--error-color);
    color: white;
}

/* Barra inferior */
.footer-bar {
    text-align: center;
    padding: 0.5rem;
    background-color: var(--bamboo-dark);
    color: white;
    font-size: 0.8rem;
}

/* Toast para mensajes */
.toast {
    position: fixed;
    top: 60px;
    left: 10px;
    padding: 1rem 2rem;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-weight: bold;
    z-index: 1000;
    transition: opacity 0.3s;
    transform: none;
}

.toast.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Media queries para responsive design */
/* Móviles */
@media (max-width: 768px) {
    .app-title {
        font-size: 1rem;
    }
    
    .header-stats {
        font-size: 0.8rem;
        gap: 0.5rem;
        margin-right: 0.5rem; /* Menos espacio en móvil */
    }
    
    .menu-btn {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }
    
    .menu-icon {
        font-size: 1.5rem;
    }
    
    .question-text {
        font-size: 2rem;
        padding: 1rem 1.5rem;
    }
    
    .options-container {
        grid-template-columns: 1fr;
    }
    
    .option-btn {
        padding: 0.5rem;
        font-size: 1.4rem;
    }
    
    .settings-container,
    .review-container,
    .stats-container {
        padding: 1rem;
    }
}

/* Tablets y pantallas más grandes */
@media (min-width: 769px) and (max-width: 1024px) {
    .options-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Cuando la altura es mayor que el ancho (modo retrato) */
@media (max-height: 600px) and (min-width: 769px) {
    .question-container {
        flex: 0.5;
    }
    
    .options-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animaciones */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.blink {
    animation: blink 0.5s 2;
}

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

.shake {
    animation: shake 0.3s;
}

/* Estilos para el switch tipo iOS */
.ios-switch {
    position: relative;
    display: inline-flex;
    width: 51px;
    height: 31px;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.ios-switch-slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked + .ios-switch-slider {
    background-color: var(--bamboo-medium);
}

input:checked + .ios-switch-slider:before {
    transform: translateX(20px);
}

/* Efecto de pulso cuando está activado */
input:checked + .ios-switch-slider {
    box-shadow: 0 0 1px var(--bamboo-medium);
}
/* Estilos para los niveles HSK */
.hsk-levels {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Para móviles */
@media (max-width: 768px) {
    .hsk-levels {
        gap: 0.5rem;
    }
}

/* Estilos específicos para Juego 1 */
.game-type-1 .question-text {
    font-size: 2.8rem; /* Más grande para caracteres chinos */
}

.game-type-1 .option-btn {
    font-size: 1.5rem; /* Opciones más grandes */
    padding: 0.8rem;
}

/* Estilos específicos para Juego 2 */
.game-type-2 .question-text {
    font-size: 1.6rem; /* Más pequeño para texto occidental */
}

.game-type-2 .option-btn {
    font-size: 2rem; /* Opciones más grandes para caracteres chinos */
    padding: 0.8rem;
    line-height: 0.3; /* Mejor espaciado para pinyin */
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    .game-type-1 .question-text {
        font-size: 2.2rem;
    }
    
    .game-type-1 .option-btn {
        font-size: 1.1rem;
        padding: 0.8rem;
    }
    
    .game-type-2 .question-text {
        font-size: 1.5rem;
    }
    
    .game-type-2 .option-btn {
        font-size: 1.5rem;
        padding: 0.5rem;
    }
}

/* Mejorar legibilidad de caracteres chinos */
.chinese-char {
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    font-weight: bold;
}

.pinyin-text {
    color: #666;
    font-size: 0.9em;
}

/* Añadir estos estilos al final del archivo CSS */

/* Estilos para la configuración mejorada */
.setting-group-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.setting-item {
    flex: 1;
    min-width: 200px;
}

.setting-item-full {    
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}
/* Estilos para las etiquetas */
.setting-item-full label:first-child {
    margin-right: 1rem;
    margin-bottom: 0;
    white-space: nowrap;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--bamboo-dark);
}

.wider-select {
    width: 150px !important;
    font-size: 1rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
}
.slider-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    margin-bottom: 1.5rem;
}
.slider-container input[type="range"] {
    flex: 1;
    margin: 0;
    min-width: 120px;
}
.slider-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
}

.slider-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.setting-item .slider-right {
    justify-content: flex-end;
}

.slider-left label[for="questions-slider"] {
    font-size: 1.2rem;
    min-width: 30px;
}

.slider-left .full-width-slider {
    flex: 1;
    margin: 0;
}
.ios-switch-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.difficulty-label {
    font-size: 0.9rem;
    color: var(--bamboo-dark);
    white-space: nowrap;
}

.difficulty-emoji {
    font-size: 1.2rem;
    min-width: 30px;
    align-items: center;
    text-align: center;
}
.slider-left #questions-value {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    color: var(--bamboo-dark);
}
.slider-container span {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
    color: var(--bamboo-dark);
}
.full-width-slider {
    width: 100% !important;
}

/* Para móviles */
@media (max-width: 768px) {
    .setting-group-row {
        flex-direction: row; /* Mantener en fila incluso en móviles */
        flex-wrap: wrap; /* Permitir que se envuelva si es necesario */
        justify-content: flex-start; /* Alinear a la izquierda */
        gap: 0.8rem; /* Reducir espacio entre elementos */
    }
    
    .setting-item {
        flex: 0 1 auto;
        min-width: auto;
        width: 100%;
    }

    slider-container {
        gap: 0.5rem;
    }
    
    .slider-container input[type="range"] {
        min-width: 100px;
    }
    
    .wider-select {
        width: 200px !important;
        font-size: 1rem;
    }
}

/* Eliminar bordes de los grupos de configuración */
.setting-group {
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    border-bottom: none;
}

/* Mejorar aspecto de los sliders */
input[type="range"] {
    width: 90%;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    margin-top: 0.5rem;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bamboo-medium);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bamboo-medium);
    cursor: pointer;
    border: none;
}

/* Estilo para mostrar marcas en el slider */
#questions-slider {
    background-size: 11.11% 100%; /* Para 9 segmentos (50-5)/5+1 = 10 segmentos */
    background-repeat: no-repeat;
    background-image: linear-gradient(to right, 
        #ccc 1px, 
        transparent 1px
    );
}

#questions-slider::-webkit-slider-thumb {
    /* Hacer el thumb un poco más grande para mejor usabilidad */
    width: 22px;
    height: 22px;
}

#questions-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
}

/* Para navegadores que soportan datalist (marcas visuales) */
#questions-slider {
    /* Añadir marcas cada 5 unidades */
    background-image: linear-gradient(to right, 
        #ccc 1px, 
        transparent 1px,
        transparent calc(11.11% - 1px),
        #ccc calc(11.11% - 1px),
        #ccc calc(11.11% + 1px),
        transparent calc(11.11% + 1px)
    );
    background-size: 11.11% 100%;
}

.vertical-align-label {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    gap: 0.5rem;
    height: 31px; /* Misma altura que los switches iOS */
    line-height: 1;
}

/* JUEGO CARACTERES */
.game-type-3 .question-text {
    font-size: 2.5rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-type-3 .option-btn {
    font-size: 1.8rem;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.game-type-3 .pinyin-text {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Para móviles */
@media (max-width: 768px) {
    .game-type-3 .question-text {
        font-size: 1.5rem;
        min-height: 60px;
    }
    
    .game-type-3 .option-btn {
        font-size: 1.5rem;
        min-height: 80px;
    }
}


/* JUEGO 1: Adivina el significado (Carácter -> Traducción) */
.game-type-1 .question-text {
    font-size: 2rem; /* Más grande para caracteres chinos */
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
/* Contenedor para carácter + pinyin en la misma línea */
.game-type-1 .chinese-with-pinyin {
    display: flex;
    align-items: center;    /* Centrado vertical */
    justify-content: center; /* Centrado horizontal */
    gap: 0.5rem;           /* Espacio entre carácter y pinyin */
}
.game-type-1 .chinese-char {
    font-size: 2.4rem;
    font-weight: bold;
}

.game-type-1 .pinyin-text {
    font-size: 1.5rem; /* La mitad del tamaño del carácter (3rem / 2 = 1.5rem) */
    color: #666;
    opacity: 0.8;
    align-self: center;    /* Asegura centrado vertical */
}
.game-type-1 .option-btn {
    font-size: 1.4rem; /* Opciones en español/inglés */
    min-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Para móviles */
@media (max-width: 768px) {
    .game-type-1 .chinese-with-pinyin {
        gap: 0.3rem;
    }
    
    .game-type-1 .chinese-char {
        font-size: 1.8rem;
    }
    
    .game-type-1 .pinyin-text {
        font-size: 1.2rem;
    }
}

/* JUEGO 2: Adivina el chino (Traducción -> Carácter) */
.game-type-2 .question-text {
    font-size: 1.2rem; /* Más pequeño para texto occidental */
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.game-type-2 .option-btn {
    font-size: 3rem; /* Opciones más grandes para caracteres chinos */
    min-height: 60px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0.4rem;
    gap: 2.2rem; /* ← Espacio entre carácter y pinyin */
}
.game-type-2 .option-btn .chinese-char {
    font-size: 2.3rem; /* Tamaño del carácter chino */
    font-weight: bold;
}

.game-type-2 .option-btn .pinyin-text {
    font-size: 1.4rem; /* La mitad del tamaño del carácter */
    color: #666;
    opacity: 0.8;
}
/* Para móviles */
@media (max-width: 768px) {
    .game-type-2 .option-btn {
        flex-direction: row; /* ← Mantener en fila incluso en móviles */
        gap: 0.3rem;
    }
    
    .game-type-2 .option-btn .chinese-char {
        font-size: 1.9rem;
    }
    
    .game-type-2 .option-btn .pinyin-text {
        font-size: 1.3rem;
    }
}

/* JUEGO 3: Adivina el pinyin (Carácter -> Pinyin) */
.game-type-3 .question-text {
    font-size: 2.3rem; /* Muy grande para el carácter */
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-type-3 .option-btn {
    font-size: 1.5rem; /* Opciones de pinyin */
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.6rem;
}

/* Estilos para la pantalla de estadísticas */
.stats-container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.stats-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stats-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.stats-section h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.level-stats {
    margin-top: 15px;
}

.level-stat {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.level-label {
    width: 60px;
    font-weight: bold;
}

.level-bar-container {
    flex-grow: 1;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 10px;
}

.level-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.level-count {
    width: 40px;
    text-align: right;
    font-weight: bold;
}

.review-words-list {
    margin-top: 15px;
}

.review-word-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.review-word-item:last-child {
    border-bottom: none;
}

.word-ch {
    font-size: 1.2rem;
    font-weight: bold;
    width: 50px;
}

.word-pinyin {
    width: 120px;
    color: var(--text-secondary);
}

.word-translation {
    flex-grow: 1;
}

.word-stats {
    width: 70px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.more-words {
    text-align: center;
    margin-top: 10px;
    font-style: italic;
    color: var(--text-secondary);
}

.no-stats, .no-words {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-style: italic;
}

.stats-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.action-btn.warning {
    background-color: #ff4757;
}

.action-btn.warning:hover {
    background-color: #ff3744;
}

/* Responsive */
@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-section {
        padding: 15px;
    }
    
    .review-word-item {
        flex-wrap: wrap;
    }
    
    .word-ch, .word-pinyin, .word-translation, .word-stats {
        margin-bottom: 5px;
    }
    
    .stats-actions {
        flex-direction: column;
    }
}
