/* Fonts */
:root {
    --default-font: "Noto Serif Georgian",  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --heading-font: "Exo 2", sans-serif;
    --nav-font: "Ubuntu",  sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    scroll-behavior: smooth;
    font-family: var(--default-font);
    line-height: 1.8;
}

h1,
h2,
h3,
h4,
h5,
h6,
code {
    font-family: var(--heading-font);
}

/* Custom styles for code blocks */
.code-block-container {
    position: relative;
    margin: 1rem 0;
    background-color: #282c34; /* A nice dark background for code */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    /*max-height: 500px; !* Enable vertical scrolling for long code blocks *!*/
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #21252b;
    color: #abb2bf;
    font-family: var(--heading-font);
    font-size: 0.9rem;
    position: sticky; /* Make the header stick to the top on scroll */
    top: 80px;
    z-index: 1; /* Ensure it stays above the code */
}

.code-block-header .language {
    text-transform: uppercase;
    font-weight: bold;
}

.code-block-header .copy-btn {
    background: none;
    border: 1px solid #61afef;
    color: #61afef;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease-in-out;
}

.code-block-header .copy-btn:hover {
    background-color: #61afef;
    color: #282c34;
}

.code-block-header .copy-btn.copied {
    background-color: #98c379;
    color: #282c34;
    border-color: #98c379;
}

.code-block-container pre {
    margin: 0;
    padding: 1rem;
    /* overflow-x is now handled by the container */
    background-color: transparent; /* The container has the background */
    color: #abb2bf;
}

.code-block-container pre code {
    font-family: var(--heading-font);
    font-size: 0.95rem;
    line-height: 1.5;
    background: none;
    padding: 0;
}

.main-content {
    flex: 1;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    transition: box-shadow 0.3s ease;
}

.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    transition: transform 0.3s ease;
}

/* Perfect Center Menu */
.navbar-collapse {
    position: relative;
}

.main-menu {
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* Keep right items aligned properly */
.header-actions {
    margin-left: auto;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    transform: rotate(90deg);
}

@media (max-width: 991.98px) {
    .navbar-collapse.show, .navbar-collapse.collapsing {
        background-color: var(--bs-body-bg);
        border-radius: 0.5rem;
        padding: 1rem;
        margin-top: 0.5rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
}

[data-bs-theme="dark"] .navbar {
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] {
    --bs-body-bg: #f8f9fa;
    --bs-body-color: #212529;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #212529;
    --bs-body-color: #f8f9fa;
}

[data-bs-theme="dark"] .lead {
    color: #adb5bd;
}

[data-bs-theme="dark"] .text-primary {
    color: #0d6efd !important;
}

[data-bs-theme="dark"] .btn-primary {
    --bs-btn-bg: #0d6efd;
    --bs-btn-border-color: #0d6efd;
    --bs-btn-hover-bg: #0b5ed7;
    --bs-btn-hover-border-color: #0a58ca;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: #f8f9fa;
    --bs-btn-border-color: #f8f9fa;
    --bs-btn-hover-bg: #f8f9fa;
    --bs-btn-hover-color: #212529;
}

.theme-switcher {
    cursor: pointer;
}

/* ... existing styles ... */

.theme-icon, .theme-icon-active {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em; /* Align with text */
    fill: currentcolor;
}

#gotoTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    visibility: hidden;
    background-color: #064e3b;
}

.rounded-circle {
    border-radius: 24% !important;
}

#gotoTop.show {
    opacity: 1;
    visibility: visible;
}

.footer {
    transition: background-color 0.3s ease;
}

.avatar-container {
    position: relative;
    display: inline-block;
}

.admin-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: var(--bs-primary);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    border: 1px solid white;
}

[data-bs-theme="dark"] .admin-badge {
    border-color: var(--bs-gray-800);
}

/* Islamic Pro Styles from index.php */
:root {
    --primary-emerald: #064e3b;
    --accent-gold: #d4af37;
    --soft-gold: #fcf6ba;
    --glass-white: rgba(255, 255, 255, 0.9);
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
}

.islamic-body {
    font-family: 'Inter', 'Noto Sans Bengali', sans-serif;
    background: var(--bg-gradient);
    color: #1e293b;
    overflow-x: hidden;
    padding-bottom: 140px;
}

h1, h2, h3, .navbar-brand-premium {
    font-family: 'Cinzel', serif;
}

/* Premium Navbar */
.navbar-premium {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.03);
    z-index: 1100;
}

.navbar-brand-premium {
    font-size: 1.6rem;
    background: linear-gradient(to right, var(--primary-emerald), #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Hero Section with Islamic Pattern */
.hero-premium {
    background: var(--primary-emerald);
    background-image: url('https://www.transparenttextures.com/patterns/islamic-art.png');
    color: white;
    padding: 60px 0 100px;
    border-radius: 0 0 50px 50px;
    position: relative;
    margin-bottom: -50px;
    box-shadow: 0 20px 40px rgba(6, 78, 59, 0.2);
}

/* Gold Gradient Card */
.featured-card {
    background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    padding: 2px;
    border-radius: 24px;
    margin-top: -20px;
    box-shadow: 0 15px 35px rgba(170, 119, 28, 0.25);
    position: relative;
    z-index: 10;
}

.featured-inner {
    background: #fff;
    border-radius: 22px;
    padding: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.featured-item {
    text-align: center;
    flex: 1;
}

.featured-item i {
    font-size: 1.5rem;
    color: var(--primary-emerald);
    margin-bottom: 5px;
    display: block;
}

.featured-item span {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
}

/* Category Headers */
.category-header {
    margin-top: 50px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-header h2 {
    font-size: 1.4rem;
    color: var(--primary-emerald);
    margin: 0;
    white-space: nowrap;
}

.category-line {
    height: 2px;
    background: linear-gradient(to right, var(--accent-gold), transparent);
    width: 100%;
}

/* Gorgeous Subcategory Cards */
.luxury-card {
    background: #fff;
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 20px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--card-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.luxury-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-emerald), #10b981);
    opacity: 0;
    z-index: -1;
    transition: 0.4s;
}

.luxury-card:hover {
    transform: translateY(-8px);
    color: #fff !important;
}

.luxury-card:hover::before { opacity: 1; }

.luxury-card:hover .icon-wrapper {
    background: rgba(255,255,255,0.2);
    color: #fff;
    transform: scale(1.1);
}

.luxury-card:hover .luxury-label { color: #fff; }

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    color: var(--primary-emerald);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 15px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.luxury-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #334155;
    transition: 0.3s;
    line-height: 1.3;
}

/* Responsive Grid System */
.premium-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

@media (min-width: 992px) {
    .premium-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 576px) {
    .premium-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hero-premium { padding: 40px 0 80px; }
    .luxury-card { padding: 20px 10px; }
}

/* Glass Player */
.glass-player {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    z-index: 1050;
    max-width: 1100px;
    margin: 0 auto;
}

.player-info { display: flex; align-items: center; gap: 15px; }
.player-img { 
    width: 45px; height: 45px; 
    background: linear-gradient(135deg, var(--primary-emerald), var(--accent-gold));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center; color: white;
    font-size: 1.2rem;
}

.track-name { font-weight: 700; margin: 0; font-size: 0.85rem; }
.track-artist { font-size: 0.7rem; color: #64748b; margin: 0; }

.player-btns { display: flex; align-items: center; gap: 20px; color: var(--primary-emerald); }
.player-btns i { cursor: pointer; font-size: 1.4rem; }
.play-main { font-size: 2.6rem !important; color: var(--accent-gold); }

/* Floating Sahri Info */
.sahri-float {
    position: fixed;
    bottom: 105px;
    right: 30px;
    background: #fff;
    padding: 12px 20px;
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-left: 5px solid var(--accent-gold);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 768px) {
    .sahri-float { bottom: 100px; left: 20px; right: 20px; padding: 10px 15px; }
}

.btn-gold {
    background: linear-gradient(135deg, #bf953f, #aa771c);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-gold:hover { box-shadow: 0 5px 15px rgba(170, 119, 28, 0.3); transform: translateY(-2px); color: white; }

/* Main Header Custom Styles */
.main-header {
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    background-color: #ffffff !important;
    padding: 0.5rem 0;
}

.main-menu .nav-link {
    font-family: 'Inter', 'Noto Sans Bengali', sans-serif;
    font-size: 1.05rem;
    padding-left: 0.8rem !important;
    padding-right: 0.8rem !important;
    transition: color 0.2s;
    white-space: nowrap;
}

.main-menu .nav-link:hover, .main-menu .nav-link.active {
    color: #064e3b !important;
    font-weight: 700 !important;
}

.header-actions .btn {
    font-family: 'Inter', 'Noto Sans Bengali', sans-serif;
    font-size: 0.95rem;
}

.btn-outline-donation {
    border: 1px solid #dee2e6;
    color: #333;
    background: #fff;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.btn-outline-donation:hover {
    background: #f8f9fa;
    border-color: #ccc;
    color: #000;
}

.btn-download {
    background-color: #064e3b;
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-download:hover {
    background-color: #053c2d;
    color: #fff;
    transform: translateY(-1px);
}

.header-actions .bi-bell, .header-actions .bi-person-circle {
    color: #334155;
    transition: color 0.2s;
}

.header-actions .bi-bell:hover, .header-actions .bi-person-circle:hover {
    color: #064e3b;
}

.no-caret::after {
    display: none;
}


