/* ==========================================
   VARIABLES Y RESET
   ========================================== */
:root {
    --primary-color: #4F46E5;
    --secondary-color: #7C3AED;
    --accent-color: #EC4899;
    --dark-bg: #1F2937;
    --light-bg: #F9FAFB;
    --text-dark: #111827;
    --text-light: #6B7280;
    --border-color: #E5E7EB;
    --success-color: #10B981;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   HEADER
   ========================================== */
.header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.header-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.header-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.header-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.header-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.main-content {
    flex: 1;
    padding: 3rem 0;
}

/* ==========================================
   SEARCH SECTION
   ========================================== */
.search-section {
    margin-bottom: 3rem;
}

.search-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.search-card:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-5px);
}

.search-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Tabs personalizados */
.nav-pills {
    background: var(--light-bg);
    padding: 0.5rem;
    border-radius: 15px;
}

.nav-pills .nav-link {
    color: var(--text-light);
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.nav-pills .nav-link:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

/* Formularios */
.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-select,
.form-control {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-select:focus,
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.15);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

/* ==========================================
   LOADING SPINNER
   ========================================== */
#loading {
    animation: fadeIn 0.3s ease;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ==========================================
   RESULTS SECTION
   ========================================== */
.results-section {
    animation: fadeIn 0.5s ease;
}

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

.bible-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bible-card:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-5px);
}

.bible-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem;
    position: relative;
}

.bible-version {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.version-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.bible-content {
    padding: 2rem;
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
    overflow-y: auto;
    max-height: 600px;
}

.bible-content::-webkit-scrollbar {
    width: 8px;
}

.bible-content::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 10px;
}

.bible-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.bible-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Referencia del versículo */
.verse-reference {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: block;
}

.verse-text {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Resultados de búsqueda */
.search-result-item {
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    background: var(--light-bg);
    margin-bottom: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: #f3f4f6;
    transform: translateX(5px);
}

.search-result-ref {
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer-section {
    background: var(--dark-bg);
    color: white;
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-section p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .header-title {
        font-size: 2rem;
    }
    
    .header-subtitle {
        font-size: 1rem;
    }
    
    .search-card {
        padding: 1.5rem;
    }
    
    .search-title {
        font-size: 1.5rem;
    }
    
    .nav-pills .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .bible-version {
        font-size: 1.1rem;
    }
    
    .bible-content {
        font-size: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .header-icon {
        font-size: 2.5rem;
    }
    
    .header-title {
        font-size: 1.8rem;
    }
    
    .nav-pills {
        flex-direction: column;
    }
    
    .nav-pills .nav-link {
        margin-bottom: 0.5rem;
    }
}

/* ==========================================
   ANIMACIONES ADICIONALES
   ========================================== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

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