/* ===== 404 ===== */
        @keyframes float {
            0%, 100% {
                transform: translateY(0px);
            }
            50% {
                transform: translateY(-20px);
            }
        }

        .err404-main .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(18, 154, 232, 0.2);
        }

        .err404-main .btn-lg:hover {
            background-color: #0d7ab8 !important;
        }

/* ===== age-calculator ===== */
        .agecalc-main { overflow-x: hidden; }

        /* hero */
        .ac-hero { text-align: center; margin-bottom: 28px; }
        .ac-hero-art {
            display: inline-grid;
            place-items: center;
            width: 190px;
            max-width: 70%;
            padding: 18px;
            margin-bottom: 12px;
            border-radius: 32px;
            background: linear-gradient(135deg, color-mix(in srgb, #129ae8 16%, var(--surface-1, #fff)), color-mix(in srgb, #7c3aed 14%, var(--surface-1, #fff)));
            box-shadow: 0 12px 28px rgba(18, 154, 232, .18);
        }
        .ac-hero-art img { width: 100%; height: auto; display: block; }
        .ac-hero-text { margin: 0; font-size: 15px; font-weight: 600; color: var(--text-light, #666); }

        /* cards */
        .ac-card {
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(0, 0, 0, .05) !important;
            border-radius: 20px !important;
            background: var(--surface-1, #fff);
            color: var(--text-dark, #333);
            box-shadow: 0 8px 22px rgba(0, 0, 0, .1) !important;
            margin-bottom: 24px;
        }
        .ac-card::before {
            content: "";
            position: absolute;
            inset: 0 0 auto 0;
            height: 5px;
            background: linear-gradient(90deg, #129ae8, #7c3aed);
        }
        .age-calc-card { transition: all 0.3s ease; }
        .age-calc-card:hover { box-shadow: 0 12px 30px rgba(18, 154, 232, .18) !important; }

        /* fields */
        .ac-field { margin-bottom: 22px; }
        .ac-field-last { margin-bottom: 26px; }
        .ac-label {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            font-size: 15px;
            font-weight: 700;
            color: var(--text-dark, #333);
        }
        .ac-label-icon {
            flex: 0 0 auto;
            width: 32px;
            height: 32px;
            display: grid;
            place-items: center;
            border-radius: 10px;
            background: linear-gradient(135deg, #129ae8, #7c3aed);
            box-shadow: 0 5px 12px rgba(18, 154, 232, .3);
        }
        .ac-label-icon .material-symbols-outlined { font-size: 19px; color: #fff; font-variation-settings: 'FILL' 1; }

        .age-calc-input {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            height: 50px;
            padding: 12px 16px;
            font-size: 17px;
            font-weight: 600;
            color: var(--text-dark, #333);
            background: color-mix(in srgb, var(--text-dark, #000) 3%, var(--surface-1, #fff));
            border: 2px solid var(--border-color, #e0e0e0);
            border-radius: 14px;
            transition: border-color .2s, box-shadow .2s, background-color .2s;
        }
        .age-calc-input:focus {
            background: var(--surface-1, #fff);
            border-color: #129ae8;
            box-shadow: 0 0 0 4px rgba(18, 154, 232, .15);
        }

        /* age limit toggle */
        .ac-radio { display: none; }
        .ac-limit-row { display: flex; gap: 10px; }
        .age-btn-check-label {
            flex: 1;
            min-height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 12px;
            font-weight: 700;
            color: var(--text-dark, #333);
            background: transparent;
            border: 2px solid var(--border-color, #e0e0e0);
            border-radius: 14px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: all .25s ease;
        }
        .age-btn-check-label:hover:not(.active) { border-color: #129ae8; transform: translateY(-2px); }
        .age-btn-check-label.active {
            color: #fff;
            border-color: transparent;
            background: linear-gradient(135deg, #129ae8, #7c3aed);
            box-shadow: 0 8px 18px rgba(18, 154, 232, .35);
        }

        /* buttons */
        .age-calc-btn {
            transition: all 0.3s ease;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            -webkit-tap-highlight-color: transparent;
            min-height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            border: 0;
            border-radius: 999px;
            font-weight: 700;
        }
        .age-calc-btn .material-symbols-outlined { font-size: 22px; }
        .ac-btn-primary {
            color: #fff;
            font-size: 16px;
            background: linear-gradient(135deg, #129ae8, #7c3aed);
            box-shadow: 0 8px 18px rgba(18, 154, 232, .35);
        }
        .ac-btn-primary:hover { color: #fff; background: linear-gradient(135deg, #0f8bd1, #6d28d9); transform: translateY(-2px); box-shadow: 0 12px 22px rgba(18, 154, 232, .4); }
        .ac-btn-secondary {
            color: var(--text-dark, #333);
            font-size: 15px;
            background: color-mix(in srgb, var(--text-dark, #000) 7%, var(--surface-1, #fff));
        }
        .ac-btn-secondary:hover { color: #129ae8; transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0, 0, 0, .1); }

        /* result */
        .ac-result-title {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-bottom: 22px;
            font-size: 18px;
            font-weight: 800;
            color: var(--text-dark, #333);
        }
        .ac-result-title::before, .ac-result-title::after {
            content: "";
            flex: 0 0 28px;
            height: 3px;
            border-radius: 3px;
            background: linear-gradient(90deg, #129ae8, #7c3aed);
        }
        .ac-boxes { margin-bottom: 20px; }
        .ac-box {
            position: relative;
            overflow: hidden;
            padding: 18px 6px;
            text-align: center;
            color: #fff;
            border-radius: 18px;
        }
        .ac-box::after {
            content: "";
            position: absolute;
            right: -22px; top: -22px;
            width: 70px; height: 70px;
            border-radius: 50%;
            background: rgba(255, 255, 255, .15);
        }
        .ac-box-years  { background: linear-gradient(135deg, #129ae8, #0d7ab8); box-shadow: 0 8px 18px rgba(18, 154, 232, .3); }
        .ac-box-months { background: linear-gradient(135deg, #7c3aed, #6d28d9); box-shadow: 0 8px 18px rgba(124, 58, 237, .3); }
        .ac-box-days   { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 8px 18px rgba(245, 158, 11, .3); }
        .ac-box-num { position: relative; font-size: 34px; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
        .ac-box-unit { position: relative; font-size: 13px; font-weight: 600; opacity: .92; }

        /* notes */
        .ac-note {
            --note: #129ae8;
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 14px;
            margin-bottom: 16px;
            border-radius: 14px;
            border: 1px solid color-mix(in srgb, var(--note) 30%, transparent);
            background: color-mix(in srgb, var(--note) 9%, var(--surface-1, #fff));
        }
        .ac-note-ok   { --note: #10b981; }
        .ac-note-bad  { --note: #ef4444; }
        .ac-note-warn { --note: #f59e0b; }
        .ac-note-icon {
            flex: 0 0 auto;
            width: 34px;
            height: 34px;
            display: grid;
            place-items: center;
            border-radius: 10px;
            background: var(--note);
        }
        .ac-note-icon .material-symbols-outlined { font-size: 20px; color: #fff; font-variation-settings: 'FILL' 1; }
        .ac-note-body { flex: 1 1 auto; min-width: 0; }
        .ac-note-text { margin: 0; font-size: 14px; line-height: 1.6; font-weight: 600; color: var(--text-dark, #333); }
        .ac-note-text + .ac-note-text { margin-top: 6px; }
        .ac-note-text span { font-weight: 800; color: var(--note); }
        .ac-note-status span { font-size: 15px; }
        .ac-disclaimer { margin-top: 4px; }
        .ac-disclaimer .ac-note-text { font-weight: 500; }

        /* Result Card Animation */
        #ageResultCard { animation: slideUp 0.4s ease; }
        #ageInputCard { animation: slideDown 0.4s ease; }

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

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* jQuery UI Datepicker Mobile Styles */
        @media (max-width: 768px) {
            .ui-datepicker {
                width: auto !important;
                font-size: 16px;
            }

            .ui-datepicker td {
                padding: 4px;
            }

            .ui-datepicker a, .ui-datepicker button {
                padding: 8px !important;
                font-size: 14px;
            }
        }

        /* Prevent zoom on input focus */
        @media (max-width: 768px) {
            .agecalc-main input, .agecalc-main button, .agecalc-main select, .agecalc-main textarea {
                font-size: 16px !important;
            }
        }


        /* ============================================================
   Dark Mode Overrides for Age Calculator
   ============================================================ */

html[data-theme="dark"] .age-calc-card {
    background: var(--surface-1) !important;
}

html[data-theme="dark"] .age-calc-input {
    background: var(--input-bg) !important;
    color: var(--text-dark) !important;
    border-color: var(--border-color) !important;
}

html[data-theme="dark"] .age-calc-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(41, 168, 240, 0.15) !important;
}

html[data-theme="dark"] #ageInputCard,
html[data-theme="dark"] #ageResultCard {
    box-shadow: var(--shadow-lg) !important;
}

/* Labels inside the card */
html[data-theme="dark"] #ageInputCard label,
html[data-theme="dark"] #ageResultCard label,
html[data-theme="dark"] #ageInputCard h5,
html[data-theme="dark"] #ageResultCard h5 {
    color: var(--text-dark) !important;
}

/* Radio-style buttons */
html[data-theme="dark"] .age-btn-check-label {
    border-color: var(--border-color) !important;
    background-color: var(--surface-2) !important;
    color: var(--text-dark) !important;
}

html[data-theme="dark"] .age-btn-check-label[for="age-limit-32"],
html[data-theme="dark"] .age-btn-check-label.active {
    background-color: var(--hero-blue) !important;
    border-color: var(--hero-blue) !important;
    color: #ffffff !important;
}

/* "বয়স দেখুন" button */
html[data-theme="dark"] .age-calc-btn {
    background: var(--hero-blue) !important;
    color: #ffffff !important;
}

/* "আবার ক্যালকুলেট করুন" reset button */
html[data-theme="dark"] #ageResultCard .age-calc-btn[onclick*="reset"] {
    background-color: var(--muted-bg) !important;
    color: var(--text-dark) !important;
}

/* Info boxes */
html[data-theme="dark"] #ageInputCard .material-symbols-outlined,
html[data-theme="dark"] #ageResultCard .material-symbols-outlined {
    color: var(--primary-color) !important;
}

/* Header text */
html[data-theme="dark"] .age-calc-card p,
html[data-theme="dark"] .age-calc-card h1,
html[data-theme="dark"] .age-calc-card h4 {
    color: var(--text-dark) !important;
}

/* jQuery UI datepicker (used on the input) */
html[data-theme="dark"] .ui-datepicker {
    background: var(--surface-1) !important;
    border-color: var(--border-color) !important;
    color: var(--text-dark) !important;
}

html[data-theme="dark"] .ui-datepicker-header {
    background: var(--surface-2) !important;
    border-color: var(--border-color) !important;
    color: var(--text-dark) !important;
}

html[data-theme="dark"] .ui-datepicker-calendar th,
html[data-theme="dark"] .ui-datepicker-calendar td a {
    color: var(--text-dark) !important;
}

html[data-theme="dark"] .ui-datepicker-calendar td a:hover {
    background: var(--hover-bg) !important;
}

/* ===== today-in-history ===== */
        .blog-detail { background: var(--surface-1); color: var(--text-dark); }
        .blog-detail-title { line-height: 1.4; }
        .blog-detail-content { font-size: 14px; overflow-wrap: anywhere; }
        .blog-detail-content p { margin-bottom: 10px; }
        .blog-detail-content img,
        .blog-detail-content iframe,
        .blog-detail-content video { max-width: 100%; }
        .blog-detail-content img { height: auto; }
        .blog-detail-content table { max-width: 100%; display: block; overflow-x: auto; }

/* ===== helpline ===== */
.hl-wrap { max-width: 760px; margin: 0 auto; }
.hl-hero {
    position: relative; overflow: hidden; text-align: center; color: #fff;
    padding: 28px 20px 22px; border-radius: 22px;
    background: linear-gradient(135deg, #129ae8, #7c3aed);
    box-shadow: 0 14px 30px rgba(18, 154, 232, .28);
}
.hl-hero::before, .hl-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); pointer-events: none; }
.hl-hero::before { width: 180px; height: 180px; top: -70px; right: -50px; }
.hl-hero::after { width: 120px; height: 120px; bottom: -50px; left: -30px; }
.hl-hero > * { position: relative; }
.hl-hero-icon { width: 68px; height: 68px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 20px; background: rgba(255, 255, 255, .2); backdrop-filter: blur(4px); }
.hl-hero-icon .material-symbols-outlined { font-size: 38px; font-variation-settings: 'FILL' 1; }
.hl-hero-title { font-size: 1.4rem; font-weight: 800; margin: 0 0 6px; }
.hl-hero-text { margin: 0 0 16px; opacity: .92; }
.hl-hero-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 26px; border-radius: 999px;
    background: #fff; color: #7c3aed; font-weight: 800; text-decoration: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18); transition: transform .18s;
}
.hl-hero-btn:hover { color: #6d28d9; transform: translateY(-2px); }
.hl-hours { margin-top: 14px; font-size: .88rem; opacity: .95; display: flex; align-items: center; justify-content: center; gap: 8px; }
.hl-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); animation: hl-pulse 1.8s infinite; }
@keyframes hl-pulse { 70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

.hl-title { display: flex; align-items: center; justify-content: flex-start; gap: 10px; font-size: 1.05rem; font-weight: 800; color: var(--text-dark); margin: 26px 0 12px; }
.hl-title::before { content: ""; width: 5px; height: 20px; border-radius: 4px; background: linear-gradient(180deg, #129ae8, #7c3aed); }

.hl-channels { display: grid; gap: 12px; }
.hl-tone-0 { --tone: #059669; --tone-2: #34d399; }
.hl-tone-1 { --tone: #16a34a; --tone-2: #4ade80; }
.hl-tone-2 { --tone: #2563eb; --tone-2: #60a5fa; }
.hl-card {
    position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 20px;
    background: var(--surface-1); color: var(--text-dark); text-decoration: none; overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .05); border-radius: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
    transition: transform .18s, box-shadow .18s;
}
.hl-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--tone), var(--tone-2)); }
.hl-card:hover { color: var(--text-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .14); }
.hl-card-icon { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--tone), var(--tone-2)); box-shadow: 0 5px 12px color-mix(in srgb, var(--tone) 32%, transparent); }
.hl-card-icon .material-symbols-outlined { color: #fff; font-size: 26px; font-variation-settings: 'FILL' 1; }
.hl-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.hl-card-title { font-weight: 700; }
.hl-card-text { font-size: .88rem; color: var(--text-light); overflow-wrap: anywhere; }
.hl-card-go { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 20px; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, transparent); transition: background .18s, color .18s; }
.hl-card:hover .hl-card-go { background: var(--tone); color: #fff; }

.hl-faq { display: grid; gap: 10px; }
.hl-q { background: var(--surface-1); border: 1px solid var(--border-color); border-radius: 14px; overflow: hidden; }
.hl-q summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; cursor: pointer; font-weight: 600; color: var(--text-dark); list-style: none; }
.hl-q summary::-webkit-details-marker { display: none; }
.hl-q-arrow { transition: transform .2s; color: #7c3aed; }
.hl-q[open] { border-color: color-mix(in srgb, #7c3aed 45%, var(--border-color)); }
.hl-q[open] .hl-q-arrow { transform: rotate(180deg); }
.hl-q p { margin: 0; padding: 0 16px 14px; color: var(--text-light); line-height: 1.7; }

@media (min-width: 640px) { .hl-channels { grid-template-columns: repeat(3, 1fr); } .hl-card { flex-wrap: wrap; } .hl-card-go { margin-left: auto; } }
@media (prefers-reduced-motion: reduce) { .hl-dot { animation: none; } }
