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

/* ============================================
   MODO OSCURO: NEGRO COMPLETO
   MODO CLARO: BLANCO
   ============================================ */

/* Tema oscuro - NEGRO */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: rgba(20, 20, 20, 0.85);
    --bg-card-featured: linear-gradient(135deg, rgba(25, 25, 25, 0.9), rgba(15, 15, 15, 0.95));
    --text-primary: #e8e0c8;
    --text-secondary: #d4af37;
    --text-muted: #a0906a;
    --border-gold: #d4af37;
    --border-glow: rgba(212, 175, 55, 0.25);
    --input-bg: rgba(30, 30, 30, 0.7);
    --button-gold: linear-gradient(135deg, #d4af37, #b8942e);
    --button-hover: linear-gradient(135deg, #e4c34a, #c9a030);
    --tema-btn-bg: rgba(30, 30, 30, 0.7);
    --tema-btn-text: #e8e0c8;
    --tema-btn-border: rgba(212, 175, 55, 0.2);
    --tema-btn-hover-bg: rgba(212, 175, 55, 0.15);
    --tema-section-bg: rgba(20, 20, 20, 0.5);
    --tema-title-color: #d4af37;
    --plan-card-bg: rgba(25, 25, 25, 0.9);
    --modal-bg: #1a1a1a;
}

/* Tema claro - BLANCO */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #ffffff;
        --bg-secondary: #f5f0e8;
        --bg-card: rgba(255, 252, 245, 0.92);
        --bg-card-featured: linear-gradient(135deg, rgba(255, 250, 240, 0.95), rgba(255, 252, 245, 0.98));
        --text-primary: #2c2416;
        --text-secondary: #8b6914;
        --text-muted: #6b5a3e;
        --border-gold: #c9a03d;
        --border-glow: rgba(201, 160, 61, 0.3);
        --input-bg: rgba(255, 252, 245, 0.9);
        --button-gold: linear-gradient(135deg, #c9a03d, #a07820);
        --button-hover: linear-gradient(135deg, #d4af37, #b8942e);
        --tema-btn-bg: rgba(255, 252, 245, 0.85);
        --tema-btn-text: #2c2416;
        --tema-btn-border: rgba(201, 160, 61, 0.4);
        --tema-btn-hover-bg: rgba(201, 160, 61, 0.2);
        --tema-section-bg: rgba(255, 252, 245, 0.6);
        --tema-title-color: #8b6914;
        --plan-card-bg: rgba(255, 252, 245, 0.95);
        --modal-bg: #ffffff;
    }
    
    body::before {
        opacity: 0.04;
    }
    
    .search-container input::placeholder {
        color: #a0906a;
    }
    
    .card {
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }
}

body {
    background: var(--bg-primary);
    background-image: radial-gradient(circle at 25% 40%, rgba(80, 60, 35, 0.1) 0%, var(--bg-primary) 100%);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    position: relative;
    transition: background 0.3s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 300" opacity="0.03"><path fill="none" d="M0,0 L400,0 L400,300 L0,300 Z" stroke="none"/><path d="M20,50 L50,50 M30,80 L80,80 M40,110 L100,110 M20,140 L70,140" stroke="%23d4af37" stroke-width="0.5" fill="none"/><path d="M300,50 L350,50 M310,80 L360,80 M290,110 L350,110 M320,140 L370,140" stroke="%23d4af37" stroke-width="0.5" fill="none"/><circle cx="200" cy="200" r="1" fill="%23d4af37"/><circle cx="180" cy="220" r="1" fill="%23d4af37"/><circle cx="220" cy="210" r="1" fill="%23d4af37"/></svg>');
    background-repeat: repeat;
    pointer-events: none;
}

.gold-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-gold), #f0c674, var(--border-gold), transparent);
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.gold-line.top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    height: 3px;
    z-index: 100;
}

.gold-line.bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    height: 3px;
    z-index: 100;
}

.gold-line.small {
    width: 80px;
    height: 1px;
    margin: 15px auto;
}

.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    position: relative;
    z-index: 2;
}

header {
    text-align: center;
    margin-bottom: 45px;
}

.cross-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    font-weight: 500;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--border-gold) 60%, #c9a03d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 5px;
}

.subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 15px;
    letter-spacing: 0.5px;
}

.subtitle-ref {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.search-wrapper {
    margin-bottom: 30px;
}

.search-container {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    backdrop-filter: blur(8px);
    border-radius: 60px;
    border: 1px solid var(--border-glow);
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: var(--border-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.search-icon {
    padding: 0 15px;
    font-size: 1.2rem;
    color: var(--border-gold);
}

.search-container input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 0;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    outline: none;
}

.search-container input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.search-container button {
    background: var(--button-gold);
    border: none;
    padding: 10px 24px;
    margin: 6px;
    border-radius: 40px;
    color: #1a1408;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
}

.search-container button:hover {
    transform: scale(1.02);
    background: var(--button-hover);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.search-results {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--border-glow);
    margin-bottom: 25px;
    padding: 0;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-glow);
    cursor: pointer;
    transition: all 0.2s;
}

.result-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

.result-item .referencia {
    color: var(--border-gold);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.result-item .texto {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 28px;
    border: 1px solid var(--border-glow);
    padding: 28px;
    margin-bottom: 28px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 35px -15px rgba(0,0,0,0.4);
    border-color: rgba(212, 175, 55, 0.45);
}

.card.featured {
    background: var(--bg-card-featured);
    border: 1px solid var(--border-gold);
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.15);
    padding: 6px 14px;
    border-radius: 40px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--border-gold);
}

.card-badge.light {
    background: rgba(212, 175, 55, 0.08);
}

.badge-icon {
    font-size: 1rem;
}

.date-container {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.versiculo-content {
    position: relative;
    z-index: 2;
}

.versiculo-texto {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.45rem;
    line-height: 1.55;
    font-weight: 400;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.versiculo-referencia {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--border-gold);
    letter-spacing: 1px;
}

.btn-random {
    width: 100%;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 12px;
    border-radius: 50px;
    color: var(--border-gold);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}

.btn-random:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: var(--border-gold);
    transform: scale(0.98);
}

/* ============================================
   PLANES DE LECTURA
   ============================================ */
.planes-section {
    background: var(--tema-section-bg);
    border-radius: 24px;
    padding: 24px;
    margin: 20px 0;
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-glow);
}

.planes-section h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: var(--tema-title-color);
    letter-spacing: 1px;
}

.planes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.plan-card {
    background: var(--plan-card-bg);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-glow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.plan-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-gold);
}

.plan-card h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--border-gold);
}

.plan-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.ver-plan-btn {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 8px 16px;
    border-radius: 40px;
    color: var(--border-gold);
    cursor: pointer;
    transition: all 0.25s;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    width: 100%;
}

.ver-plan-btn:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: var(--border-gold);
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--modal-bg);
    margin: 50px auto;
    padding: 30px;
    border-radius: 28px;
    width: 90%;
    max-width: 600px;
    border: 1px solid var(--border-gold);
    position: relative;
    color: var(--text-primary);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover {
    color: var(--border-gold);
}

.dia-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-glow);
    margin-bottom: 10px;
}

.dia-item strong {
    color: var(--border-gold);
    display: block;
    margin-bottom: 8px;
}

.dia-item p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ============================================
   TEMAS
   ============================================ */
.temas-section {
    background: var(--tema-section-bg);
    border-radius: 24px;
    padding: 24px;
    margin: 20px 0;
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-glow);
}

.temas-section h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: var(--tema-title-color);
    letter-spacing: 1px;
}

.temas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 12px;
}

.tema-btn {
    background: var(--tema-btn-bg);
    border: 1px solid var(--tema-btn-border);
    padding: 12px 8px;
    border-radius: 40px;
    color: var(--tema-btn-text);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.tema-btn:hover {
    background: var(--tema-btn-hover-bg);
    border-color: var(--border-gold);
    transform: translateY(-2px);
}

.tema-icon {
    font-size: 1.1rem;
}

@media (prefers-color-scheme: light) {
    .tema-btn {
        background: #ffffff;
        border: 1px solid #d4af37;
        color: #2c2416;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    .tema-btn:hover {
        background: #f0e6d0;
        border-color: #c9a03d;
    }
    
    .temas-section h3 {
        color: #6b4c1a;
        text-shadow: none;
    }
    
    .temas-section {
        background: rgba(255, 255, 245, 0.85);
        border: 1px solid #e0d0b0;
    }
}

.divider {
    text-align: center;
    margin: 40px 0 20px;
    color: var(--border-gold);
    font-size: 1.2rem;
    opacity: 0.5;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
}

.footer-quote {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-ref {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 8px 0 20px;
}

.share-button {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--border-gold);
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--border-gold);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    margin-bottom: 20px;
}

.share-button:hover {
    background: var(--border-gold);
    color: #1a1408;
    transform: scale(1.02);
}

.copyright {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.audio-btn {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 8px 16px;
    border-radius: 40px;
    color: var(--border-gold);
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    width: auto;
    margin-top: 15px;
}

.audio-btn:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: var(--border-gold);
    transform: scale(0.98);
}

@media (prefers-color-scheme: light) {
    .audio-btn {
        background: rgba(201, 160, 61, 0.1);
        border-color: rgba(201, 160, 61, 0.4);
        color: #8b6914;
    }
    .audio-btn:hover {
        background: rgba(201, 160, 61, 0.2);
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-gold);
    border-radius: 10px;
}

@media (max-width: 550px) {
    .container {
        padding: 25px 16px 40px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .versiculo-texto {
        font-size: 1.2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .temas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .tema-btn {
        padding: 10px 6px;
        font-size: 0.8rem;
    }
    
    .search-container button {
        padding: 8px 18px;
    }
    
    .planes-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 30px auto;
        padding: 20px;
        width: 95%;
    }
}