/* 
   ============================================
   USER CORE DESIGN SYSTEM
   ============================================
*/

[x-cloak] {
    display: none !important;
}

/* Standard Text Truncation (Line Clamp) Utility Classes */
.line-clamp-1, .line-clamp-2, .line-clamp-3, .line-clamp-4 {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

.line-clamp-1 { -webkit-line-clamp: 1 !important; line-clamp: 1 !important; }
.line-clamp-2 { -webkit-line-clamp: 2 !important; line-clamp: 2 !important; }
.line-clamp-3 { -webkit-line-clamp: 3 !important; line-clamp: 3 !important; }
.line-clamp-4 { -webkit-line-clamp: 4 !important; line-clamp: 4 !important; }

.auto-scroll-item {
    white-space: normal !important;
}

/* Modern Theme & Typography Variables */
:root {
    /* Light Mode Palette - Professional & Clean */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --text-main: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-primary: #E814FF;
    --accent-secondary: #d014ff;
    --border-subtle: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

    /* Standard Root Base */
    font-size: 16px;

    /* Dynamic Typography Scale (Professional & Premium Compact) */
    --font-base: 0.88rem;
    --font-h1: clamp(1.45rem, 5vw, 1.8rem);
    --font-h2: clamp(1.25rem, 4vw, 1.5rem);
    --font-h3: clamp(1.1rem, 3vw, 1.3rem);
    --font-h4: clamp(1rem, 2.5vw, 1.15rem);
    --font-h5: 1rem;
    --font-h6: 0.92rem;
    --line-height-relaxed: 1.6;
    --spacing-card: 1.25rem;

    /* Theme-agnostic typography weight to ensure consistency */
    --font-weight-headings: 800;
    --font-weight-content: 400;
}

[data-bs-theme="dark"] {
    /* Dark Mode Palette - Premium Deep Carbon */
    --bg-primary: #0b111a;
    --bg-secondary: #0f172a; /* Slightly lighter than primary for better contrast */
    --bg-glass: rgba(11, 17, 26, 0.85);
    --text-main: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --input-bg: #1c2128;
    --input-border: rgba(255, 255, 255, 0.1);

    /* Anti-irradiation adjustment: Light text on dark can look thicker, 
       so we subtly nudge font-weight or letter-spacing if needed. 
       However, the user wants IDENTICAL size, so we force consistency. */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Standardized Content Description (Unified UI) --- */
.content-details-standard,
.content-details-standard p,
.content-details-standard span,
.content-details-standard li {
    font-size: 1.05rem !important; /* Premium detail size */
    line-height: 1.8 !important;
    color: var(--text-main) !important;
    word-wrap: break-word;
    background: transparent !important; /* Forces transparent across all detail pages */
    transition: color 0.3s ease;
}

.content-details-standard p {
    margin-bottom: 1.5rem !important;
}

.content-details-standard h1,
.content-details-standard h2,
.content-details-standard h3,
.content-details-standard h4 {
    margin-top: 2rem !important;
    margin-bottom: 1.25rem !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
}

.content-details-standard ul, 
.content-details-standard ol {
    margin-bottom: 1.5rem !important;
    padding-left: 1.5rem !important;
}

.content-details-standard li {
    margin-bottom: 0.5rem !important;
}

.content-details-standard img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: var(--card-shadow);
}

@media (max-width: 576px) {
    .content-details-standard,
    .content-details-standard p,
    .content-details-standard span,
    .content-details-standard li {
        font-size: 1.0rem !important; /* Standardized mobile size */
        line-height: 1.7 !important;
    }
    .content-details-standard p {
        margin-bottom: 1.25rem !important;
    }
    /* Standard description for minor pages */
    .description-text {
        font-size: 0.9rem !important;
        line-height: 1.6;
    }
}

/* AdSense Theme Integration & Placeholder Polish */
.google-ad-header,
.google-ad-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto !important;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
    width: 100%;
}


[data-bs-theme="dark"] .google-ad-header,
[data-bs-theme="dark"] .google-ad-footer,
[data-bs-theme="dark"] ins.adsbygoogle iframe {
    filter: invert(0.9) hue-rotate(180deg) !important;
    opacity: 0.8 !important;
    transition: opacity 0.3s ease !important;
}

[data-bs-theme="dark"] ins.adsbygoogle:hover iframe {
    opacity: 1 !important;
}

/* Essential Base Styling */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-main) !important;
    font-size: var(--font-base) !important;
    line-height: var(--line-height-relaxed);
    padding-top: var(--nav-height-desktop);
    transition: background-color 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 1024px) {
    body {
        padding-top: var(--nav-height-mobile);
    }
}

/* Typography Overrides */
h1, .h1 { font-size: var(--font-h1) !important; font-weight: var(--font-weight-headings); }
h2, .h2 { font-size: var(--font-h2) !important; font-weight: 700; }
h3, .h3 { font-size: var(--font-h3) !important; font-weight: 700; }
h4, .h4 { font-size: var(--font-h4) !important; font-weight: 600; }
h5, .h5 { font-size: var(--font-h5) !important; font-weight: 600; }
h6, .h6 { font-size: var(--font-h6) !important; font-weight: 600; }

.section-title,
.post-title,
.blog-title,
.mcq-title,
.quiz-title,
.footer-heading {
    color: var(--text-main) !important;
    line-height: 1.25;
}

/* Premium Section Title with Gradient Underline */
.section-title-premium {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 1.5rem;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    line-height: 1.2;
}

.section-title-premium::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, #E814FF 0%, #7000FF 100%);
    border-radius: 50px;
}

.mcq-title,
.quiz-title {
    font-size: 0.98rem !important; /* Standardized across detail cards */
    font-weight: 700;
}

.post-title {
    font-size: clamp(1.05rem, 2.5vw, 1.2rem) !important; /* Improved mobile scaling */
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

/* Component Themes - Generic & Special Cards */
.card,
.mcq-card-premium,
.quiz-card-premium,
.job-card,
.trending-post-card {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--card-shadow) !important;
    border-radius: 12px !important;
    padding: var(--spacing-card) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover,
.mcq-card-premium:hover,
.quiz-card-premium:hover,
.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.15) !important;
    border-color: var(--accent-primary) !important;
}

/* Badges & Tags */
.badge,
.mcq-badge,
.quiz-badge,
.post-category,
.tag-cloud-item {
    background: rgba(254, 42, 144, 0.08) !important;
    color: var(--accent-primary) !important;
    border: 1px solid rgba(254, 42, 144, 0.15) !important;
    font-weight: 700 !important;
    font-size: 0.68rem !important;
    padding: 3px 10px !important;
    border-radius: 30px !important;
    transition: all 0.3s ease;
}

.badge-premium {
    background: linear-gradient(135deg, #E814FF 0%, #d014ff 100%) !important;
    color: #fff !important;
    padding: 2px 10px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.58rem !important;
    letter-spacing: 0.8px !important;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    backdrop-filter: blur(4px);
}

/* Premium Outline Buttons */
.btn-outline-custom-primary {
    background: transparent !important;
    color: var(--accent-primary) !important;
    border: 2px solid var(--accent-primary) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-outline-custom-primary:hover {
    background: rgba(232, 20, 255, 0.1) !important;
    border-color: #E814FF !important;
    color: #E814FF !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(232, 20, 255, 0.2) !important;
}

.btn-outline-custom-secondary {
    background: transparent !important;
    color: var(--accent-secondary) !important;
    border: 2px solid var(--accent-secondary) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-outline-custom-secondary:hover {
    background: rgba(255, 20, 147, 0.1) !important;
    border-color: #d012a5 !important;
    color: #d012a5 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 20, 147, 0.2) !important;
}

/* Ensure badge text remains white in all themes */
[data-bs-theme="dark"] .badge-premium,
[data-bs-theme="dark"] .badge,
[data-bs-theme="dark"] .mcq-badge,
[data-bs-theme="dark"] .quiz-badge,
[data-bs-theme="dark"] .post-category,
[data-bs-theme="dark"] .tag-cloud-item,
[data-bs-theme="dark"] a.badge-premium,
[data-bs-theme="dark"] a.badge,
[data-bs-theme="dark"] a.post-category {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.badge-premium:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.5) !important;
    color: #fff !important;
    filter: brightness(1.15);
}

/* Responsive scaling for badges - Ultra Compact */
@media (max-width: 991px) {
    .badge-premium {
        padding: 1.5px 8px !important;
        font-size: 0.55rem !important;
        letter-spacing: 0.6px !important;
    }
}

@media (max-width: 576px) {
    .badge-premium {
        padding: 1px 7px !important;
        font-size: 0.52rem !important;
        letter-spacing: 0.4px !important;
    }
}

.badge-glass {
    background: rgba(255, 255, 255, 0.1) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    color: #fff !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.62rem !important;
    letter-spacing: 1px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.badge-glass:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #fff !important;
    transform: translateY(-2px);
}

/* Harmonized Badges for Detail Pages (Text Style) */
.detail-badge-group .badge-premium,
.detail-badge-group .badge-glass {
    font-size: 0.85rem !important;
    padding: 0 !important;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    height: auto !important;
    line-height: normal !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease !important;
    cursor: pointer;
}

.detail-badge-group .badge-premium:hover,
.detail-badge-group .badge-glass:hover {
    color: #fff !important;
    background: none !important;
    transform: translateY(-1px) !important;
    opacity: 1 !important;
}

.badge-separator {
    font-weight: 900 !important;
    color: var(--accent-primary) !important;
    opacity: 0.6;
    font-size: 0.8rem !important;
    margin: 0 10px;
    display: inline-flex;
    align-items: center;
}

/* Standardized Premium Header for Detail Pages */
.detail-header-premium {
    background: linear-gradient(135deg, #0b111a 0%, #1e1b4b 100%) !important;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-header-premium::before,
.detail-header-premium::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
    z-index: 1;
}

.detail-header-premium::before {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation: float-circle-1 20s infinite alternate ease-in-out;
}

.detail-header-premium::after {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation: float-circle-2 15s infinite alternate ease-in-out;
}

@keyframes float-circle-1 {
    from { transform: translate(0, 0); }
    to { transform: translate(-20px, 30px); }
}

@keyframes float-circle-2 {
    from { transform: translate(0, 0); }
    to { transform: translate(30px, -20px); }
}

/* Tablet: Detail badges */
@media (max-width: 991px) {
    .detail-badge-group .badge-premium,
    .detail-badge-group .badge-glass {
        font-size: 0.7rem !important;
    }
    .badge-separator {
        font-size: 0.7rem !important;
        margin: 0 6px;
    }
}

/* Desktop: Hide icons in category badges */
@media (min-width: 992px) {
    .detail-badge-group i {
        display: none !important;
    }
}

/* Tablet & Mobile: Center category badges */
@media (max-width: 991px) {
    .detail-badge-group {
        justify-content: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Mobile: Detail badges — Premium Breadcrumb-Pill Design (Stacked & Centered) */
@media (max-width: 576px) {
    .detail-badge-group {
        flex-direction: column !important;
        align-items: center !important; /* Centered items */
        gap: 0 !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 12px !important;
        padding: 4px !important;
        backdrop-filter: blur(10px) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
        width: fit-content !important;
        min-width: 180px;
        margin-bottom: 2rem !important;
    }
    .detail-badge-group .badge-item {
        display: flex !important;
        align-items: center !important;
        padding: 8px 12px !important;
        width: 100% !important;
        text-decoration: none !important;
    }
    .detail-badge-group .badge-premium,
    .detail-badge-group .badge-glass {
        font-size: 0.75rem !important;
        padding: 6px 12px !important;
        width: 100% !important;
        justify-content: center !important; /* Center text inside pill */
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        border-radius: 8px !important;
        text-align: center !important;
    }
    .detail-badge-group .badge-premium {
        color: #fff !important;
        background: rgba(232, 20, 255, 0.15) !important;
        border: 1px solid rgba(232, 20, 255, 0.2) !important;
        font-weight: 800 !important;
        margin-bottom: 2px !important;
    }
    .detail-badge-group .badge-glass {
        color: rgba(255, 255, 255, 0.8) !important;
        background: transparent !important;
        border: none !important;
        font-weight: 500 !important;
        padding-left: 12px !important; /* Reset offset since icons are centered or removed */
        position: relative;
    }
    .detail-badge-group .badge-premium i {
        margin-right: 8px;
        color: var(--accent-primary);
        font-size: 0.9rem;
    }
    .detail-badge-group .badge-glass i {
        margin-right: 6px;
        color: var(--accent-primary);
        font-size: 0.8rem;
        opacity: 0.7;
    }
    .badge-separator {
        display: none !important; /* Hide separator in mobile stacked layout */
    }
}

/* Global Page Meta Sync: Forced bit-identical sizes for Author, Published, Questions */
/* Theme-agnostic font-sizes guarantee identical rendering in both Light and Dark modes */
.page-meta-strip .meta-value {
    font-size: 14.5px !important; /* Absolute Pixel Sync */
    font-weight: 800 !important;
    text-transform: uppercase !important;
    color: #fff !important;
    line-height: normal !important;
    letter-spacing: 0.3px !important;
    display: block !important;
}

.page-meta-strip .meta-label {
    font-size: 11.5px !important; /* Absolute Pixel Sync */
    font-weight: 500 !important;
    opacity: 0.8 !important;
    color: #fff !important;
    line-height: normal !important;
    letter-spacing: 0.1px !important;
    display: block !important;
}

[data-bs-theme="dark"] .page-meta-strip .meta-value,
[data-bs-theme="dark"] .page-meta-strip .meta-label {
    -webkit-font-smoothing: initial !important; /* Reset smoothing factor */
    -moz-osx-font-smoothing: initial !important;
}

@media (max-width: 576px) {
    .page-meta-strip .meta-value { font-size: 10px !important; }
    .page-meta-strip .meta-label { font-size: 9px !important; }
}

[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-white {
    background-color: var(--bg-secondary) !important;
}

[data-bs-theme="dark"] .text-dark {
    color: var(--text-main) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

/* Table Styles for Dark Mode */
[data-bs-theme="dark"] table {
    color: var(--text-main) !important;
    border-color: var(--border-subtle) !important;
}

[data-bs-theme="dark"] th {
    color: var(--text-main) !important;
    background-color: #1c2128 !important;
}

[data-bs-theme="dark"] td {
    border-bottom-color: var(--border-subtle) !important;
}

/* Premium Alert Styling for Dark Mode */
[data-bs-theme="dark"] .alert-success {
    background: rgba(40, 167, 69, 0.1) !important;
    border: 1px solid rgba(40, 167, 69, 0.2) !important;
    color: #2ecc71 !important;
}

/* Paywall Blur Adjustments */
[data-bs-theme="dark"] .paywall-overlay {
    background-color: rgba(22, 27, 34, 0.9) !important;
    border-color: var(--border-subtle) !important;
}

[data-bs-theme="dark"] .paywall-blur {
    filter: blur(8px) brightness(0.5);
}

/* Premium Navbar Theme - Dark Mode Fixes */
[data-bs-theme="dark"] .navbar-modern,
[data-bs-theme="dark"] .navbar-center {
    background: rgba(11, 17, 26, 0.95) !important;
    border-bottom-color: var(--border-subtle) !important;
    border-left-color: var(--border-subtle) !important;
}

[data-bs-theme="dark"] .navbar-link {
    color: var(--text-main) !important;
}

[data-bs-theme="dark"] .navbar-link:hover {
    background: rgba(232, 20, 255, 0.1) !important;
    color: var(--accent-primary) !important;
}

[data-bs-theme="dark"] .navbar-dropdown {
    background: rgba(22, 27, 34, 0.98) !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-subtle) !important;
}

[data-bs-theme="dark"] .category-title {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-main) !important;
}

[data-bs-theme="dark"] .subcategory-link {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .subcategory-link:hover {
    color: var(--accent-primary) !important;
    background: rgba(232, 20, 255, 0.08) !important;
}

[data-bs-theme="dark"] .navbar-icon-btn {
    color: var(--text-main) !important;
}

[data-bs-theme="dark"] .navbar-mobile-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
}

/* Generic Banner & Hero Contrast */
[data-bs-theme="dark"] .banner h1 {
    color: #ffffff !important;
}

/* Premium Navbar Theme */
.navbar-premium {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle) !important;
}

/* Footer Theme - Adaptive & Professional */
.site-footer {
    background-color: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
    position: relative;
    z-index: 5;
}

[data-bs-theme="dark"] .site-footer {
    background-color: #0d1117 !important;
}

/* High Contrast Fixes for Light Mode */
html[data-bs-theme="light"] .site-footer p,
html[data-bs-theme="light"] .footer-tagline,
html[data-bs-theme="light"] .copyright-text {
    color: #475569 !important;
}

html[data-bs-theme="light"] .footer-app-banner {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

html[data-bs-theme="light"] .app-banner-title {
    color: #0f172a !important;
    font-weight: 800 !important;
}

html[data-bs-theme="light"] .app-banner-subtitle {
    color: #334155 !important;
    font-weight: 500 !important;
}

html[data-bs-theme="light"] .store-btn {
    background-color: #1e293b !important;
    color: #fff !important;
    border: 1px solid #0f172a !important;
}

html[data-bs-theme="light"] .store-btn i,
html[data-bs-theme="light"] .store-btn .store-btn-name {
    color: #fff !important;
}

.footer-heading {
    font-size: 1.1rem !important;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer-tagline,
.copyright-text,
.footer-links a {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-primary) !important;
}

/* --- MOBILE & TABLET FOOTER REFINEMENTS --- */
@media (max-width: 991px) {
    .site-footer .container {
        padding-left: 25px !important;
        padding-right: 25px !important;
    }
}

@media (max-width: 576px) {
    .site-footer {
        padding: 3rem 0 1rem !important;
    }
    .footer-brand-logo img {
        width: 130px !important;
    }
    .footer-heading {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
    }
    .footer-links li {
        margin-bottom: 8px !important;
    }
    .footer-links a {
        font-size: 0.75rem !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
        gap: 6px !important;
    }
    .footer-links a i {
        margin-right: 0 !important;
        font-size: 0.95rem !important;
        opacity: 0.8;
        flex-shrink: 0;
    }
    .site-footer .col-4 {
        padding-left: 10px !important; /* Increased from 5px for better breathing room */
        padding-right: 10px !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: #334155;
    border: 3px solid var(--bg-primary);
    border-radius: 10px;
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb { background: #475569; }

/* Dark Mode Sidebar Black Theme */
[data-bs-theme="dark"] .widget {
    background-color: #000 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8) !important;
}

[data-bs-theme="dark"] .widget-title {
    color: #fff !important;
    border-bottom-color: rgba(232, 20, 255, 0.3) !important;
}

/* Standardized Form Styling */
.form-control,
.form-control-custom {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-main) !important;
    border-radius: 10px !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease !important;
    font-size: 0.9rem !important;
}

.form-control:focus,
.form-control-custom:focus {
    background-color: var(--bg-secondary) !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 4px rgba(232, 20, 255, 0.1) !important;
    color: var(--text-main) !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-control-custom,
[data-bs-theme="dark"] .widget-search input {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-main) !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-control-custom:focus,
[data-bs-theme="dark"] .widget-search input:focus {
    background-color: #22272e !important;
    border-color: var(--accent-primary) !important;
}

[data-bs-theme="dark"] .form-label { color: var(--text-main) !important; }

::placeholder { color: var(--text-muted) !important; opacity: 0.7 !important; }
[data-bs-theme="dark"] ::placeholder { color: #6e7681 !important; }

.widget-search input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    color: var(--text-main);
    transition: all 0.3s ease;
}

.widget-search input:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(232, 20, 255, 0.1);
}

[data-bs-theme="dark"] .text-reset,
[data-bs-theme="dark"] .card-meta span,
[data-bs-theme="dark"] .post-meta-author span {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] a.post-title:hover { color: var(--accent-primary) !important; }

img[src*="no-image.png"] {
    filter: grayscale(0.5) contrast(0.8) brightness(1.1);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border: 1px solid var(--border-subtle);
    padding: 10px;
}

[data-bs-theme="dark"] img[src*="no-image.png"] {
    filter: grayscale(1) invert(0.9) opacity(0.4);
    background: #000;
}

/* --- SweetAlert Theme-Aware Loader --- */
.mg-loader-card {
    background-color: var(--bg-secondary) !important;
    color: var(--text-main) !important;
    border-radius: 20px !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--card-shadow) !important;
}
[data-bs-theme="dark"] .mg-loader-card .swal2-loader {
    border-color: var(--accent-primary) transparent var(--accent-primary) transparent !important;
}
[data-bs-theme="dark"] .mg-loader-card .swal2-title { color: var(--text-main) !important; }
[data-bs-theme="dark"] .mg-loader-card .swal2-html-container { color: var(--text-secondary) !important; }

/* Floating Circles Animation */
.circles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, rgba(232, 20, 255, 0.2), rgba(43, 86, 245, 0.2));
    animation: animateIcon 50s linear infinite;
    bottom: -150px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(232, 20, 255, 0.1);
}

.circles li:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.circles li:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 24s; }
.circles li:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; }
.circles li:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 36s; }
.circles li:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }
.circles li:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 3s; }
.circles li:nth-child(7) { left: 35%; width: 150px; height: 150px; animation-delay: 7s; }
.circles li:nth-child(8) { left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 90s; }
.circles li:nth-child(9) { left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 70s; }
.circles li:nth-child(10) { left: 85%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 22s; }

@keyframes animateIcon {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; border-radius: 0; }
    100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; border-radius: 50%; }
}

/* Offline Detection animations */
@keyframes offlineBannerIn {
    from { transform: translateY(-80px) scale(0.85); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes wifiPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* Book cards (Global) */
.book-card-img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2 / 3 !important;
    object-fit: cover !important;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

/* Auto Scroll / Marquee Styles */
.auto-scroll-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
    padding: 10px 0;
}

.auto-scroll-track {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-left 100s linear infinite;
}

.auto-scroll-wrapper:hover .auto-scroll-track {
    animation-play-state: paused;
}

.auto-scroll-item {
    display: inline-block;
    margin: 0 15px;
    vertical-align: middle;
    text-align: center;
    white-space: normal !important; /* Forces internal text to wrap despite parent track nowrap */
    max-width: 90vw; /* Safety for very small screens */
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 
   ============================================
   SUPPORT MODAL - PREMIUM UI
   ============================================
*/
#helpSupportModal { z-index: 11000 !important; }
#helpSupportModal .modal-dialog { z-index: 11001 !important; max-width: 750px; }
#helpSupportModal .modal-content { 
    z-index: 11002 !important; 
    background: var(--bg-secondary); 
    border-radius: 24px; 
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25); 
    border: none;
}

.support-modal-hero-premium {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #0082ff 0%, #00d2ff 50%, #22c55e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
}

.support-modal-hero-premium .hero-heart-circle {
    width: 65px;
    height: 65px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.support-modal-hero-premium .hero-heart-circle i {
    font-size: 2rem;
    color: #e814ff;
}

.support-modal-hero-premium .hero-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 2px;
    position: relative;
    z-index: 2;
}

.support-modal-hero-premium .hero-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.btn-close-transparent {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 10;
    cursor: pointer;
}

.btn-close-transparent:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

/* SadaPay Premium Card */
.sadapay-card-premium {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #1d4ed8 100%);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    color: white;
    height: 100%;
    box-shadow: 0 15px 35px rgba(30, 27, 75, 0.3);
}

.sadapay-card-premium .card-brand-pill {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    width: fit-content;
    margin-bottom: 40px;
    backdrop-filter: blur(5px);
}

.sadapay-card-premium .card-chip {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 45px;
    height: 35px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 6px;
    opacity: 0.9;
}

.sadapay-card-premium .label-group {
    margin-bottom: 20px;
}

.sadapay-card-premium .card-label {
    font-size: 0.6rem;
    font-weight: 700;
    opacity: 0.7;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.sadapay-card-premium .card-holder-name {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sadapay-card-premium .card-number-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sadapay-card-premium .card-number {
    font-family: 'Outfit', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.btn-copy-card {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.btn-copy-card:hover {
    background: white;
    color: #1e1b4b;
}

/* Mini Account Cards */
.mini-account-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.mini-account-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
    box-shadow: var(--card-shadow);
}

.mini-account-card .card-info {
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.mini-account-card .method-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.mini-account-card .method-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    display: block;
}

.mini-account-card .card-icon-bg {
    position: absolute;
    right: 15px;
    bottom: -10px;
    font-size: 4rem;
    opacity: 0.05;
    transform: rotate(-15deg);
    pointer-events: none;
}

/* Info Alert */
.support-info-alert {
    background: rgba(232, 20, 255, 0.04);
    border: 1px solid rgba(232, 20, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.support-info-alert .info-icon {
    width: 24px;
    height: 24px;
    background: #e814ff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.support-info-alert .info-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 991px) {
    #helpSupportModal .modal-dialog { max-width: 95%; }
}

@media (max-width: 576px) {
    .sadapay-card-premium .card-number { font-size: 1.3rem; }
    .mini-account-card .method-number { font-size: 1.1rem; }
    .support-modal-hero-premium { height: 140px; }
}

/* 
   ============================================
   CUSTOM NOTIFICATION SYSTEM
   ============================================
*/
.mg-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 400px;
}

.mg-custom-toast {
    pointer-events: auto;
    background: white;
    width: fit-content;
    min-width: 200px;
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(0,0,0,0.03);
    animation: toastSlideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mg-custom-toast.closing {
    animation: toastFadeOut 0.3s ease forwards;
}

@keyframes toastSlideDown {
    from { transform: translateY(-20px) scale(0.9) translateX(0); opacity: 0; }
    to { transform: translateY(0) scale(1) translateX(0); opacity: 1; }
}

@keyframes toastFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); }
}

.mg-toast-icon-wrap {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mg-toast-icon-wrap.success { background: #e8f5e9; color: #2e7d32; }
.mg-toast-icon-wrap.error { background: #ffebee; color: #c62828; }
.mg-toast-icon-wrap.info { background: #e3f2fd; color: #1565c0; }
.mg-toast-icon-wrap.warning { background: #fff3e0; color: #ef6c00; }

.mg-toast-icon-wrap i {
    font-size: 0.95rem;
}

.mg-toast-content {
    flex-grow: 1;
}

.mg-toast-title {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e293b;
    margin-bottom: 0;
    line-height: 1.2;
}

.mg-toast-message {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 1px;
}

@media (max-width: 576px) {
    .mg-toast-container {
        top: 15px;
        width: 90%;
    }
    .mg-custom-toast {
        padding: 6px 14px;
    }
}
