/* ===========================================
   CELC DEVOTIONALS - ESTILOS COMPLETOS
   VERSION OPTIMIZADA PARA MÓVIL
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark-blue: #0A2342;
    --dark-red: #8B0000;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light-gray);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ===========================================
   HEADER - CON SAFE AREA PARA iOS
   ========================================== */
.header {
    background: linear-gradient(135deg, var(--dark-blue), #1a3a5f);
    color: white;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top, 20px));
    padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    z-index: 10;
}

.app-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.app-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.menu-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* ===========================================
   SIDE MENU - CON SCROLL PARA iOS
   ========================================== */
.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.side-menu.open {
    left: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px 20px 15px 20px;
    border-bottom: 2px solid var(--dark-red);
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;
}

.menu-header h2 {
    color: var(--dark-blue);
    font-size: 1.3rem;
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-blue);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-menu:hover {
    background: var(--light-gray);
}

.menu-items {
    list-style: none;
    padding: 0 10px 20px 10px;
    flex: 1;
}

.menu-items li {
    margin-bottom: 5px;
}

.menu-items a {
    text-decoration: none;
    color: var(--dark-blue);
    font-size: 1rem;
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    transition: background 0.3s;
}

.menu-items a:hover {
    background: var(--light-gray);
}

/* ===========================================
   MAIN CONTENT - CON SAFE AREA Y ESPACIO INFERIOR
   ========================================== */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 85px;
    background: var(--white);
}

/* ===========================================
   BOTTOM NAVIGATION - FIJO EN LA PARTE INFERIOR
   ========================================== */
.bottom-nav {
    display: flex;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 12px 0;
    z-index: 10;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
}

.nav-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.nav-btn.active {
    color: var(--dark-red);
}

.nav-icon {
    font-size: 1.3rem;
}

.nav-label {
    font-size: 0.8rem;
}

/* Ajuste para modo standalone (app instalada) */
@media (display-mode: standalone) {
    .bottom-nav {
        padding-bottom: max(12px, env(safe-area-inset-bottom, 20px));
    }
    
    .main-content {
        padding-bottom: 90px;
    }
}

/* Ajuste para móviles pequeños */
@media (max-width: 480px) {
    .bottom-nav {
        padding: 10px 0 8px 0;
    }
    
    .nav-btn {
        padding: 10px 5px;
    }
    
    .nav-icon {
        font-size: 1.5rem;
    }
    
    .nav-label {
        font-size: 0.75rem;
    }
    
    .main-content {
        padding-bottom: 90px;
    }
}

@media (max-width: 380px) {
    .bottom-nav {
        padding: 8px 0 6px 0;
    }
    
    .nav-btn {
        padding: 8px 5px;
    }
    
    .main-content {
        padding-bottom: 85px;
    }
}

/* Botones de acción más grandes en móvil */
@media (max-width: 480px) {
    .action-btn {
        padding: 14px;
        font-size: 1rem;
    }
    
    .download-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* ===========================================
   LOADING SPINNER
   ========================================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-gray);
    border-top-color: var(--dark-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===========================================
   DEVOTIONAL CARD
   ========================================== */
.devotional-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.devotional-header {
    border-bottom: 2px solid var(--dark-red);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.devotional-date {
    color: var(--dark-blue);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
}

.devotional-title {
    color: var(--dark-blue);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.devotional-topic {
    display: inline-block;
    background: var(--dark-red);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Verse Box */
.verse-box {
    background: var(--light-gray);
    border-left: 4px solid var(--dark-blue);
    padding: 15px;
    margin: 20px 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

/* Devotional Content */
.devotional-content {
    line-height: 1.8;
    color: #333;
    margin: 20px 0;
}

/* Audio Section */
.audio-section {
    background: linear-gradient(135deg, var(--dark-blue), #1a3a5f);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 30px 0 20px;
}

.audio-container {
    position: relative;
    width: 100%;
    min-height: 60px;
}

.audio-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 35, 66, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1;
    white-space: nowrap;
}

.audio-player {
    width: 100%;
    margin: 15px 0;
}

.download-btn {
    background: var(--dark-red);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.download-btn:hover {
    background: #6b0000;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.action-btn {
    flex: 1;
    background: var(--light-gray);
    border: none;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.action-btn.bookmarked {
    background: var(--dark-red);
    color: white;
}

.share-btn {
    background: var(--dark-blue);
    color: white;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.topic-card {
    background: white;
    padding: 20px 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s;
    border: 1px solid #eee;
}

.topic-card:hover {
    transform: translateY(-3px);
}

.topic-emoji {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.topic-name {
    color: var(--dark-blue);
    font-weight: 600;
}

/* ===========================================
   ENSEÑANZAS CORTAS - VERSIÓN MÓVIL OPTIMIZADA
   ========================================== */

.short-teachings-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
}

.short-teachings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.short-teachings-header h3 {
    color: var(--dark-blue);
    font-size: 1.3rem;
    margin: 0;
}

.view-all-btn {
    background: var(--dark-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.view-all-btn:hover {
    background: #1a3a5f;
}

/* Scroll horizontal en móvil */
.short-teachings-grid {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 5px 20px 5px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Tarjeta individual en móvil */
.short-teaching-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.short-teaching-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.short-teaching-thumbnail {
    position: relative;
    width: 100px;
    flex-shrink: 0;
    background: var(--dark-blue);
}

.short-teaching-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0.9;
}

.short-teaching-info {
    flex: 1;
    padding: 12px;
}

.short-teaching-title {
    color: var(--dark-blue);
    font-size: 0.95rem;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.short-teaching-description {
    color: #666;
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.3;
}

/* Ocultar scrollbar visualmente */
.short-teachings-grid::-webkit-scrollbar {
    height: 4px;
}

.short-teachings-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.short-teachings-grid::-webkit-scrollbar-thumb {
    background: var(--dark-red);
    border-radius: 4px;
}

/* Pantallas grandes: grid en lugar de scroll */
@media (min-width: 768px) {
    .short-teachings-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        overflow-x: visible;
        gap: 20px;
    }
    
    .short-teaching-card {
        flex: 1;
    }
}

/* ===========================================
   ESTUDIOS BÍBLICOS
   ========================================== */
.studies-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--dark-red);
}

.studies-header h2 {
    color: var(--dark-blue);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.studies-header p {
    color: #666;
    font-size: 0.9rem;
}

.studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.study-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.study-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.study-thumbnail {
    position: relative;
    background: var(--dark-blue);
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.study-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.study-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.study-info {
    padding: 15px;
}

.study-title {
    color: var(--dark-blue);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.study-description {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.study-btn {
    background: var(--dark-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
    width: 100%;
}

.study-btn:hover {
    background: #1a3a5f;
}

/* Reproductor de estudio */
.study-player-container {
    padding: 20px 0;
}

.back-to-studies {
    background: none;
    border: none;
    color: var(--dark-blue);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.back-to-studies:hover {
    text-decoration: underline;
}

.study-player-title {
    color: var(--dark-blue);
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 20px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.study-info-panel {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
}

.share-study-btn {
    background: var(--dark-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
}

/* ===========================================
   CALENDARIO CON NAVEGACIÓN
   ========================================== */
.calendar-container {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.calendar-nav-btn {
    background: var(--dark-blue);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-nav-btn:hover {
    background: #1a3a5f;
}

.calendar-month-year {
    color: var(--dark-blue);
    font-size: 1.4rem;
    margin: 0;
}

.calendar-today-btn {
    text-align: center;
    margin-bottom: 20px;
}

.calendar-today {
    background: var(--dark-red);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.calendar-today:hover {
    background: #6b0000;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-weekday {
    text-align: center;
    font-weight: bold;
    color: var(--dark-blue);
    padding: 10px 0;
    font-size: 0.9rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.calendar-day:hover {
    background: var(--dark-blue);
    color: white;
    transform: scale(1.05);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.empty:hover {
    background: transparent;
    transform: none;
}

.calendar-day.today {
    background: var(--dark-red);
    color: white;
    font-weight: bold;
}

/* ===========================================
   CONTENEDORES DE INSTALACION Y AUTENTICACION
   ========================================== */
#installContainer,
#authContainer,
#userInfo {
    margin: 10px 0;
}

#installBtn,
#showRegisterBtn,
#showLoginBtn {
    font-size: 0.95rem;
    padding: 12px;
    cursor: pointer;
}

/* ===========================================
   MODALES - CON SAFE AREA
   ========================================== */
#registrationModal,
#loginModal {
    align-items: center;
    padding: max(20px, env(safe-area-inset-top, 20px)) max(20px, env(safe-area-inset-right, 20px)) max(20px, env(safe-area-inset-bottom, 20px)) max(20px, env(safe-area-inset-left, 20px));
}

/* ===========================================
   HEADER CONTENT (LOGO)
   ========================================== */
.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    line-height: 0;
}

.header-logo {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px;
    max-height: 44px;
    border-radius: 10px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    object-fit: cover;
}

.header-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.header-text {
    display: flex;
    flex-direction: column;
}

.header-text .app-title {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.header-text .app-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
}

/* ===========================================
   DARK MODE SUPPORT
   ========================================== */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
    }
    
    .main-content {
        background: #1a1a1a;
    }
    
    .devotional-card {
        background: #2d2d2d;
    }
    
    .devotional-content {
        color: #e0e0e0;
    }
    
    .verse-box {
        background: #333;
    }
    
    .topic-card {
        background: #2d2d2d;
        border-color: #444;
    }
    
    .topic-name {
        color: white;
    }
    
    .side-menu {
        background: #2d2d2d;
    }
    
    .menu-header {
        background: #2d2d2d;
    }
    
    .menu-header h2 {
        color: white;
    }
    
    .menu-items a {
        color: #e0e0e0;
    }
    
    .menu-items a:hover {
        background: #3d3d3d;
    }
    
    .close-menu {
        color: white;
    }
    
    .close-menu:hover {
        background: #3d3d3d;
    }
    
    .short-teachings-section {
        background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    }
    
    .short-teachings-header h3 {
        color: white;
    }
    
    .short-teaching-card {
        background: #2d2d2d;
    }
    
    .short-teaching-title {
        color: white;
    }
    
    .short-teaching-description {
        color: #aaa;
    }
    
    .study-card {
        background: #2d2d2d;
    }
    
    .study-title {
        color: white;
    }
    
    .study-description {
        color: #aaa;
    }
    
    .studies-header h2 {
        color: white;
    }
    
    .studies-header p {
        color: #aaa;
    }
    
    .study-info-panel {
        background: #333;
    }
    
    .calendar-container {
        background: #2d2d2d;
    }
    
    .calendar-month-year {
        color: white;
    }
    
    .calendar-weekday {
        color: #ddd;
    }
    
    .calendar-day {
        background: #3d3d3d;
        color: #e0e0e0;
    }
    
    .calendar-day.today {
        background: var(--dark-red);
    }
}

/* ===========================================
   AJUSTE PARA PANTALLAS MUY PEQUENAS (iPhone SE, 5, 5S)
   ========================================== */
@media (max-width: 380px) {
    .bottom-nav .nav-label {
        font-size: 0.7rem;
    }
    
    .bottom-nav .nav-icon {
        font-size: 1.1rem;
    }
    
    .menu-items a {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    .devotional-title {
        font-size: 1.3rem;
    }
    
    .header-text .app-title {
        font-size: 1.2rem;
    }
    
    .header-text .app-subtitle {
        font-size: 0.7rem;
    }
    
    .logo-link {
        width: 36px;
        height: 36px;
    }
    
    .header-logo {
        width: 36px !important;
        height: 36px !important;
    }
    
    .short-teaching-card {
        flex: 0 0 260px;
    }
    
    .short-teaching-title {
        font-size: 0.85rem;
    }
    
    .short-teaching-thumbnail {
        width: 80px;
    }
}

/* ===========================================
   TOAST NOTIFICATIONS
   ========================================== */
#toast-message, 
#notificacion-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #0A2342;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: opacity 0.3s;
}

/* ===========================================
   SCROLLBAR STYLING (opcional)
   ========================================== */
.side-menu::-webkit-scrollbar {
    width: 4px;
}

.side-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.side-menu::-webkit-scrollbar-thumb {
    background: var(--dark-red);
    border-radius: 4px;
}

.side-menu::-webkit-scrollbar-thumb:hover {
    background: #6b0000;
}

/* ===========================================
   SETTINGS SECTION
   ========================================== */
.settings-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.settings-section h3 {
    color: var(--dark-blue);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.settings-btn {
    background: var(--dark-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.settings-btn:hover {
    background: #1a3a5f;
}

.settings-status {
    margin-top: 10px;
    font-size: 0.85rem;
}

.settings-help {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #666;
}

/* Enlace de configuración (Política de Privacidad) */
.settings-link {
    display: inline-block;
    color: var(--dark-blue);
    text-decoration: none;
    font-weight: 500;
    margin-top: 5px;
    padding: 8px 0;
    transition: color 0.2s;
}

.settings-link:hover {
    color: var(--dark-red);
    text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
    .settings-section {
        border-top-color: #444;
    }
    
    .settings-help {
        color: #aaa;
    }
    
    .settings-link {
        color: #ddd;
    }
    
    .settings-link:hover {
        color: var(--dark-red);
    }
}

/* ===========================================
   ESTUDIOS SECCIÓN
   ========================================== */
.studies-section {
    margin-bottom: 40px;
}

.studies-section-title {
    color: var(--dark-blue);
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--dark-red);
    display: inline-block;
}

@media (prefers-color-scheme: dark) {
    .studies-section-title {
        color: white;
    }
}

/* ===========================================
   REGISTRO DE ESTUDIO
   ========================================== */
.study-info-box {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.study-info-box h3 {
    color: var(--dark-blue);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.study-info-box ul {
    margin-left: 20px;
    margin-top: 10px;
}

.study-info-box li {
    margin-bottom: 5px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-blue);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.submit-btn {
    background: var(--dark-red);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #6b0000;
}

@media (prefers-color-scheme: dark) {
    .study-info-box {
        background: #333;
    }
    
    .study-info-box h3 {
        color: white;
    }
    
    .form-group label {
        color: #ddd;
    }
    
    .form-group input,
    .form-group select {
        background: #3d3d3d;
        border-color: #555;
        color: white;
    }
}