:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-bg: #1a1a1a;
    --dark-surface: #2d2d2d;
    --dark-text: #ffffff;
    --light-bg: #ffffff;
    --light-surface: #f5f5f5;
    --light-text: #333333;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 20px rgba(0,0,0,0.2);
}

[data-theme="dark"] {
    --bg-color: var(--dark-bg);
    --surface-color: var(--dark-surface);
    --text-color: var(--dark-text);
    --border-color: #444;
}

[data-theme="light"] {
    --bg-color: var(--light-bg);
    --surface-color: var(--light-surface);
    --text-color: var(--light-text);
    --border-color: var(--border-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Navbar */
.navbar {
    background-color: var(--surface-color);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.btn-theme {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn-theme:hover {
    background-color: var(--surface-color);
}

.user-menu {
    position: relative;
}

.btn-user {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface-color);
    border-radius: 5px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 150px;
    display: none;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 3px;
}

.user-dropdown a:hover {
    background-color: var(--primary-color);
    color: white;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Lectura */
.lectura-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.lectura-sidebar {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.lectura-sidebar label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.lectura-sidebar select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
}

.lectura-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-action {
    flex: 1;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-action:hover {
    background: #2980b9;
}

.versiculo-actions {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.versiculo-header h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.versiculos-list {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    line-height: 2;
    font-size: 1.1rem;
}

.versiculo-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-left: 3px solid var(--primary-color);
    transition: background-color 0.3s;
    cursor: pointer;
}

.versiculo-item:hover {
    background-color: var(--bg-color);
}

.versiculo-numero {
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.versiculo-texto {
    color: var(--text-color);
}

.referencias-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.referencia-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-color);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.referencia-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Búsqueda */
.search-container {
    max-width: 1200px;
    margin: 0 auto;
}

.search-header h1 {
    margin-bottom: 2rem;
}

.search-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-options input,
.search-options select {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 1rem;
}

.search-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.search-results {
    display: grid;
    gap: 1rem;
}

.search-result-item {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s;
}

.search-result-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Planes */
.planes-container h1 {
    margin-bottom: 2rem;
}

.planes-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.planes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.plan-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.plan-progress {
    margin-top: 1rem;
    height: 8px;
    background: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
}

.plan-progress-bar {
    height: 100%;
    background: var(--secondary-color);
    transition: width 0.3s;
}

/* Marcadores y Notas */
.marcadores-container,
.notas-container,
.historial-container {
    max-width: 1200px;
    margin: 0 auto;
}

.marcadores-list,
.notas-list,
.historial-list {
    display: grid;
    gap: 1rem;
}

.marcador-item,
.nota-item,
.historial-item {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s;
}

.marcador-item:hover,
.nota-item:hover,
.historial-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.nota-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.nota-item .nota-fecha {
    color: #999;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s;
}

.modal-large {
    max-width: 900px;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--danger-color);
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.auth-form input,
.auth-form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    width: 100%;
}

.btn-primary:hover {
    background: #2980b9;
}

.compare-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.compare-item {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
}

.compare-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--surface-color);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: block;
    }

    .lectura-container {
        grid-template-columns: 1fr;
    }

    .lectura-sidebar {
        position: static;
    }

    .search-options {
        flex-direction: column;
    }

    .planes-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-color);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

