:root {
    --emerald-900: #0a3622;
    --emerald-800: #0f5132;
    --emerald-700: #156842;
    --emerald-100: #e8f5ee;
    --emerald-50: #f3faf6;
    --gold-500: #c9a227;
    --gold-400: #dfbe4d;
    --gold-100: #fbf6e3;
    --bg-page: #f5f7f5;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-soft: #e2e8f0;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-sm: 0 2px 10px rgba(15, 81, 50, 0.06);
    --shadow-md: 0 10px 30px rgba(15, 81, 50, 0.10);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-page);
    background-image: radial-gradient(circle at 15% 10%, rgba(21, 104, 66, 0.05) 0%, transparent 40%),
                      radial-gradient(circle at 85% 90%, rgba(201, 162, 39, 0.06) 0%, transparent 40%);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Arabic Typography */
[dir="rtl"],
.arabic-text {
    font-family: 'Amiri', 'Scheherazade New', serif;
    line-height: 1.9;
}

.arabic-hero {
    font-family: 'Amiri', 'Scheherazade New', serif;
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    line-height: 1.8;
    color: var(--gold-400);
}

.arabic-word-lg {
    font-family: 'Amiri', 'Scheherazade New', serif;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.7;
    color: var(--emerald-800);
}

/* Navbar */
.navbar-quran {
    background: linear-gradient(135deg, var(--emerald-900) 0%, var(--emerald-800) 60%, var(--emerald-700) 100%);
    box-shadow: 0 4px 20px rgba(10, 54, 34, 0.18);
    border-bottom: 2px solid rgba(201, 162, 39, 0.45);
    padding: 0.75rem 0;
}

.navbar-quran .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.brand-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(223, 190, 77, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-400);
    font-size: 1.2rem;
}

.navbar-quran .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.45rem 0.9rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.navbar-quran .nav-link:hover,
.navbar-quran .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.navbar-quran .nav-link.active {
    box-shadow: inset 0 -2px 0 var(--gold-400);
}

.user-pill {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.875rem;
    color: #fff;
}

/* Main Content Wrapper */
.main-shell {
    flex: 1;
    width: 100%;
    max-width: 1180px;
    margin: 1.75rem auto;
    padding: 0 1rem;
}

.content-surface {
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}

@media (max-width: 768px) {
    .content-surface {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, var(--emerald-900) 0%, var(--emerald-800) 55%, #197349 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 2.75rem 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.hero-banner::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(223, 190, 77, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

/* Category Cards */
.category-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--emerald-700);
}

.icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: var(--emerald-100);
    color: var(--emerald-800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    margin-bottom: 1rem;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.category-card:hover .icon-circle {
    background: var(--emerald-800);
    color: var(--gold-400);
    transform: scale(1.06);
}

/* Feature Pills */
.feature-card {
    background: var(--emerald-50);
    border: 1px solid rgba(15, 81, 50, 0.1);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    height: 100%;
}

/* Filter Panel */
.filter-card {
    background: #fafcfb;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.huruf-btn {
    min-width: 44px;
    height: 44px;
    font-family: 'Amiri', 'Scheherazade New', serif;
    font-size: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
    transition: all 0.18s ease;
}

.huruf-btn:hover {
    transform: translateY(-2px);
}

/* Tables */
.table-quran {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-soft);
}

.table-quran thead th {
    background-color: var(--emerald-800);
    color: #fff;
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.15);
    padding: 0.9rem 0.75rem;
}

.table-quran tbody tr {
    transition: background-color 0.15s ease;
}

.table-quran tbody tr:hover {
    background-color: var(--emerald-50);
}

.prep-badge {
    display: inline-block;
    background: var(--gold-100);
    color: #8a6910;
    border: 1px solid rgba(201, 162, 39, 0.35);
    border-radius: 999px;
    padding: 0.2rem 0.85rem;
    font-weight: 700;
}

/* Buttons & Forms */
.btn-emerald {
    background-color: var(--emerald-800);
    border-color: var(--emerald-800);
    color: #fff;
    font-weight: 600;
}

.btn-emerald:hover {
    background-color: var(--emerald-900);
    border-color: var(--emerald-900);
    color: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--emerald-700);
    box-shadow: 0 0 0 0.2rem rgba(15, 81, 50, 0.15);
}

/* Footer */
.footer-quran {
    background: linear-gradient(135deg, #0b291b 0%, var(--emerald-900) 100%);
    color: rgba(255, 255, 255, 0.85);
    padding: 2rem 1rem;
    margin-top: auto;
    border-top: 3px solid var(--gold-500);
}

.footer-quran img {
    height: 54px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}
