/* bhagavata_styles.css */
:root {
    /* Bhagavata Theme */
    --primary: #0e7490;       /* Peacock Teal/Blue */
    --primary-dark: #155e75;
    --secondary: #f59e0b;     /* Pitambara Gold/Amber */
    --accent: #be185d;        /* Lotus Pink */
    --light: #f0f9ff;
    --dark: #0f172a;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --radius: 16px;           
    --shadow: 0 10px 30px rgba(14, 116, 144, 0.1);
    --shadow-hover: 0 15px 40px rgba(14, 116, 144, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --light: #0f172a;
        --dark: #f0f9ff;
        --gray: #94a3b8;
        --gray-light: #1e293b;
        --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.4);
    }
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    width: 100%;
}

/* Header Styles - REVERTED TO FULL WIDTH */
.content-header {
    background: white;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 99;
    border-bottom: 3px solid var(--secondary);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    /* Aligned padding with main-content */
    padding: 20px 30px; 
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    flex-direction: column;
}

.header-logo {
    height: 60px;
    width: auto;
}

.main-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.main-subtitle {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 500;
}

/* Main Content - FIXED: Removed max-width constraint */
.main-content {
    width: 100%;
    /* Same side padding as header ensures vertical alignment */
    padding: 30px; 
}

.welcome-section {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border: 1px solid var(--gray-light);
    border-left: 6px solid var(--primary);
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    text-align: center;
    border: 1px solid var(--gray-light);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin: 40px 0 25px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title::before, .section-title::after {
    content: '';
    height: 2px;
    width: 50px;
    background: var(--secondary);
    display: block;
}

/* Chapters Grid - Will now span full width */
.chapters-grid {
    display: grid;
    /* Adjusted minmax to fill space better on wide screens */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 25px;
    margin-bottom: 40px;
    width: 100%;
}

.chapter-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--gray-light);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.chapter-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary);
}

.chapter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.chapter-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
    background: rgba(14, 116, 144, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.chapter-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.chapter-desc {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.5;
    margin-bottom: 15px;
}

.chapter-count {
    margin-top: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(190, 24, 93, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

#resume-container {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    margin-bottom: 30px;
    display: none; 
}

.resume-button-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.resume-simple-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.resume-icon { font-size: 1.5rem; animation: spin 4s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.resume-text h3 { font-size: 1.1rem; margin-bottom: 2px; }
.resume-text p { font-size: 0.9rem; opacity: 0.9; }

.floating-home-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: var(--transition);
    z-index: 100;
    font-size: 1.2rem;
    text-decoration: none;
}

.floating-home-btn:hover {
    transform: scale(1.1);
    background: #d97706;
}

footer {
    text-align: center;
    padding: 40px;
    color: var(--gray);
    font-size: 0.9rem;
    border-top: 1px solid var(--gray-light);
    background: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Hide logo on mobile */
    .header-logo {
        display: none !important;
    }
    
    /* Hide hero section (welcome-section) on mobile */
    .welcome-section {
        display: none !important;
    }
    
    /* Adjust main content padding when hero is hidden */
    .main-content {
        padding-top: 20px !important;
    }
    
    /* Adjust section title margin when hero is hidden */
    .section-title {
        margin-top: 20px !important;
    }
    
    .content-header { 
        flex-direction: column; 
        text-align: center; 
        gap: 10px; 
        padding: 15px 20px;
    }
    
    .main-content { 
        padding: 20px; 
    }
    
    .chapters-grid { 
        grid-template-columns: 1fr; 
    }
    
    .stat-card { 
        padding: 15px; 
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .main-subtitle {
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin: 25px 0 20px;
    }
    
    .chapter-card {
        padding: 20px 15px;
    }
    
    .chapter-title {
        font-size: 1rem;
    }
    
    .chapter-desc {
        font-size: 0.85rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .welcome-section, .stat-card, .chapter-card, footer, .content-header {
        background: #1e293b;
        border-color: #334155;
    }
    .chapter-icon { background: rgba(14, 116, 144, 0.2); }
}