/* ========== VARIABLES ========== */
:root {
    --primary: #1B5FAD;
    --primary-light: #3B8DD8;
    --secondary: #FF6B9D;
    --accent: #00D4AA;
    --warning: #F59E0B;
    --danger: #EF4444;
    --success: #10B981;
    --dark: #2D3748;
    --light: #F0F7FF;
    --muted: #94A3B8;
    --purple: #2E8BC0;
    --pink: #EC4899;
    --cyan: #06B6D4;
}

/* ========== RESET ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1B5FAD 0%, #6DD5ED 100%);
    min-height: 100vh;
    color: var(--dark);
}

/* ========== HEADER ========== */
.header {
    background: rgba(255,255,255,0.95);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 12px;
    max-height: 50px;
    overflow: hidden;
}
.logo-image { 
    height: 40px !important;
    max-height: 40px !important;
    width: auto !important;
    max-width: 200px !important;
    object-fit: contain !important;
    display: block !important;
}
.logo-icon { font-size: 28px; }
.logo-text { font-size: 20px; font-weight: 700; color: var(--primary); }

.user-stats { display: flex; gap: 16px; }
.stat-badge {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 20px; font-weight: 600;
}
.stat-badge.points { background: linear-gradient(135deg, var(--warning), #FBBF24); color: white; }
.stat-badge.level { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }

/* ========== NAVIGATION ========== */
.main-nav {
    display: flex; justify-content: center; gap: 12px;
    padding: 16px; background: rgba(255,255,255,0.1);
}

.nav-btn {
    padding: 12px 24px; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    background: rgba(255,255,255,0.9); color: var(--dark);
    transition: all 0.3s ease;
}
.nav-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.nav-btn.active { background: var(--primary); color: white; }

/* ========== CONTENT ========== */
.content { max-width: 1200px; margin: 0 auto; padding: 24px; }

.section { display: none; animation: fadeIn 0.5s ease; }
.section.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== CARDS ========== */
.card {
    background: white; border-radius: 20px; padding: 24px;
    margin-bottom: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.card.dark {
    background: linear-gradient(135deg, #0D3B66, #1B5FAD); color: white;
}
.card-title {
    font-size: 24px; color: var(--primary); margin-bottom: 16px;
    display: flex; align-items: center; gap: 12px;
}
.card-title.gold { color: #FFD93D; }

/* ========== SLIDES ========== */
.slides-container {
    background: white; border-radius: 20px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 250px);
}

.slide { 
    display: none; 
    padding: 40px; 
    min-height: 400px;
    max-height: calc(100vh - 350px);
    overflow-y: auto;
    flex: 1;
}
.slide.active { display: block; animation: slideIn 0.5s ease; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-center { text-align: center; padding: 40px 0; }
.big-emoji { font-size: 72px; margin-bottom: 20px; }
.huge-emoji { font-size: 120px; }
.main-title { font-size: 42px; color: var(--primary); margin-bottom: 10px; }
.subtitle { font-size: 22px; color: var(--secondary); margin-bottom: 30px; }
.footer-text { margin-top: 40px; color: var(--muted); }

.tags { display: flex; gap: 16px; justify-content: center; }
.tag {
    padding: 10px 24px; border-radius: 20px; color: white; font-weight: 600;
}
.tag.purple { background: var(--primary); }
.tag.pink { background: var(--secondary); }
.tag.green { background: var(--accent); }

.slide-title { font-size: 32px; color: var(--primary); margin-bottom: 24px; text-align: center; }

.slide-controls {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 16px 24px; 
    background: var(--light); 
    border-top: 1px solid #E5E7EB;
    position: sticky;
    bottom: 0;
    z-index: 10;
}
.slide-btn {
    padding: 12px 24px; 
    border: none; 
    border-radius: 10px;
    font-size: 14px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.3s ease;
    white-space: nowrap;
}
.slide-btn.prev { background: var(--muted); color: white; }
.slide-btn.next { background: var(--primary); color: white; }
.slide-btn:hover:not(:disabled) { transform: scale(1.05); }
.slide-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.slide-counter { font-weight: 600; color: var(--dark); }

/* ========== LAYOUTS ========== */
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.info-box {
    background: var(--light); border-radius: 16px; padding: 20px;
    border-left: 5px solid var(--primary); margin-bottom: 16px;
}
.info-box p { font-size: 15px; line-height: 1.6; }
.highlight { color: var(--primary); }

.gradient-box {
    border-radius: 16px; padding: 20px; color: white;
}
.gradient-box.purple { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.box-title { font-size: 18px; font-weight: 600; margin-bottom: 10px; }

.benefits-card { background: white; border-radius: 16px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.section-title.pink { color: var(--secondary); }

.benefits-list { display: flex; flex-direction: column; gap: 12px; }
.benefit-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--light); border-radius: 10px; }
.benefit-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.benefit-icon.green { background: #E8F5E9; }
.benefit-icon.blue { background: #E3F2FD; }
.benefit-icon.orange { background: #FFF3E0; }
.benefit-icon.pink { background: #FCE4EC; }
.benefit-icon.purple { background: #E8EAF6; }

/* ========== KEYBOARD ========== */
.keyboard-display { background: #2D3748; border-radius: 16px; padding: 20px; margin: 20px 0; }

/* Teclado en sección de teoría */
.keyboard-theory-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 16px;
    border-radius: 12px;
    overflow: hidden;
}

.keyboard-theory-svg {
    width: 100%;
    height: auto;
    display: block;
}

.keyboard-parts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.keyboard-part {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--light);
    border-radius: 10px;
    font-size: 13px;
    color: var(--dark);
}

.part-color {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Contenedor del teclado SVG */
.keyboard-svg-container {
    width: 100%;
    max-width: 950px;
    margin: 12px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(27, 95, 173, 0.25);
    border: 2px solid rgba(27, 95, 173, 0.2);
    background: transparent;
}

.keyboard-svg-container object {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    background: transparent;
}
.keyboard-row { display: flex; justify-content: center; gap: 4px; margin-bottom: 6px; }

.key {
    min-width: 40px; height: 40px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 14px; transition: all 0.2s ease;
}
.key.default { background: #F8FAFC; color: #2D3748; }
.key.home { background: #FFD93D; color: #2D3748; border: 2px solid #F59E0B; }
.key.left { background: #D1FAE5; color: #047857; }
.key.right { background: #DBEAFE; color: #1D4ED8; }
.key.special { background: #FF6B6B; color: white; }
.key.space { min-width: 300px; background: #A78BFA; color: white; }
.key.active { transform: scale(0.95); box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); }
.key.correct { background: var(--success) !important; color: white !important; }
.key.wrong { background: var(--danger) !important; color: white !important; }
.key.next-key { 
    background: linear-gradient(135deg, #FFD93D, #FBBF24) !important; 
    color: #2D3748 !important;
    box-shadow: 0 0 20px rgba(255, 217, 61, 0.8), 0 0 40px rgba(255, 217, 61, 0.4) !important;
    transform: scale(1.1) !important;
    animation: pulse 1.5s ease-in-out infinite;
    font-weight: bold !important;
    border: 3px solid #F59E0B !important;
}

@keyframes pulse {
    0%, 100% { transform: scale(1.1); box-shadow: 0 0 20px rgba(255, 217, 61, 0.8), 0 0 40px rgba(255, 217, 61, 0.4); }
    50% { transform: scale(1.15); box-shadow: 0 0 30px rgba(255, 217, 61, 1), 0 0 60px rgba(255, 217, 61, 0.6); }
}

.legend { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dark); }
.legend-color { width: 20px; height: 20px; border-radius: 4px; }
.legend-color.home { background: #FFD93D; border: 2px solid #F59E0B; }
.legend-color.left { background: #D1FAE5; }
.legend-color.right { background: #DBEAFE; }
.legend-color.special { background: #FF6B6B; }

/* ========== SPECIAL KEYS ========== */
.special-keys-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.special-key-card { background: var(--light); border-radius: 12px; padding: 16px; }
.key-badge {
    display: inline-block; padding: 6px 12px; border-radius: 6px;
    font-weight: bold; font-size: 12px; color: white; margin-bottom: 8px;
}
.key-badge.green { background: var(--success); }
.key-badge.red { background: var(--danger); }
.key-badge.orange { background: var(--warning); }
.key-badge.purple { background: var(--purple); }
.key-badge.pink { background: var(--pink); }
.key-badge.cyan { background: var(--cyan); }
.key-name { font-weight: 600; font-size: 14px; color: var(--dark); }
.key-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }

.tip-box {
    border-radius: 12px; padding: 14px 20px; margin-top: 16px;
    display: flex; align-items: center; gap: 12px;
}
.tip-box.gradient { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; }
.tip-box.yellow { background: #FEF3C7; color: #92400E; }
.tip-box span { font-size: 24px; }
.tip-box p { margin: 0; }

/* ========== FINGER GUIDE ========== */
.finger-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hand-section { background: white; border-radius: 16px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.hand-title {
    text-align: center; padding: 8px 16px; border-radius: 20px;
    color: white; font-weight: 600; margin-bottom: 16px;
}
.hand-title.left { background: var(--success); }
.hand-title.right { background: #4D96FF; }

.finger-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; margin-bottom: 8px; }
.finger-row.yellow { background: #FEFCE8; }
.finger-row.orange { background: #FEF3C7; }
.finger-row.blue { background: #DBEAFE; }
.finger-row.pink { background: #FCE7F3; }

.finger-key {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: white; flex-shrink: 0;
}
.finger-key.yellow { background: #EAB308; }
.finger-key.orange { background: #F59E0B; }
.finger-key.blue { background: #3B82F6; }
.finger-key.pink { background: #EC4899; }

.finger-name { font-weight: 600; color: var(--dark); }
.finger-keys { font-size: 11px; color: var(--muted); }

.thumbs-section { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
.thumbs-box {
    background: linear-gradient(135deg, #3B8DD8, #1B5FAD);
    border-radius: 12px; padding: 16px 32px; text-align: center; color: white;
}
.home-row-box {
    background: #FEF3C7; border-radius: 12px; padding: 16px 32px; text-align: center;
}
.small-title { font-size: 12px; color: #92400E; font-weight: 600; }
.home-keys { font-size: 24px; color: #B45309; font-weight: bold; letter-spacing: 6px; }
.small { font-size: 12px; opacity: 0.9; }

/* ========== POSTURE ========== */
.posture-image {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE); border-radius: 20px; padding: 30px;
}
.posture-label { font-size: 14px; color: var(--primary); font-weight: 600; margin-top: 10px; }

.posture-tips { display: flex; flex-direction: column; gap: 12px; }
.posture-item { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--light); border-radius: 12px; }
.posture-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.posture-icon.blue { background: #DBEAFE; }
.posture-icon.pink { background: #FCE7F3; }
.posture-icon.green { background: #D1FAE5; }
.posture-icon.yellow { background: #FEF3C7; }
.posture-icon.purple { background: #DBEAFE; }
.posture-title { font-weight: 600; color: var(--dark); }
.posture-desc { font-size: 12px; color: var(--muted); }

/* ========== TIPS ========== */
.tips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tips-column { border-radius: 16px; padding: 20px; }
.tips-column.do { background: #D1FAE5; border: 3px solid var(--success); }
.tips-column.dont { background: #FEE2E2; border: 3px solid var(--danger); }

.tips-title {
    text-align: center; padding: 8px 20px; border-radius: 20px;
    color: white; font-weight: 700; margin-bottom: 16px;
}
.tips-title.do { background: var(--success); }
.tips-title.dont { background: var(--danger); }

.tips-column .tip-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px; background: white; border-radius: 10px; margin-bottom: 10px;
}
.tips-column .tip-item span { font-size: 20px; }
.tips-column .tip-item div { font-size: 13px; color: var(--dark); }

.motivation-box {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px; padding: 16px; text-align: center; margin-top: 16px;
}
.motivation-box p { color: white; font-size: 16px; font-weight: 600; }

/* ========== SESSIONS GRID ========== */
.sessions-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.sessions-grid-20 { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.session-card {
    border-radius: 14px; padding: 16px; text-align: center; color: white;
    transition: all 0.3s ease; cursor: pointer;
    position: relative;
    overflow: hidden;
}
.session-card::before {
    content: '▶';
    position: absolute;
    right: 8px;
    top: 8px;
    font-size: 16px;
    opacity: 0;
    transition: all 0.3s ease;
}
.session-card:hover { 
    transform: translateY(-4px) scale(1.02); 
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.session-card:hover::before { opacity: 0.8; }
.session-card:active { transform: translateY(-2px) scale(1.01); }
.session-number {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; background: rgba(255,255,255,0.3);
    margin: 0 auto 6px; font-size: 12px;
}
.session-name { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.session-desc { font-size: 9px; opacity: 0.9; }
.session-icon { font-size: 18px; margin-top: 6px; }
.sessions-grid-20 .session-card { padding: 12px 8px; }
.sessions-grid-20 .session-number { width: 26px; height: 26px; font-size: 11px; margin-bottom: 4px; }
.sessions-grid-20 .session-name { font-size: 11px; }
.sessions-grid-20 .session-desc { font-size: 8px; }
.sessions-grid-20 .session-icon { font-size: 16px; margin-top: 4px; }

.progress-container { margin-top: 24px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 600; }
.progress-bar { height: 12px; background: #E5E7EB; border-radius: 6px; overflow: hidden; }
.progress-fill {
    height: 100%; border-radius: 6px; transition: width 0.5s ease;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

/* ========== PRACTICE ========== */
.practice-goal-badge {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 2px solid #F59E0B;
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}
.goal-icon { font-size: 24px; }
.goal-text { color: #92400E; font-size: 14px; }
.goal-text strong { color: #78350F; }

.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }
.level-card {
    background: white; border-radius: 16px; padding: 20px; cursor: pointer;
    border: 3px solid transparent; transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
}
.level-card::after {
    content: '▶';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--primary);
    opacity: 0;
    transition: all 0.3s ease;
}
.level-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(27, 95, 173, 0.25);
    border-color: var(--primary);
}
.level-card:hover::after { opacity: 1; right: 15px; }
.level-card:active { transform: translateY(-2px); }
.level-card.selected { border-color: var(--primary); }
.level-card.locked { opacity: 0.6; cursor: not-allowed; }

.level-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.level-number {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: white;
}
.level-name { font-size: 18px; font-weight: 600; color: var(--dark); }
.level-description { font-size: 13px; color: var(--muted); }
.level-keys { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.level-key { background: var(--light); padding: 4px 10px; border-radius: 6px; font-family: monospace; font-weight: 600; }

.start-btn {
    display: block; width: 100%; padding: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white; border: none; border-radius: 12px;
    font-size: 18px; font-weight: 700; cursor: pointer; transition: all 0.3s ease;
}
.start-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(27,95,173,0.4); }

.practice-area { background: white; border-radius: 20px; padding: 32px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.practice-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.practice-title { font-size: 24px; color: var(--primary); margin-bottom: 4px; }
.exercise-progress {
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    margin-top: 4px;
}
.practice-stats { display: flex; gap: 16px; }
.mini-stat { text-align: center; padding: 8px 16px; background: var(--light); border-radius: 10px; }
.mini-stat-value { font-size: 24px; font-weight: 700; color: var(--primary); }
.mini-stat-label { font-size: 11px; color: var(--muted); }

.text-display {
    background: #F8FAFC; border-radius: 12px; padding: 16px 20px;
    font-family: 'Courier New', monospace; font-size: 22px;
    line-height: 1.8; margin-bottom: 16px; letter-spacing: 1px;
    height: 85px; max-height: 85px; overflow-y: auto; overflow-x: hidden;
    word-wrap: break-word; white-space: pre-wrap;
    scroll-behavior: smooth;
}
.char { transition: all 0.1s ease; }
.char.current { background: var(--warning); color: white; padding: 2px 4px; border-radius: 4px; }
.char.correct { color: var(--success); }
.char.wrong { color: var(--danger); text-decoration: underline; }

.input-area {
    width: 100%; padding: 20px; font-family: 'Courier New', monospace;
    font-size: 24px; border: 3px solid var(--primary); border-radius: 12px;
    outline: none; letter-spacing: 2px; margin-bottom: 20px;
}
.input-area:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,212,170,0.2); }

.helper-badge {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 2px solid #F59E0B;
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 16px;
    text-align: center;
    color: #92400E;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.practice-buttons { display: flex; gap: 12px; margin-top: 16px; }
.btn {
    flex: 1; padding: 14px; border: none; border-radius: 12px;
    font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease;
}
.btn.primary { background: var(--primary); color: white; }
.btn.secondary { background: var(--light); color: var(--dark); }
.btn:hover { transform: scale(1.02); }

/* ========== PROGRESS SECTION ========== */
.levels-display { display: flex; flex-direction: column; gap: 12px; }
.rank-item {
    display: flex; align-items: center; gap: 16px; padding: 14px;
    background: rgba(255,255,255,0.1); border-radius: 12px; border: 2px solid transparent;
}
.rank-item.current { border-color: var(--warning); background: rgba(255,255,255,0.2); }
.rank-icon {
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.rank-info { flex: 1; }
.rank-name { font-weight: 700; font-size: 16px; }
.rank-points { font-size: 12px; opacity: 0.8; }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stat-box { background: var(--light); padding: 20px; border-radius: 12px; text-align: center; }
.stat-value { font-size: 36px; font-weight: 700; color: var(--primary); }
.stat-value.green { color: var(--success); }
.stat-value.orange { color: var(--warning); }
.stat-value.pink { color: var(--secondary); }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }

.points-info { margin-top: 24px; }
.points-info h3 { color: var(--dark); margin-bottom: 12px; }
.points-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { padding: 6px 12px; border-radius: 8px; font-size: 12px; color: white; }
.badge.green { background: var(--success); }
.badge.orange { background: var(--warning); }
.badge.purple { background: var(--primary); }

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); display: none;
    align-items: center; justify-content: center; z-index: 1000;
}
.modal-overlay.active { display: flex; }

/* Estilos para modales directos (sin overlay) */
.modal {
    background: white; border-radius: 24px; padding: 40px;
    max-width: 500px; width: 90%; text-align: center; animation: modalIn 0.3s ease;
}

/* Modal como overlay (userProfileModal, confirmModal, messageModal) */
#userProfileModal,
#confirmModal,
#messageModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#userProfileModal[style*="flex"],
#confirmModal[style*="flex"],
#messageModal[style*="flex"] {
    display: flex !important;
}

#userProfileModal[style*="none"],
#confirmModal[style*="none"],
#messageModal[style*="none"] {
    display: none !important;
}

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: modalIn 0.3s ease;
    position: relative;
}

@keyframes modalIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-icon { font-size: 64px; margin-bottom: 16px; }
.modal-title { font-size: 28px; color: var(--primary); margin-bottom: 8px; }
.modal-subtitle { color: var(--muted); margin-bottom: 24px; }

.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.result-stat { padding: 16px; background: var(--light); border-radius: 12px; }
.result-stat-value { font-size: 28px; font-weight: 700; color: var(--primary); }
.result-stat-label { font-size: 12px; color: var(--muted); }

.accuracy-details {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px;
}
.accuracy-item {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px; border-radius: 12px; background: var(--light);
}
.accuracy-item.correct { border-left: 4px solid var(--success); }
.accuracy-item.wrong { border-left: 4px solid var(--danger); }
.accuracy-icon {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: bold;
}
.accuracy-item.correct .accuracy-icon { background: #D1FAE5; color: var(--success); }
.accuracy-item.wrong .accuracy-icon { background: #FEE2E2; color: var(--danger); }
.accuracy-info { flex: 1; }
.accuracy-value { font-size: 32px; font-weight: 700; line-height: 1; }
.accuracy-item.correct .accuracy-value { color: var(--success); }
.accuracy-item.wrong .accuracy-value { color: var(--danger); }
.accuracy-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

.points-earned {
    background: linear-gradient(135deg, var(--warning), #FBBF24);
    color: white; padding: 16px 32px; border-radius: 12px;
    font-size: 24px; font-weight: 700; margin-bottom: 24px;
}
.modal-buttons { display: flex; gap: 12px; justify-content: center; }

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 32px;
    font-weight: 300;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.close-modal:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    transform: rotate(90deg);
}

/* ========== BOTÓN DE SONIDO ========== */
.sound-btn {
    background: linear-gradient(135deg, #10B981, #34D399);
    border: none; border-radius: 50%; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease;
    font-size: 20px; color: white; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
.sound-btn:hover {
    transform: scale(1.1); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

/* ========== BOTÓN DE MODO OSCURO ========== */
.dark-mode-btn {
    background: linear-gradient(135deg, #6366F1, #818CF8);
    border: none; border-radius: 50%; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease;
    font-size: 20px; color: white; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.dark-mode-btn:hover {
    transform: scale(1.1); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

/* ========== BADGE DE RACHA ========== */
.stat-badge.streak {
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    color: white;
    font-weight: 600;
}

/* ========== BARRA DE PROGRESO DEL RANGO ========== */
.rank-progress-container {
    background: white;
    border-radius: 16px;
    padding: 16px 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.rank-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.rank-progress-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}
.rank-progress-text {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
}
.rank-progress-track {
    height: 12px;
    background: #E5E7EB;
    border-radius: 6px;
    overflow: hidden;
}
.rank-progress-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease, background 0.3s ease;
    background: linear-gradient(135deg, #FFD93D, #F59E0B);
}

/* ========== BOTONES DE PRÁCTICA ========== */
.practice-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
.free-practice-btn {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.free-practice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* ========== PERFIL DE USUARIO ========== */
.account-btn {
    background: linear-gradient(135deg, #1B5FAD, #3B8DD8);
    border: none; border-radius: 50%; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease;
    font-size: 20px; color: white; box-shadow: 0 2px 8px rgba(27, 95, 173, 0.3);
}
.account-btn:hover {
    transform: scale(1.1); box-shadow: 0 4px 12px rgba(27, 95, 173, 0.5);
}

.stat-badge.user-name {
    background: linear-gradient(135deg, #1B5FAD, #0D3B66);
    color: white; padding: 10px 16px; gap: 8px; font-weight: 600;
}

.profile-modal {
    max-width: 600px; padding: 32px;
}
.profile-modal h2 {
    margin: 0 0 24px 0; font-size: 28px; color: var(--primary);
    text-align: center;
}
.profile-modal h3 {
    margin: 0 0 12px 0; font-size: 18px; color: var(--text);
}

.profile-section {
    background: var(--light); padding: 20px; border-radius: 12px;
    margin-bottom: 20px;
}
.profile-section label {
    display: block; margin-bottom: 8px; font-weight: 600;
    color: var(--text); font-size: 14px;
}
.profile-section input[type="text"] {
    width: 100%; padding: 12px; border: 2px solid #e5e7eb;
    border-radius: 8px; font-size: 16px; margin-bottom: 12px;
    transition: border-color 0.3s ease;
}
.profile-section input[type="text"]:focus {
    outline: none; border-color: var(--primary);
}

.info-text {
    color: var(--muted); font-size: 14px; margin-bottom: 16px; line-height: 1.5;
}

.button-group {
    display: flex; gap: 12px; flex-wrap: wrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white; border: none; padding: 12px 24px; border-radius: 8px;
    font-size: 16px; font-weight: 600; cursor: pointer;
    transition: all 0.3s ease; width: 100%;
}
.btn-primary:hover {
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(27, 95, 173, 0.4);
}

.btn-export, .btn-import {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 14px 20px; border-radius: 8px;
    font-size: 15px; font-weight: 600; border: none;
    cursor: pointer; transition: all 0.3s ease;
}
.btn-export {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}
.btn-export:hover {
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}
.btn-import {
    background: linear-gradient(135deg, #1B5FAD, #3B8DD8);
    color: white;
}
.btn-import:hover {
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(27, 95, 173, 0.4);
}

.data-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.data-item {
    background: white; padding: 12px; border-radius: 8px;
    display: flex; justify-content: space-between; align-items: center;
}
.data-label {
    font-size: 14px; color: var(--muted); font-weight: 500;
}
.data-value {
    font-size: 18px; font-weight: 700; color: var(--primary);
}

.confirm-modal {
    max-width: 400px; text-align: center; padding: 32px;
}
.confirm-modal h3 {
    margin: 0 0 16px 0; font-size: 22px; color: var(--warning);
}
.confirm-modal p {
    margin: 0 0 24px 0; color: var(--text); line-height: 1.6;
}
.btn-cancel, .btn-confirm {
    flex: 1; padding: 12px 24px; border-radius: 8px;
    font-size: 15px; font-weight: 600; border: none;
    cursor: pointer; transition: all 0.3s ease;
}
.btn-cancel {
    background: #e5e7eb; color: var(--text);
}
.btn-cancel:hover {
    background: #d1d5db;
}
.btn-confirm {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}
.btn-confirm:hover {
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.message-modal {
    max-width: 400px; text-align: center; padding: 32px;
}
.message-modal h3 {
    margin: 0 0 12px 0; font-size: 22px;
}
.message-modal p {
    margin: 0; color: var(--text); line-height: 1.6;
}

/* ========== RESPONSIVE ========== */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    .content { padding: 16px; }
    .slide { padding: 30px 20px; }
    .main-title { font-size: 36px; }
    .slide-title { font-size: 28px; }
    .big-emoji { font-size: 60px; }
    .huge-emoji { font-size: 100px; }

    /* Practice area */
    .practice-area { padding: 24px; }
    .practice-title { font-size: 22px; }
    .mini-stat-value { font-size: 20px; }
    .text-display { font-size: 20px; padding: 14px 18px; }
    .input-area { font-size: 20px; padding: 16px; }
}

/* Tablets pequeñas y móviles grandes */
@media (max-width: 768px) {
    .header { padding: 10px 16px; flex-wrap: wrap; }
    .logo { max-height: 46px; }
    .logo-image { 
        height: 36px !important; 
        max-height: 36px !important;
        max-width: 180px !important;
    }
    .logo-text { font-size: 18px; }
    .logo-icon { font-size: 24px; }
    
    .user-stats { 
        gap: 8px; 
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .stat-badge { 
        padding: 6px 12px; 
        font-size: 13px;
    }
    .account-btn, .sound-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .main-nav { 
        gap: 8px; 
        padding: 12px; 
        flex-wrap: wrap;
    }
    .nav-btn { 
        padding: 10px 16px; 
        font-size: 14px; 
    }
    
    .content { padding: 12px; }
    
    .slide { 
        padding: 24px 16px;
        min-height: 300px;
        max-height: calc(100vh - 320px);
    }
    .slide-center { padding: 20px 0; }
    
    .main-title { font-size: 28px; }
    .subtitle { font-size: 18px; }
    .slide-title { font-size: 24px; }
    .big-emoji { font-size: 48px; }
    .huge-emoji { font-size: 80px; }
    
    .slide-controls { padding: 12px 16px; }
    .slide-btn { 
        padding: 10px 16px; 
        font-size: 13px; 
    }
    .slide-counter { font-size: 14px; }
    
    .two-columns, .tips-grid, .finger-guide { grid-template-columns: 1fr; }
    .sessions-grid { grid-template-columns: repeat(2, 1fr); }
    .sessions-grid-20 { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .special-keys-grid { grid-template-columns: repeat(2, 1fr); }
    .keyboard-parts-grid { grid-template-columns: repeat(2, 1fr); }
    .keyboard-part { font-size: 12px; padding: 8px 10px; }
    .thumbs-section { flex-direction: column; }
    .data-grid { grid-template-columns: 1fr; }
    .button-group { flex-direction: column; }
    
    .key { min-width: 28px; height: 28px; font-size: 10px; }
    .key.space { min-width: 150px; }

    .info-box, .gradient-box { padding: 16px; }

    /* Practice area - tablets pequeñas */
    .practice-area { padding: 20px; border-radius: 16px; }
    .practice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
    }
    .practice-stats {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    .mini-stat {
        padding: 6px 12px;
        flex: 1;
        min-width: 0;
    }
    .mini-stat-value { font-size: 18px; }
    .mini-stat-label { font-size: 10px; }
    .practice-title { font-size: 18px; }
    .exercise-progress { font-size: 11px; padding: 4px 10px; }
    .text-display {
        font-size: 18px;
        padding: 12px 14px;
        height: 75px;
        max-height: 75px;
        line-height: 1.6;
    }
    .input-area {
        font-size: 18px;
        padding: 14px;
        margin-bottom: 12px;
        letter-spacing: 1px;
    }
    .helper-badge {
        padding: 10px 14px;
        font-size: 12px;
        margin-bottom: 12px;
    }
    .practice-buttons { gap: 8px; margin-top: 12px; }
    .btn { padding: 12px; font-size: 14px; }
    .keyboard-svg-container { margin: 8px auto; }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .header { padding: 8px 12px; }
    .logo { max-height: 42px; }
    .logo-image { 
        height: 32px !important; 
        max-height: 32px !important;
        max-width: 160px !important;
    }
    .logo-text { font-size: 16px; }
    .logo-icon { font-size: 20px; }
    
    .user-stats { gap: 6px; }
    .stat-badge { 
        padding: 5px 10px; 
        font-size: 12px;
        gap: 4px;
    }
    .stat-badge.user-name {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .account-btn, .sound-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .main-nav { 
        padding: 8px; 
        gap: 6px;
    }
    .nav-btn { 
        padding: 8px 12px; 
        font-size: 13px;
        flex: 1;
    }
    
    .content { padding: 8px; }
    
    .slides-container {
        max-height: calc(100vh - 220px);
        border-radius: 12px;
    }
    
    .slide { 
        padding: 16px 12px;
        min-height: 250px;
        max-height: calc(100vh - 300px);
    }
    .slide-center { padding: 16px 0; }
    
    .main-title { font-size: 24px; margin-bottom: 8px; }
    .subtitle { font-size: 16px; margin-bottom: 20px; }
    .slide-title { font-size: 20px; margin-bottom: 16px; }
    .big-emoji { font-size: 40px; margin-bottom: 16px; }
    .huge-emoji { font-size: 64px; }
    .footer-text { 
        margin-top: 24px; 
        font-size: 13px; 
        line-height: 1.5;
    }
    
    .tags { 
        flex-wrap: wrap; 
        gap: 8px;
    }
    .tag { 
        padding: 8px 16px; 
        font-size: 13px;
    }
    
    .slide-controls { 
        padding: 10px 12px;
        gap: 8px;
    }
    .slide-btn { 
        padding: 8px 12px; 
        font-size: 12px;
    }
    .slide-counter { font-size: 13px; }
    
    .sessions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .sessions-grid-20 {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .sessions-grid-20 .session-card { padding: 10px 6px; }
    .sessions-grid-20 .session-number { width: 24px; height: 24px; font-size: 10px; }
    .sessions-grid-20 .session-name { font-size: 10px; }
    .sessions-grid-20 .session-desc { font-size: 8px; }
    .sessions-grid-20 .session-icon { font-size: 14px; }

    .keyboard-parts-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .keyboard-part {
        font-size: 11px;
        padding: 6px 10px;
    }
    .part-color { width: 16px; height: 16px; }
    .keyboard-theory-container { margin-bottom: 10px; }
    
    .special-keys-grid { 
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .card { 
        padding: 16px;
        border-radius: 16px;
    }
    .card-title { 
        font-size: 20px;
        gap: 8px;
    }
    
    .info-box, .gradient-box { 
        padding: 12px;
        font-size: 14px;
    }
    
    .modal-content, .profile-modal { 
        padding: 24px 16px;
        max-width: 95%;
    }
    
    .key {
        min-width: 24px;
        height: 24px;
        font-size: 9px;
    }
    .key.space { min-width: 100px; }

    /* Practice area - móviles pequeños */
    .practice-area { padding: 14px; border-radius: 14px; }
    .practice-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 12px;
    }
    .practice-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .mini-stat {
        padding: 6px 8px;
        border-radius: 8px;
    }
    .mini-stat-value { font-size: 16px; }
    .mini-stat-label { font-size: 9px; }
    .practice-title { font-size: 16px; margin-bottom: 2px; }
    .exercise-progress { font-size: 10px; padding: 3px 8px; }
    .text-display {
        font-size: 16px;
        padding: 10px 12px;
        height: 65px;
        max-height: 65px;
        line-height: 1.5;
        letter-spacing: 0.5px;
        margin-bottom: 10px;
    }
    .input-area {
        font-size: 16px;
        padding: 12px;
        margin-bottom: 10px;
        letter-spacing: 1px;
        border-width: 2px;
        border-radius: 10px;
    }
    .helper-badge {
        padding: 8px 12px;
        font-size: 11px;
        margin-bottom: 10px;
        border-radius: 10px;
    }
    .practice-buttons { gap: 6px; margin-top: 10px; }
    .btn {
        padding: 10px;
        font-size: 13px;
        border-radius: 10px;
    }
    .keyboard-svg-container {
        margin: 6px auto;
        border-radius: 12px;
    }

    /* Level cards en móviles */
    .level-grid { gap: 10px; }
    .level-card { padding: 14px; border-radius: 12px; }
    .level-header { margin-bottom: 8px; }
    .level-number { width: 32px; height: 32px; font-size: 14px; }
    .level-name { font-size: 15px; }
    .level-description { font-size: 12px; }
    .level-keys { gap: 4px; margin-top: 8px; }
    .level-key { padding: 3px 8px; font-size: 12px; }
}

/* Altura muy pequeña (landscape en móviles) */
@media (max-height: 600px) {
    .slides-container {
        max-height: calc(100vh - 180px);
    }

    .slide {
        padding: 16px;
        min-height: 200px;
        max-height: calc(100vh - 240px);
    }

    .header { padding: 6px 12px; }
    .main-nav { padding: 8px; }
    .slide-controls { padding: 8px 12px; }

    .big-emoji { font-size: 36px; margin-bottom: 12px; }
    .huge-emoji { font-size: 56px; }
    .main-title { font-size: 22px; }
    .subtitle { font-size: 15px; }

    /* Practice area en landscape */
    .practice-area { padding: 12px; }
    .practice-header { margin-bottom: 8px; gap: 8px; }
    .mini-stat { padding: 4px 10px; }
    .mini-stat-value { font-size: 16px; }
    .text-display {
        height: 55px;
        max-height: 55px;
        font-size: 16px;
        padding: 8px 12px;
        margin-bottom: 8px;
    }
    .input-area {
        padding: 10px;
        font-size: 16px;
        margin-bottom: 8px;
    }
    .helper-badge { padding: 6px 10px; margin-bottom: 8px; font-size: 11px; }
    .practice-buttons { margin-top: 8px; }
    .btn { padding: 8px; }
}

/* Pantallas muy pequeñas (menos de 360px) */
@media (max-width: 360px) {
    .practice-area { padding: 10px; }
    .practice-title { font-size: 14px; }
    .exercise-progress { font-size: 9px; padding: 2px 6px; }
    .mini-stat-value { font-size: 14px; }
    .mini-stat-label { font-size: 8px; }
    .text-display {
        font-size: 14px;
        height: 55px;
        max-height: 55px;
        padding: 8px 10px;
    }
    .input-area {
        font-size: 14px;
        padding: 10px;
    }
    .helper-badge { font-size: 10px; padding: 6px 10px; }
    .btn { font-size: 12px; padding: 8px; }
}

/* ========== MODO OSCURO ========== */
body.dark-mode {
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    background: var(--bg-gradient);
}

body.dark-mode .header {
    background: rgba(26, 26, 46, 0.95);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

body.dark-mode .main-nav {
    background: rgba(22, 33, 62, 0.9);
}

body.dark-mode .nav-btn {
    background: rgba(255,255,255,0.05);
    color: #a0aec0;
}

body.dark-mode .nav-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

body.dark-mode .nav-btn.active {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
}

body.dark-mode .card,
body.dark-mode .slide,
body.dark-mode .practice-area,
body.dark-mode .rank-progress-container {
    background: rgba(26, 26, 46, 0.9);
    border: 1px solid rgba(255,255,255,0.1);
}

body.dark-mode .card-title,
body.dark-mode .slide-title,
body.dark-mode .practice-title,
body.dark-mode .main-title {
    color: #f0f0f0;
}

body.dark-mode .subtitle,
body.dark-mode p,
body.dark-mode .info-item span,
body.dark-mode .benefit-item span {
    color: #a0aec0;
}

body.dark-mode .text-display {
    background: rgba(15, 15, 35, 0.8);
    border-color: rgba(255,255,255,0.1);
    color: #e2e8f0;
}

body.dark-mode .input-area {
    background: rgba(15, 15, 35, 0.8);
    border-color: rgba(255,255,255,0.2);
    color: white;
}

body.dark-mode .input-area:focus {
    border-color: #7C3AED;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

body.dark-mode .level-card {
    background: rgba(30, 30, 50, 0.8);
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .level-card:hover {
    border-color: rgba(255,255,255,0.3);
}

body.dark-mode .level-name {
    color: #e2e8f0;
}

body.dark-mode .level-key {
    background: rgba(255,255,255,0.1);
    color: #a0aec0;
}

body.dark-mode .mini-stat {
    background: rgba(255,255,255,0.05);
}

body.dark-mode .mini-stat-value {
    color: white;
}

body.dark-mode .mini-stat-label {
    color: #a0aec0;
}

body.dark-mode .helper-badge {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.2));
    border-color: rgba(245, 158, 11, 0.5);
}

body.dark-mode .stat-card {
    background: rgba(30, 30, 50, 0.8);
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .stat-value {
    color: white;
}

body.dark-mode .stat-label {
    color: #a0aec0;
}

body.dark-mode .rank-item {
    background: rgba(30, 30, 50, 0.8);
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .rank-points {
    color: #a0aec0;
}

body.dark-mode .modal-content,
body.dark-mode .modal,
body.dark-mode .profile-modal {
    background: rgba(26, 26, 46, 0.98);
    border: 1px solid rgba(255,255,255,0.1);
}

body.dark-mode .modal-content h2,
body.dark-mode .profile-modal h2 {
    color: white;
}

body.dark-mode .modal-content p,
body.dark-mode .profile-modal label {
    color: #a0aec0;
}

body.dark-mode .profile-modal input {
    background: rgba(15, 15, 35, 0.8);
    border-color: rgba(255,255,255,0.2);
    color: white;
}

body.dark-mode .rank-progress-track {
    background: rgba(255,255,255,0.1);
}

body.dark-mode .rank-progress-label {
    color: #a0aec0;
}

body.dark-mode .practice-goal-badge {
    background: rgba(79, 70, 229, 0.2);
    border-color: rgba(79, 70, 229, 0.5);
}

body.dark-mode .practice-goal-badge .goal-text {
    color: #a0aec0;
}

body.dark-mode .slide-nav-btn {
    background: rgba(255,255,255,0.1);
    color: #a0aec0;
}

body.dark-mode .slide-nav-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

body.dark-mode .slide-dots .dot {
    background: rgba(255,255,255,0.3);
}

body.dark-mode .slide-dots .dot.active {
    background: #7C3AED;
}

/* Responsive para nuevos botones en modo oscuro */
@media (max-width: 768px) {
    body.dark-mode .rank-progress-container {
        padding: 12px 16px;
    }
    .dark-mode-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .dark-mode-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .rank-progress-container {
        padding: 10px 14px;
    }
    .rank-progress-label,
    .rank-progress-text {
        font-size: 12px;
    }
    .practice-buttons {
        flex-direction: column;
    }
    .free-practice-btn {
        padding: 14px 24px;
        font-size: 16px;
    }
}
