:root {
    --primary: #8e0000;
    --saffron: #f39c12;
    --gold: #d4af37;
    --bg: #fffbf2;
    --hindi-font: 'Tiro Devanagari Hindi', serif;
}

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

body {
    background-color: var(--bg);
    font-family: 'Poppins', sans-serif;
    color: #333;
}

header {
    background: linear-gradient(135deg, var(--primary), #5a0000);
    color: white;
    padding: 20px 15px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    font-family: var(--hindi-font);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.search-area {
    margin-top: 15px;
}

#searchInput {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    border-radius: 25px;
    border: none;
    outline: none;
    font-size: 1rem;
}

.chapter-nav {
    display: flex;
    overflow-x: auto;
    background: white;
    padding: 10px;
    gap: 8px;
    border-bottom: 2px solid var(--gold);
    scrollbar-width: none;
}

.chapter-nav::-webkit-scrollbar { display: none; }

.chip {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
}

.chip.active {
    background: var(--saffron);
    color: white;
    border-color: var(--saffron);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-left: 6px solid var(--primary);
    transition: 0.3s;
    animation: fadeIn 0.5s ease;
}

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

.card:hover { transform: translateY(-5px); }

.card-header {
    font-size: 0.8rem;
    color: var(--saffron);
    font-weight: 600;
    margin-bottom: 8px;
}

.card-body {
    font-family: var(--hindi-font);
    font-size: 1.25rem;
    line-height: 1.8;
    color: #1a1a1a;
    white-space: pre-wrap; /* Keeps the verse line breaks */
}

/* Coloring specific styles found in your JSON */
.type-header {
    color: var(--primary);
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.status { text-align: center; padding: 50px; font-size: 1.2rem; }

footer {
    text-align: center;
    padding: 30px;
    background: #f1f1f1;
    font-family: var(--hindi-font);
    font-size: 1.5rem;
    color: var(--primary);
}

@media (max-width: 600px) {
    header h1 { font-size: 1.4rem; }
    .card-grid { grid-template-columns: 1fr; }
}