:root {
    --primary: #6366f1; /* Indigo */
    --secondary: #ec4899; /* Pink */
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    --text-main: #0f172a;
    --glass: rgba(255, 255, 255, 0.95);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-gradient);
    margin: 0; padding: 0;
    color: var(--text-main);
    padding-bottom: 80px;
    min-height: 100vh;
}

/* --- LANDING --- */
.landing-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #1e1b4b, #4338ca);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 2000; text-align: center; color: white;
}
.landing-title { font-size: 3rem; font-weight: 800; margin-bottom: 10px; letter-spacing: -1px; }
.lang-btn {
    width: 80%; max-width: 300px; padding: 15px; margin: 10px; border-radius: 50px;
    border: none; font-size: 1.1rem; font-weight: bold; cursor: pointer; text-decoration: none; color: white;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: transform 0.2s;
}
.btn-hindi { background: linear-gradient(to right, #f97316, #ea580c); }
.btn-eng { background: linear-gradient(to right, #0ea5e9, #0284c7); }
.lang-btn:active { transform: scale(0.95); }

/* --- NAVBAR --- */
.app-nav {
    background: var(--glass); backdrop-filter: blur(10px);
    padding: 15px 20px; position: sticky; top: 0; z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center;
}
.nav-logo { font-size: 1.4rem; font-weight: 900; color: var(--primary); text-decoration: none; }
.nav-badge { background: #e0e7ff; color: var(--primary); padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; }

/* --- BOOK GRID & CARDS --- */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
/* Grid handled by inline styles in index.php for priority, but defined here too */
.grid-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media(min-width:600px) { .grid-layout { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }

.cover-box { width: 100%; aspect-ratio: 2/3; background: #e2e8f0; position: relative; }
.cover-img { width: 100%; height: 100%; object-fit: cover; }

/* --- CHAPTER LIST --- */
.toolbar { background: white; padding: 15px; border-radius: 12px; margin-bottom: 20px; display: flex; gap: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.search-input { flex: 1; padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; outline: none; }
.filter-select { padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: white; }

.chapter-card {
    background: white; padding: 15px; margin-bottom: 10px; border-radius: 12px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); cursor: pointer; transition: background 0.2s;
    border: 1px solid transparent;
}
.chapter-card:hover { background: #f8fafc; border-color: var(--primary); }
.ch-title { font-weight: 600; font-size: 1rem; color: #334155; }
.ch-meta { font-size: 0.8rem; margin-top: 2px; }

/* --- PAGINATION --- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.page-btn {
    width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: white; color: #64748b; text-decoration: none; font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.page-btn.active { background: var(--primary); color: white; }