/* style.css - GermanStudio - Paleta Moderna Unificada */
:root {
    /* Paleta principal - Azul Moderno */
    --primary: #1A5D9C;
    --primary-dark: #0E4166;
    --primary-light: #E8F0FE;
    
    /* Colores de género */
    --der-color: #2C6B8F;
    --die-color: #C94F7C;
    --das-color: #2D8C6B;
    
    /* Estados */
    --success: #2D8C6B;
    --success-light: #E6F4EF;
    --warning: #E6A017;
    --warning-light: #FEF3E4;
    --error: #D9534F;
    --error-light: #FCE8E8;

    /* Topicos */
    --topic-bg: #E8F0FE;      /* Fondo azul claro */
    --topic-text: #1A5D9C;    /* Texto azul principal */
    --topic-hover-bg: #1A5D9C; /* Fondo al hacer hover */
    --topic-hover-text: #FFFFFF; /* Texto al hacer hover */

    /* Neutros */
    --bg-main: #F8F9FA;
    --bg-card: #FFFFFF;
    --bg-sidebar: #1A252F;
    --text-primary: #1F2A3A;
    --text-secondary: #5A6B7C;
    --text-muted: #8A9BB0;
    --border: #E2E8F0;
    --border-dark: #CBD5E1;
    
    /* Sombras mejoradas */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 32px rgba(0,0,0,0.12);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.16);
    --shadow-glow: 0 0 20px rgba(26, 93, 156, 0.2);
    
    /* Transiciones */
    --transition-fast: 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    --transition-normal: 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    --transition-slow: 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    
    /* Bordes */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    padding: 1.5rem;
    border-right: none;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.logo .flag { font-size: 2rem; }
.logo h2 { color: #FFFFFF; font-size: 1.3rem; font-weight: 700; }
.logo span { color: #7EB8E0; }

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.5rem;
    text-align: center;
    transition: transform var(--transition-fast);
    border: 1px solid rgba(255,255,255,0.08);
}
.stat-card:hover { transform: translateY(-2px); background: rgba(255,255,255,0.08); }
.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #7EB8E0;
}
.stat-label { font-size: 0.65rem; color: #9AAEBF; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

.topic-filter h3, .progress-section h3 {
    color: #9AAEBF;
    font-size: 0.7rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}
.search-box input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    color: #FFFFFF;
    margin-bottom: 1rem;
}
.search-box input::placeholder { color: #9AAEBF; }
.search-box input:focus { outline: none; border-color: var(--primary); background: rgba(255,255,255,0.1); }

.topic-list { max-height: 320px; overflow-y: auto; margin-bottom: 1rem; }
.topic-item {
    padding: 0.55rem 0.8rem;
    color: #CBD5E1;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}
.topic-item:hover { background: rgba(26, 93, 156, 0.2); color: #FFFFFF; transform: translateX(4px); }
.topic-item.active { background: var(--primary); color: white; box-shadow: var(--shadow-sm); }
.topic-count { color: #9AAEBF; font-size: 0.68rem; background: rgba(255,255,255,0.08); padding: 2px 8px; border-radius: var(--radius-full); }
.topic-item.active .topic-count { background: rgba(0,0,0,0.15); color: white; }

.progress-section { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.08); }
.progress-bar { background: rgba(255,255,255,0.1); border-radius: var(--radius-full); height: 6px; overflow: hidden; margin-bottom: 0.5rem; }
.progress-fill { background: linear-gradient(90deg, var(--primary), var(--success)); height: 100%; width: 0%; transition: width 0.4s ease; border-radius: var(--radius-full); }
#progressPercent { color: #9AAEBF; font-size: 0.7rem; font-weight: 500; }

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 1.5rem 2rem 2rem 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
}

/* Botones de acción */
.action-buttons {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;  /* Cambiado de flex-end a center */
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-main);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.add-word-btn, .export-btn, .save-file-btn, .games-menu-btn, .travel-mode-btn, .editor-btn, .share-btn {
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    border: none;
}
.add-word-btn { background: var(--success); color: white; }
.export-btn { background: var(--primary); color: white; }
.save-file-btn { background: var(--warning); color: white; }
.games-menu-btn { background: var(--primary); color: white; }
.travel-mode-btn { background: var(--primary); color: white; }
.editor-btn { background: var(--primary); color: white; }
.share-btn { background: var(--primary); color: white; }
.add-word-btn:hover, .export-btn:hover, .save-file-btn:hover,
.games-menu-btn:hover, .travel-mode-btn:hover, .editor-btn:hover, .share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* Selector de modo */
.mode-selector {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}
.mode-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.65rem 1.6rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    font-weight: 600;
}
.mode-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.mode-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: var(--shadow-md); }

/* Contenedor dinámico */
.dynamic-content {
    flex: 1;
    min-height: 500px;
    width: 100%;
}
.content-panel {
    display: none;
    width: 100%;
    animation: fadeInUp 0.3s ease;
}
.content-panel.active { display: block; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ========== TARJETAS CON WOW FACTOR ========== */
.card-container { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    min-height: 70vh;
    perspective: 1200px;
    background: #0E4166;  /* Fondo ligeramente más oscuro */
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin-top: 0.5rem;
}

/* Contenedor de estadísticas elegantes */
.card-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.card-stat {
    text-align: center;
    background: var(--bg-card);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.card-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.card-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flashcard { 
    width: 100%; 
    max-width: 650px; 
    height: 480px; 
    perspective: 1500px; 
    cursor: pointer; 
    margin-bottom: 1.5rem;
    position: relative;
}

/* Efecto de brillo en el borde de la tarjeta */
.flashcard::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--primary), var(--success));
    border-radius: var(--radius-xl);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.flashcard:hover::before {
    opacity: 0.3;
}

.card-inner { 
    position: relative; 
    width: 100%; 
    height: 100%; 
    text-align: center; 
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); 
    transform-style: preserve-3d; 
}

.flashcard.flipped .card-inner { 
    transform: rotateY(180deg); 
}

/* Tarjeta frontal con efecto glassmorphism sutil */
.card-front, .card-back {
    position: absolute; 
    width: 100%; 
    height: 100%; 
    backface-visibility: hidden; 
    border-radius: var(--radius-xl);
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all var(--transition-normal);
}

/* ========== ANVERSO DE LA FLASHCARD CON DOBLE EFECTO ========== */
.card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow: hidden;
    
    /* Fondo degradado principal */
    background: linear-gradient(145deg, var(--primary-dark) 0%, var(--primary-light) 100%);
}

/* Elipse superior (efecto de luz) */
.card-front::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.12);
    clip-path: ellipse(70% 55% at 50% 0%);
    z-index: 1;
    pointer-events: none;
}

/* Ola inferior (efecto wave) */
.card-front::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.06);
    clip-path: ellipse(70% 35% at 50% 100%);
    z-index: 1;
    pointer-events: none;
}

/* ===== TOPIC EN ESQUINA SUPERIOR IZQUIERDA ===== */
.card-front .card-topic {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-light);
    padding: 0.25rem 0.9rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 600;
    z-index: 3;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Contenido centrado (resto de elementos) */
.card-front .card-article,
.card-front .card-word,
.card-front .card-hint {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* === Aumenta el espacio entre la palabra y el hint === */
.card-front .card-hint {
    margin-top: 2.5rem;
    font-size: 0.75rem;
    color: #1E2229;  /* Color azul del sidebar */
    opacity: 0.8;
    font-weight: 500;
}

.card-back { 
    background: linear-gradient(145deg, #EAEDF2 0%, #E2E6EB 100%);
    transform: rotateY(180deg); 
    box-shadow: var(--shadow-lg);
}

.card-back .card-hint {
    font-size: 0.75rem;
    color: #1E2229;  /* Color azul del sidebar */
    opacity: 0.8;
    font-weight: 500;
    margin-top: 1rem;
}

/* Borde superior según género en el reverso - más elegante */
.flashcard.der-word .card-back { 
    background: linear-gradient(145deg, #E3EEF8 0%, #D5E4F2 100%);
    border-top: 4px solid var(--der-color); 
    box-shadow: var(--shadow-lg);
}
.flashcard.die-word .card-back { 
    background: linear-gradient(145deg, #F7E8F0 0%, #F0DDE8 100%);
    border-top: 4px solid var(--die-color); 
    box-shadow: var(--shadow-lg);
}
.flashcard.das-word .card-back { 
    background: linear-gradient(145deg, #E8F2EC 0%, #DDEAE4 100%);
    border-top: 4px solid var(--das-color); 
    box-shadow: var(--shadow-lg);
}

/* Topic badge elegante */
.card-topic { 
    position: absolute; 
    top: 1rem; 
    left: 1rem; 
    background: #E8F0FE !important;  /* Azul claro forzado */
    padding: 0.3rem 1rem; 
    border-radius: var(--radius-full); 
    font-size: 0.7rem; 
    color: #1A5D9C !important;  /* Azul principal forzado */
    font-weight: 600; 
    display: flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid rgba(26, 93, 156, 0.15);
}

.card-topic::before {
    content: '🏷️';
    font-size: 0.6rem;
}

.card-topic:hover {
    background: var(--topic-hover-bg, #1A5D9C);
    color: var(--topic-hover-text, #FFFFFF);
    transform: translateY(-2px);
}

/* Article badge con diseño de píldora */
.card-article { 
    font-size: 1rem; 
    color: var(--primary); 
    margin-bottom: 0.5rem; 
    text-transform: uppercase; 
    letter-spacing: 4px; 
    font-weight: 700; 
    background: var(--primary-light);
    padding: 0.2rem 1.2rem;
    border-radius: var(--radius-full);
    display: inline-block;
}

/* Palabra principal con efecto de escala suave */
.card-word { 
    font-size: 3rem; 
    font-weight: 800; 
    color: #1A2A3A;  /* Gris más oscuro */
    margin: 0.75rem 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all var(--transition-fast);
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flashcard:hover .card-word {
    transform: scale(1.02);
}

/* Hint con microinteracción */
.card-hint { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    margin-top: 1.5rem; 
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.card-hint:hover {
    opacity: 1;
}

/* Traducción destacada con animación */
.card-translation { 
    font-size: 2.2rem; 
    font-weight: 700; 
    color: var(--text-dark);
    margin-bottom: 1rem; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
    animation: fadeInUp 0.4s ease 0.1s both;
}

/* Ejemplos con diseño elegante */
.card-examples { 
    margin-top: 0.75rem; 
    width: 100%; 
    text-align: center; 
    animation: fadeInUp 0.4s ease 0.2s both;
}

.card-example { 
    font-size: 0.85rem; 
    color: var(--text-secondary); 
    margin: 0.4rem 0; 
    font-style: italic; 
    background: rgba(255,255,255,0.6);
    padding: 0.6rem; 
    border-radius: var(--radius-md); 
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.card-example:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.card-example-english { 
    font-size: 0.8rem; 
    color: var(--text-muted); 
    margin: 0.4rem 0; 
    background: rgba(248,249,250,0.8);
    padding: 0.6rem; 
    border-radius: var(--radius-md); 
    border: 1px solid var(--border);
}

/* Badges de plural y femenino */
.card-plural, .card-femenino { 
    font-size: 0.75rem; 
    margin-top: 0.5rem; 
    padding: 0.25rem 0.8rem; 
    border-radius: var(--radius-full); 
    font-weight: 600; 
    display: inline-block; 
    animation: fadeInUp 0.4s ease 0.3s both;
}

.card-plural { 
    color: var(--primary); 
    background: var(--primary-light); 
}

.card-femenino { 
    color: var(--success); 
    background: var(--success-light); 
}
/* Controles de tarjeta - más modernos */
.card-controls { 
    display: flex; 
    gap: 1rem; 
    align-items: center; 
    justify-content: center; 
    margin-top: 1rem; 
    flex-wrap: wrap; 
}

.nav-btn { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    color: var(--text-secondary); 
    padding: 0.6rem 1.4rem; 
    border-radius: var(--radius-full); 
    cursor: pointer; 
    font-weight: 600; 
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.nav-btn:hover { 
    background: var(--primary); 
    border-color: var(--primary); 
    color: white; 
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.diff-btn { 
    padding: 0.6rem 1.4rem; 
    border: none; 
    border-radius: var(--radius-full); 
    cursor: pointer; 
    font-weight: 700; 
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.diff-btn.hard { 
    background: var(--error-light); 
    color: var(--error); 
    border: 1px solid var(--error);
}

.diff-btn.medium { 
    background: var(--warning-light); 
    color: var(--warning); 
    border: 1px solid var(--warning);
}

.diff-btn.easy { 
    background: var(--success-light); 
    color: var(--success); 
    border: 1px solid var(--success);
}

.diff-btn:hover { 
    transform: translateY(-3px);
    filter: brightness(0.98);
    box-shadow: var(--shadow-md);
}

.card-info { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: 1rem; 
    color: var(--text-muted); 
    gap: 1rem; 
}

.shuffle-btn { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    color: var(--text-secondary); 
    padding: 0.3rem 1rem; 
    border-radius: var(--radius-full); 
    cursor: pointer; 
    transition: all var(--transition-fast);
}

.shuffle-btn:hover { 
    background: var(--primary-light); 
    color: var(--primary); 
    transform: rotate(15deg);
}

/* Botones de audio y favoritos - más elegantes */
.audio-btn, .favorite-btn {
    position: absolute; 
    bottom: 1.2rem; 
    background: var(--bg-card); 
    border: 2px solid var(--border-dark);
    border-radius: 50%; 
    width: 54px; 
    height: 54px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(4px);
}

.audio-btn { 
    right: 1.2rem; 
    color: var(--primary); 
}

.audio-btn i { 
    font-size: 1.6rem; 
    transition: transform var(--transition-fast);
}

.audio-btn:hover { 
    background: var(--primary); 
    color: white; 
    transform: scale(1.08);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.audio-btn:hover i {
    transform: scale(1.1);
}

.favorite-btn { 
    left: 1.2rem; 
    color: var(--warning); 
}

.favorite-btn i { 
    font-size: 1.6rem; 
    transition: transform var(--transition-fast);
}

.favorite-btn:hover { 
    background: var(--warning-light); 
    color: var(--warning); 
    transform: scale(1.08);
    border-color: var(--warning);
    box-shadow: 0 0 20px rgba(230, 160, 23, 0.2);
}

.favorite-btn:hover i {
    transform: scale(1.1);
}

/* ========== QUIZ ========== */
.quiz-container { max-width: 550px; margin: 0 auto; }
.quiz-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem; padding: 0.8rem 1rem; background: var(--bg-card);
    border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.quiz-score { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.quiz-question {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #FFFFFF;
    box-shadow: var(--shadow-md);
    font-weight: 600;
}
.quiz-option {
    background: var(--bg-card); border: 1px solid var(--border); padding: 0.7rem 1rem;
    border-radius: var(--radius-md); cursor: pointer; text-align: center;
    margin-bottom: 0.5rem; transition: all var(--transition-fast); color: var(--text-secondary);
    font-weight: 600; max-width: 500px; margin-left: auto; margin-right: auto;
}
.quiz-option:hover { background: var(--primary-light); border-color: var(--primary); transform: translateX(4px); color: var(--primary); }
.quiz-option.correct { background: var(--success-light); border-color: var(--success); color: var(--success); }
.quiz-option.wrong { background: var(--error-light); border-color: var(--error); color: var(--error); }
.quiz-next { 
    margin-top: 1rem; width: 100%; padding: 0.8rem; background: var(--primary); 
    border: none; color: white; border-radius: var(--radius-full); cursor: pointer; 
    font-weight: 700; transition: all var(--transition-fast); 
}
.quiz-next:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* ========== DICCIONARIO ========== */
.dictionary-container { max-width: 650px; margin: 0 auto; }
.dictionary-search { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.dict-search-input, .dict-topic-filter {
    padding: 0.7rem 0.9rem; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.85rem;
}
.dict-search-input { flex: 1; }
.dict-topic-filter { cursor: pointer; }
.dict-search-input:focus, .dict-topic-filter:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 93, 156, 0.15); }

.dictionary-results { display: flex; flex-direction: column; gap: 0.8rem; max-height: 550px; overflow-y: auto; }
.dict-item {
    background: var(--bg-card); padding: 1rem; border-radius: var(--radius-md);
    transition: all var(--transition-fast); border: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 0.5rem;
}
.dict-item:hover { transform: translateX(4px); border-left: 3px solid var(--primary); box-shadow: var(--shadow-sm); }
.dict-item .alemán { font-size: 1rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.dict-item .traducción { font-size: 0.9rem; color: var(--text-secondary); }
.dict-item .tema { font-size: 0.7rem; color: var(--text-muted); background: var(--primary-light); padding: 0.2rem 0.6rem; border-radius: var(--radius-full); display: inline-block; width: fit-content; }
.delete-word-btn {
    background: var(--error-light); border: 1px solid var(--error); padding: 0.25rem 0.7rem;
    border-radius: var(--radius-md); cursor: pointer; color: var(--error); font-size: 0.7rem;
    font-weight: 600; transition: all var(--transition-fast); width: fit-content;
}
.delete-word-btn:hover { background: var(--error); color: white; }

.gender-badge {
    display: inline-block; padding: 0.15rem 0.5rem; border-radius: var(--radius-full);
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase; color: white;
}
.gender-badge.der { background-color: var(--der-color); }
.gender-badge.die { background-color: var(--die-color); }
.gender-badge.das { background-color: var(--das-color); }

.favorite-star, .audio-play { background: none; border: none; cursor: pointer; font-size: 0.9rem; padding: 0 0.2rem; }
.favorite-star { color: var(--warning); }
.audio-play { color: var(--primary); }

/* ========== JUEGOS ========== */
.hangman-container, .wordsearch-container {
    background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius-lg);
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.games-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; justify-content: center; }
.game-tab {
    background: var(--bg-card); border: 1px solid var(--border); padding: 0.45rem 1rem;
    border-radius: var(--radius-full); cursor: pointer; color: var(--text-secondary);
    font-weight: 600; transition: all var(--transition-fast);
}
.game-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.hangman-drawing pre { background: var(--bg-main); padding: 1rem; border-radius: var(--radius-md); font-family: monospace; font-size: 1rem; color: var(--primary); border: 1px solid var(--border); }
.word-display { font-size: 2rem; letter-spacing: 0.5rem; margin-bottom: 1rem; text-align: center; color: var(--text-primary); }
.hangman-hint-box { background: var(--primary-light); padding: 0.8rem; border-radius: var(--radius-md); margin-bottom: 1rem; color: var(--text-primary); }
.letter-btn {
    width: 40px; height: 40px; margin: 0.25rem; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-primary); font-size: 1rem; cursor: pointer; font-weight: 700;
    transition: all var(--transition-fast);
}
.letter-btn:hover:not(:disabled) { background: var(--primary-light); border-color: var(--primary); transform: translateY(-2px); }
.letter-btn.correct { background: var(--success-light); border-color: var(--success); color: var(--success); }
.letter-btn.wrong { background: var(--error-light); border-color: var(--error); color: var(--error); }
.letter-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.wordsearch-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-bottom: 1rem; max-width: 100%; overflow-x: auto; }
.ws-cell { aspect-ratio: 1; background: var(--bg-card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: 600; cursor: pointer; border-radius: var(--radius-sm); color: var(--text-secondary); transition: all var(--transition-fast); }
.ws-cell:hover { background: var(--primary-light); }
.ws-cell.selected { background: var(--primary); color: white; border-color: var(--primary); }
.ws-word { display: inline-block; margin: 0.25rem; padding: 0.2rem 0.7rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-full); font-size: 0.8rem; color: var(--text-secondary); font-weight: 600; }
.ws-word.found { background: var(--success-light); border-color: var(--success); color: var(--success); text-decoration: line-through; }

/* ========== BOTONES UNIFICADOS PARA JUEGOS ========== */
.game-btn {
    background: var(--primary);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.game-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.game-btn:active {
    transform: translateY(0);
}

/* Asegurar que los iconos tengan el mismo espaciado */
.game-btn i {
    font-size: 0.9rem;
}

/* ========== MODO VIAJE ========== */
.scenario-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; justify-content: center; }
.scenario-btn {
    background: var(--bg-card); border: 1px solid var(--border); padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full); cursor: pointer; color: var(--text-secondary);
    font-weight: 600; transition: all var(--transition-fast);
}
.scenario-btn:hover { background: var(--primary); color: white; border-color: var(--primary); transform: translateY(-1px); }
.travel-words-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.8rem; }
.travel-words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.travel-word-card {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-fast);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;  /* Espacio entre elementos */
}

.travel-word-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Palabra en alemán */
.travel-word-card strong {
    font-size: 1rem;
    display: block;
    margin-bottom: 0.25rem;
}

/* Traducción */
.travel-translation {
    display: block;
    font-size: 0.75rem;
    color: #3A5A70;  /* Gris medio-oscuro (no negro) */
    margin-top: 0;
    font-weight: 500;
}

/* Botón de sonido */
.play-sound {
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem auto 0 auto;  /* Margen superior para separar */
    transition: all var(--transition-fast);
    color: var(--primary);
}

.play-sound:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.play-sound i {
    font-size: 0.9rem;
}

/* ========== EDITOR CSV ========== */
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.panel-header h3 { color: var(--text-primary); font-size: 1.2rem; font-weight: 700; }
.close-panel-btn {
    background: var(--error-light); border: 1px solid var(--error); color: var(--error);
    padding: 0.3rem 0.8rem; border-radius: var(--radius-full); cursor: pointer; font-weight: 600;
}
.close-panel-btn:hover { background: var(--error); color: white; }

.editor-toolbar { display: flex; gap: 0.8rem; margin-bottom: 1rem; flex-wrap: wrap; }
#editorSearch { flex: 1; padding: 0.6rem 0.8rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); }
.save-edit-btn { background: var(--primary); border: none; padding: 0.6rem 1rem; border-radius: var(--radius-md); cursor: pointer; color: white; font-weight: 600; transition: all var(--transition-fast); }
.save-edit-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

.editor-table-wrapper { max-height: 500px; overflow-y: auto; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-card); }
.editor-table-grid { width: 100%; border-collapse: collapse; }
.editor-table-grid th { position: sticky; top: 0; background: var(--bg-main); color: var(--text-primary); padding: 0.6rem; text-align: left; font-weight: 700; font-size: 0.75rem; border-bottom: 2px solid var(--border); }
.editor-table-grid td { padding: 0.4rem; border-bottom: 1px solid var(--border); }
.editor-table-grid input { background: var(--bg-card); border: 1px solid var(--border); padding: 0.3rem 0.5rem; border-radius: var(--radius-sm); color: var(--text-primary); width: 100%; }

/* ========== FORMULARIO AGREGAR PALABRA ========== */
.add-word-form {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 90%; max-width: 700px; background: var(--bg-card); border-radius: var(--radius-xl);
    padding: 1.5rem; z-index: 200; border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.2rem; }
.form-group label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0.3px; }
.form-group input, .form-group select {
    padding: 0.5rem 0.7rem; background: var(--bg-main); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.85rem;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 93, 156, 0.15); }
.form-buttons { display: flex; gap: 0.8rem; justify-content: flex-end; }
.save-btn { background: var(--primary); border: none; padding: 0.5rem 1.2rem; border-radius: var(--radius-full); cursor: pointer; color: white; font-weight: 700; }
.save-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.cancel-btn { background: var(--error-light); border: 1px solid var(--error); padding: 0.5rem 1.2rem; border-radius: var(--radius-full); cursor: pointer; color: var(--error); font-weight: 600; }

.form-message { margin-top: 0.8rem; padding: 0.5rem; border-radius: var(--radius-md); text-align: center; font-weight: 600; font-size: 0.8rem; }
.form-message.success { background: var(--success-light); color: var(--success); border: 1px solid var(--success); }
.form-message.error { background: var(--error-light); color: var(--error); border: 1px solid var(--error); }

/* Travel Mode empty state */
.travel-empty { text-align: center; padding: 1.5rem; background: var(--bg-card); border-radius: var(--radius-lg); margin-top: 1rem; border: 1px solid var(--border); }
.travel-empty p { margin: 0.3rem 0; color: var(--text-muted); }
.travel-header-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; flex-wrap: wrap; gap: 0.5rem; }
.travel-word-count { background: var(--primary-light); padding: 0.2rem 0.7rem; border-radius: var(--radius-full); font-size: 0.75rem; color: var(--primary); font-weight: 600; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ========== ICONOS FONT AWESOME - ESTILOS ADICIONALES ========== */

/* Espaciado entre iconos y texto en botones */
.action-buttons i,
.mode-btn i,
.nav-btn i,
.diff-btn i,
.game-tab i,
.scenario-btn i,
.panel-header i,
.close-panel-btn i,
.save-btn i,
.cancel-btn i,
.quiz-next i,
.game-btn i,
.delete-word-btn i,
.favorite-star i,
.audio-play i {
    margin-right: 0.5rem;
}

/* Iconos en los botones de navegación */
.nav-btn i:last-child,
.quiz-next i,
.nextCard i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Iconos en las etiquetas del formulario */
.form-group label i {
    margin-right: 0.3rem;
    color: var(--primary);
    width: 1rem;
}

/* Efecto hover en iconos de botones */
button:hover i {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Icono en el contador de tarjetas */
#cardCounter i {
    margin-right: 0.3rem;
    color: var(--text-muted);
}

/* Icono de audio y favorito en tarjetas (sin margen extra) */
.audio-btn i,
.favorite-btn i {
    margin-right: 0;
    font-size: 1.1rem;
}

/* Icono de estrella en diccionario */
.favorite-star i {
    margin-right: 0;
    font-size: 0.9rem;
}

/* Icono de audio en diccionario */
.audio-play i {
    margin-right: 0;
    font-size: 0.9rem;
}

/* Icono de eliminar en diccionario */
.delete-word-btn i {
    font-size: 0.7rem;
}

/* ========== BARRAS DE PROGRESO POR TEMA ========== */
.topic-progress-bar {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    height: 4px;
    overflow: hidden;
    width: 100%;
}

.topic-progress-fill {
    background: linear-gradient(90deg, #6F42C1, #10B981);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Ajuste para mantener el estilo existente */
.topic-item {
    padding: 0.6rem 0.8rem;
    color: #cbd5e1;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.topic-item.active {
    background: linear-gradient(135deg, #6F42C1, #855CD6);
    color: white;
    box-shadow: 0 4px 10px rgba(111, 66, 193, 0.3);
}

.topic-item.active .topic-progress-bar {
    background: rgba(255, 255, 255, 0.3);
}

.topic-item.active .topic-progress-fill {
    background: linear-gradient(90deg, #FFFFFF, #FFD700);
}

/* ========== WORD SEARCH - VERSIÓN ESCRITORIO ========== */

/* Contenedor principal del juego */
.wordsearch-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 80vh;
}

/* Lista de palabras a buscar - FIJA en la parte superior */
.wordsearch-words {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 10;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.wordsearch-words h4 {
    width: 100%;
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
}

/* Cada palabra como badge */
.ws-word {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.ws-word:hover {
    transform: translateY(-2px);
    background: var(--primary);
    color: white;
}

.ws-word.found {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success);
    text-decoration: line-through;
}

/* Botón New Puzzle */
.wordsearch-button {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0 1rem 0;
    flex-shrink: 0;
}

.wordsearch-button .game-btn {
    background: var(--primary);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.wordsearch-button .game-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Cuadrícula de letras - CON SCROLL, no fija */
.wordsearch-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-height: 450px;
    overflow-y: auto;
    overflow-x: auto;
}

/* Celdas */
.ws-cell {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.ws-cell:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.ws-cell.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Mensaje */
.wordsearch-message {
    text-align: center;
    padding: 0.8rem;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Ejemplo clickeable en el reverso */
#cardExampleAleman {
    transition: all 0.2s ease;
    border-radius: 12px;
    padding: 8px 16px;
    width: 100%;
    box-sizing: border-box;
}

#cardExampleAleman:hover {
    background: rgba(0, 0, 0, 0.04);
}

#cardExampleAleman i {
    transition: transform 0.2s ease;
}

#cardExampleAleman:hover i {
    transform: scale(1.1);
}

/* ========== GRÁFICO CIRCULAR ========== */
.chart-container {
    position: relative;
    width: 150px;  /* Reducido de 180px a 150px */
    height: 150px; /* Reducido de 180px a 150px */
    margin: 0.5rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#progressChart {
    width: 100%;
    height: 100%;
}

.chart-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-label span:first-child {
    font-size: 1.2rem;  /* Reducido de 1.8rem */
    font-weight: 800;
    color: var(--primary);
}

.chart-label span:last-child {
    font-size: 0.7rem;  /* Reducido de 1rem */
    font-weight: 600;
    color: var(--text-secondary);
}

.chart-label small {
    display: block;
    font-size: 0.5rem;  /* Reducido de 0.6rem */
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* ========== MODAL DE BIENVENIDA ========== */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.welcome-modal-content {
    background: linear-gradient(145deg, var(--bg-card) 0%, #F5F7FA 100%);
    border-radius: 32px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s ease;
}

.welcome-flag svg {
    width: 48px;
    height: 32px;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.welcome-modal-content h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.welcome-modal-content h2 span {
    background: linear-gradient(135deg, var(--primary), var(--success));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.welcome-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.welcome-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.welcome-feature i {
    font-size: 1.5rem;
    color: var(--primary);
    background: var(--primary-light);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px;
}

.welcome-feature span {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.welcome-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 40px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.welcome-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.05);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Ocultar contenido principal hasta cerrar modal (opcional) */
body.modal-open .app-container {
    filter: blur(2px);
    pointer-events: none;
}

/* Ocultar contenido principal hasta cerrar modal (opcional) */
body.modal-open .app-container {
    filter: blur(2px);
    pointer-events: none;
}

/* ========== RESPONSIVE MEJORADO PARA MÓVIL ========== */

/* Botón de menú hamburguesa - visible solo en móvil */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 150;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.menu-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Pantallas pequeñas (móviles) */
@media (max-width: 768px) {
    /* Sidebar oculta por defecto */
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        width: 260px;
        z-index: 200;
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Mostrar botón de menú en móvil */
    .menu-toggle {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        width: 100%;
    }
    
    /* Tarjetas más pequeñas */
    .flashcard {
        height: 380px;
        max-width: 100%;
    }
    
    .card-word {
        font-size: 2rem;
    }
    
    .card-translation {
        font-size: 1.5rem;
    }
    
    .card-article {
        font-size: 0.9rem;
    }
    
    .card-topic {
        font-size: 0.6rem;
        padding: 0.2rem 0.6rem;
        top: 0.5rem;
        left: 0.5rem;
    }
    
    /* Botones de acción */
    .action-buttons {
        justify-content: center;
        gap: 0.4rem;
        margin-top: 3rem;
    }
    
    .add-word-btn, .export-btn, .save-file-btn,
    .games-menu-btn, .travel-mode-btn, .editor-btn, .share-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    
    /* Selector de modo */
    .mode-selector {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .mode-btn {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }
    
    /* Controles de tarjeta en columna */
    .card-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .difficulty-buttons {
        gap: 0.3rem;
    }
    
    .nav-btn, .diff-btn {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }
    
    /* Diccionario */
    .dict-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .dict-item .alemán {
        min-width: auto;
    }
    
    .dict-item .traducción {
        min-width: auto;
    }
    
    .dict-item .tema {
        min-width: auto;
    }
    
    /* Quiz */
    .quiz-container {
        max-width: 100%;
    }
    
    .quiz-question {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .quiz-option {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    /* Travel Mode */
    .travel-words-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .travel-word-card {
        padding: 0.6rem;
    }
    
    /* Word Search */
    .wordsearch-grid {
        gap: 3px;
    }
    
    .ws-cell {
        font-size: 0.6rem;
    }
    
    /* Modal de bienvenida */
    .welcome-modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .welcome-flag svg {
        width: 36px;
        height: 24px;
    }
    
    .welcome-german, .welcome-studio {
        font-size: 1.2rem;
    }
    
    .welcome-message {
        font-size: 0.85rem;
    }
    
    .welcome-feature i {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .welcome-feature span {
        font-size: 0.6rem;
    }
    
    /* Gráfico circular */
    .chart-container {
        width: 100px;
        height: 100px;
    }
}

/* Pantallas muy pequeñas */
@media (max-width: 480px) {
    .travel-words-grid {
        grid-template-columns: 1fr;
    }
    
    .wordsearch-grid {
        gap: 2px;
    }
    
    .ws-cell {
        font-size: 0.5rem;
    }
    
    .letter-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .word-display {
        font-size: 1.2rem;
        letter-spacing: 0.3rem;
    }
    
    .action-buttons {
        gap: 0.3rem;
    }
    
    .add-word-btn, .export-btn, .save-file-btn,
    .games-menu-btn, .travel-mode-btn, .editor-btn, .share-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
    }
    
    .stats {
        gap: 0.3rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.5rem;
    }
}

/* Pantallas grandes (escritorio) - sidebar siempre visible */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    
    .sidebar {
        transform: translateX(0) !important;
        position: fixed;
    }
}