﻿        :root {
            --ink-950: #020c16;
            --ink-900: #03111f;
            --ink-850: #071827;
            --ink-800: #0a2031;
            --surface: rgba(5, 22, 36, 0.86);
            --surface-strong: rgba(4, 17, 29, 0.95);
            --surface-soft: rgba(11, 38, 56, 0.68);
            --line: rgba(188, 210, 222, 0.18);
            --line-strong: rgba(215, 163, 61, 0.42);
            --ivory: #f7f0e4;
            --muted: #a9bac4;
            --gold: #e1ad4c;
            --gold-bright: #f3c66b;
            --green: #54c987;
            --green-soft: rgba(84, 201, 135, 0.12);
            --red: #d9574f;
            --blue: #74a9e8;
            --purple: #b78ae8;
            --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
            --serif: Georgia, "Times New Roman", serif;
            --sans: "Segoe UI", Arial, sans-serif;
        }

        * { box-sizing: border-box; }
        html { scroll-behavior: smooth; }

        body {
            margin: 0;
            min-width: 320px;
            min-height: 100vh;
            color: var(--ivory);
            font-family: var(--sans);
            background-color: var(--ink-900);
            background-image:
                linear-gradient(180deg, rgba(3, 17, 31, 0.08) 0%, rgba(3, 17, 31, 0.5) 62%, #03111f 100%),
                url("calendar-time-background.png");
            background-size: cover, 100% auto;
            background-position: center top;
            background-repeat: no-repeat;
            background-attachment: fixed;
            overflow-x: hidden;
        }

        body::before {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            background: radial-gradient(circle at 50% 22%, transparent 0 22%, rgba(2, 12, 22, 0.28) 64%, rgba(2, 12, 22, 0.72) 100%);
            z-index: -1;
        }

        a { color: inherit; }
        button, input { font: inherit; }
        button, a { -webkit-tap-highlight-color: transparent; }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        .shell {
            width: min(1480px, calc(100% - 40px));
            margin: 0 auto;
        }

        .navbar {
            min-height: 76px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 28px;
            border-bottom: 1px solid var(--line);
        }

        .brand {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            color: var(--gold-bright);
            text-decoration: none;
            font-family: var(--serif);
            font-size: clamp(1rem, 2vw, 1.34rem);
            font-weight: 700;
            white-space: nowrap;
        }

        .brand-logo {
            width: 36px;
            height: 36px;
            display: block;
            object-fit: contain;
            border-radius: 9px;
            box-shadow: 0 0 22px rgba(225, 173, 76, 0.12);
        }

        .nav-links { display: flex; align-items: stretch; align-self: stretch; }

        .nav-link {
            min-width: 145px;
            padding: 0 22px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 9px;
            color: #d9e1e5;
            text-decoration: none;
            border-left: 1px solid var(--line);
            position: relative;
            transition: color 180ms ease, background 180ms ease;
        }

        .nav-link::after {
            content: "";
            position: absolute;
            left: 22px;
            right: 22px;
            bottom: -1px;
            height: 2px;
            background: var(--gold);
            transform: scaleX(0);
            transition: transform 180ms ease;
        }

        .nav-link:hover,
        .nav-link:focus-visible,
        .nav-link.active { color: var(--ivory); background: rgba(255, 255, 255, 0.025); }
        .nav-link:hover::after,
        .nav-link:focus-visible::after,
        .nav-link.active::after { transform: scaleX(1); }

        .icon {
            width: 20px;
            height: 20px;
            fill: none;
            stroke: currentColor;
            stroke-width: 1.8;
            stroke-linecap: round;
            stroke-linejoin: round;
            flex: 0 0 auto;
        }

        .time-stage {
            min-height: 298px;
            display: grid;
            grid-template-columns: minmax(150px, 0.8fr) minmax(520px, 1.8fr) minmax(210px, 0.8fr);
            align-items: center;
            gap: 30px;
            padding: 30px 24px 34px;
            position: relative;
            overflow: hidden;
        }

        .orbit {
            position: absolute;
            width: 540px;
            height: 540px;
            left: 50%;
            top: 54%;
            transform: translate(-50%, -50%);
            border: 1px solid rgba(225, 173, 76, 0.18);
            border-radius: 50%;
            pointer-events: none;
            animation: orbitFloat 18s ease-in-out infinite alternate;
        }

        .orbit::before,
        .orbit::after {
            content: "";
            position: absolute;
            border-radius: 50%;
            border: 1px dashed rgba(225, 173, 76, 0.12);
        }

        .orbit::before { inset: 52px; }
        .orbit::after { inset: 108px; border-style: solid; }

        .season-rail {
            display: grid;
            gap: 24px;
            color: rgba(169, 186, 196, 0.66);
            font-family: var(--serif);
            letter-spacing: 0.28em;
            font-size: 0.78rem;
            text-transform: uppercase;
        }

        .season-rail span { display: flex; align-items: center; gap: 12px; }
        .season-rail span::after { content: ""; height: 1px; width: 48px; background: var(--line); }

        .time-center { position: relative; z-index: 1; text-align: center; }
        .location {
            margin: 0 0 10px;
            color: var(--gold-bright);
            font-size: 0.78rem;
            font-weight: 700;
            letter-spacing: 0.17em;
            text-transform: uppercase;
        }

        .live-clock {
            margin: 0;
            color: #f7d5a3;
            font-family: var(--serif);
            font-size: clamp(3.7rem, 8vw, 7rem);
            font-variant-numeric: tabular-nums;
            font-weight: 400;
            letter-spacing: -0.07em;
            line-height: 1;
            text-shadow: 0 8px 36px rgba(225, 173, 76, 0.15);
        }

        .current-date {
            margin: 16px 0 0;
            color: #d9d9d0;
            font-family: var(--serif);
            font-size: clamp(1rem, 2vw, 1.28rem);
        }

        .timezone {
            margin: 12px 0 0;
            color: var(--muted);
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 0.88rem;
        }

        .timezone-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--green);
            box-shadow: 0 0 0 4px rgba(84, 201, 135, 0.12);
            animation: statusPulse 2.6s ease-in-out infinite;
        }

        .clock-hand {
            position: absolute;
            width: 174px;
            height: 1px;
            left: 50%;
            top: 56%;
            transform-origin: left center;
            background: linear-gradient(90deg, rgba(225, 173, 76, 0), var(--gold));
            z-index: -1;
            animation: secondSweep 60s steps(60, end) infinite;
        }

        .clock-hand::after {
            content: "";
            position: absolute;
            right: -4px;
            top: -4px;
            width: 9px;
            height: 9px;
            border-radius: 50%;
            background: var(--gold);
            box-shadow: 0 0 14px rgba(225, 173, 76, 0.5);
        }

        .mini-calendar {
            justify-self: end;
            width: min(100%, 240px);
            color: var(--muted);
            opacity: 0.82;
        }

        .mini-month {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            margin-bottom: 11px;
            color: var(--ivory);
            font-family: var(--serif);
        }

        .mini-month small { color: var(--gold); font-family: var(--sans); }
        .mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
        .mini-grid span { min-height: 27px; display: grid; place-items: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.7rem; }
        .mini-grid .weekday { min-height: 23px; color: var(--gold); font-weight: 700; font-size: 0.61rem; }
        .mini-grid .today { color: var(--ink-950); background: var(--gold); font-weight: 800; }
        .mini-grid .blank { color: transparent; }

        .ghana-stripe { height: 3px; background: linear-gradient(90deg, #b7322c 0 33.33%, #e5b13f 33.33% 66.66%, #237a4c 66.66%); opacity: 0.9; }

        main { padding: 14px 0 0; }
        .dashboard {
            display: grid;
            grid-template-columns: minmax(270px, 0.86fr) minmax(440px, 1.35fr) minmax(270px, 0.86fr);
            gap: 18px;
            align-items: stretch;
        }

        .panel {
            min-width: 0;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 18px;
            box-shadow: var(--shadow);
            backdrop-filter: blur(18px);
            animation: panelRise 700ms both;
        }

        .panel:nth-child(2) { animation-delay: 90ms; }
        .panel:nth-child(3) { animation-delay: 180ms; }
        .side-panel { padding: 24px 20px 20px; display: flex; flex-direction: column; }
        .center-panel { padding: 26px; border-color: var(--line-strong); }

        .panel-title {
            display: flex;
            align-items: center;
            gap: 11px;
            margin: 0;
            color: var(--gold-bright);
            font-family: var(--serif);
            font-size: 1.2rem;
            line-height: 1.25;
        }

        .islamic-panel .panel-title { color: var(--green); }
        .panel-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
        .year-range { color: var(--muted); font-size: 0.72rem; white-space: nowrap; }

        .hijri-now {
            margin: 22px 0 16px;
            padding: 18px 0;
            border-top: 1px solid var(--line);
            border-bottom: 1px solid var(--line);
        }

        .hijri-primary { display: flex; align-items: flex-end; gap: 9px; }
        .hijri-day { color: var(--ivory); font-family: var(--serif); font-size: 2.7rem; line-height: 0.9; }
        .hijri-month { color: var(--green); font-family: var(--serif); font-size: 1.06rem; }
        .hijri-year { margin-top: 8px; color: var(--muted); font-size: 0.8rem; }

        .list-label { margin: 0 0 9px; color: var(--muted); font-size: 0.73rem; letter-spacing: 0.08em; text-transform: uppercase; }
        .holiday-list-label { margin-bottom: 5px; }
        .holiday-intro { margin: 0; color: var(--ivory); font-family: var(--serif); font-size: 1rem; }
        .timeline-list { position: relative; margin: 0; padding: 0 0 0 18px; list-style: none; }
        .timeline-list::before { content: ""; position: absolute; left: 5px; top: 13px; bottom: 13px; width: 1px; background: linear-gradient(var(--green), rgba(84, 201, 135, 0.08)); }
        .ghana-panel .timeline-list::before { background: linear-gradient(var(--gold), rgba(225, 173, 76, 0.08)); }

        .event-row {
            position: relative;
            padding: 12px 0 13px;
            border-bottom: 1px solid var(--line);
            animation: rowReveal 520ms both;
        }

        .event-row:last-child { border-bottom: 0; }
        .event-row:nth-child(2) { animation-delay: 65ms; }
        .event-row:nth-child(3) { animation-delay: 130ms; }
        .event-row:nth-child(4) { animation-delay: 195ms; }
        .event-row:nth-child(5) { animation-delay: 260ms; }
        .event-row:nth-child(6) { animation-delay: 325ms; }
        .event-row::before {
            content: "";
            position: absolute;
            width: 9px;
            height: 9px;
            left: -17px;
            top: 18px;
            border: 2px solid var(--surface-strong);
            border-radius: 50%;
            background: var(--green);
        }
        .ghana-panel .event-row::before { background: var(--gold); }
        .event-row.passed { opacity: 0.52; }
        .event-row.today::before { box-shadow: 0 0 0 5px rgba(225, 173, 76, 0.14); }
        .event-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
        .event-date { color: #c9d4da; font-size: 0.75rem; line-height: 1.4; }
        .event-status { flex: 0 0 auto; color: var(--gold); font-size: 0.66rem; font-weight: 700; white-space: nowrap; }
        .islamic-panel .event-status { color: var(--green); }
        .event-name { margin: 3px 0 0; color: var(--ivory); font-family: var(--serif); font-size: 0.9rem; line-height: 1.45; }
        .event-note { margin: 2px 0 0; color: var(--muted); font-size: 0.7rem; line-height: 1.45; }

        .source-note {
            margin: auto 0 0;
            padding-top: 18px;
            border-top: 1px solid var(--line);
            color: #8da2ae;
            font-size: 0.67rem;
            line-height: 1.55;
        }

        .source-note a { color: #bfd0d9; text-underline-offset: 3px; }
        .source-note a:hover { color: var(--gold-bright); }

        .analyzer-copy { margin: 8px 0 20px 31px; color: var(--muted); font-size: 0.82rem; }
        .date-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 20px; }
        .date-wrap { position: relative; }
        .date-input {
            width: 100%;
            min-height: 50px;
            padding: 0 15px;
            color: var(--ivory);
            color-scheme: dark;
            background: rgba(1, 10, 18, 0.58);
            border: 1px solid rgba(188, 210, 222, 0.26);
            border-radius: 10px;
            outline: none;
            transition: border-color 180ms ease, box-shadow 180ms ease;
        }
        .date-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(225, 173, 76, 0.12); }
        .analyze-btn {
            min-height: 50px;
            padding: 0 24px;
            color: #1a1206;
            background: linear-gradient(135deg, #f2c873, #cf9635);
            border: 0;
            border-radius: 10px;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 10px 26px rgba(225, 173, 76, 0.15);
            transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
        }
        .analyze-btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 14px 30px rgba(225, 173, 76, 0.22); }
        .analyze-btn:active { transform: translateY(0); }
        .analyze-btn:focus-visible { outline: 3px solid rgba(243, 198, 107, 0.35); outline-offset: 2px; }

        .results { display: grid; gap: 10px; }
        .result-row {
            display: grid;
            grid-template-columns: 46px 1fr auto;
            gap: 14px;
            align-items: center;
            min-height: 86px;
            padding: 13px 15px;
            border: 1px solid var(--line);
            border-radius: 12px;
            background: rgba(7, 25, 40, 0.72);
            transition: border-color 180ms ease, transform 180ms ease;
        }
        .result-row:hover { transform: translateX(3px); border-color: rgba(225, 173, 76, 0.34); }
        .result-icon { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(116, 169, 232, 0.28); border-radius: 9px; color: var(--blue); background: rgba(61, 104, 163, 0.1); }
        .result-row:nth-child(2) .result-icon { color: var(--green); border-color: rgba(84, 201, 135, 0.28); background: var(--green-soft); }
        .result-row:nth-child(3) .result-icon { color: var(--gold); border-color: rgba(225, 173, 76, 0.28); background: rgba(225, 173, 76, 0.08); }
        .result-row:nth-child(4) .result-icon { color: var(--purple); border-color: rgba(183, 138, 232, 0.28); background: rgba(183, 138, 232, 0.08); }
        .result-label { margin: 0 0 5px; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }
        .result-value { margin: 0; color: var(--ivory); font-family: var(--serif); font-size: 1rem; line-height: 1.45; }
        .calendar-badge { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: #c9d4da; font-size: 0.62rem; white-space: nowrap; }
        .calendar-badge.julian { color: var(--gold); border-color: rgba(225, 173, 76, 0.36); }
        .calendar-badge.gregorian { color: var(--green); border-color: rgba(84, 201, 135, 0.36); }
        .calendar-badge.aminian { color: var(--purple); border-color: rgba(183, 138, 232, 0.36); }

        .technical-note { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.69rem; line-height: 1.55; }

        .footer {
            margin-top: 20px;
            min-height: 98px;
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
            gap: 24px;
            border-top: 1px solid var(--line);
            color: #8fa2ad;
            font-family: var(--serif);
            font-size: 0.72rem;
        }
        .footer p { margin: 0; }
        .developer-credit { text-align: center; color: #c6c8c2; }
        .developer-credit a { color: var(--green); text-decoration: none; }
        .developer-credit a:hover { text-decoration: underline; text-underline-offset: 4px; }
        .footer-links { display: flex; justify-content: flex-end; gap: 20px; }
        .footer-links a { color: inherit; text-decoration: none; }
        .footer-links a:hover { color: var(--gold-bright); }

        @keyframes panelRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
        @keyframes rowReveal { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
        @keyframes orbitFloat { from { transform: translate(-50%, -50%) rotate(-2deg) scale(0.98); } to { transform: translate(-50%, -50%) rotate(2deg) scale(1.02); } }
        @keyframes statusPulse { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }
        @keyframes secondSweep { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }

        @media (max-width: 1120px) {
            .time-stage { grid-template-columns: 1fr minmax(480px, 1.8fr) 1fr; }
            .dashboard { grid-template-columns: 1fr 1.35fr; }
            .center-panel { grid-column: 2; grid-row: 1 / span 2; }
            .ghana-panel { grid-column: 1; }
        }

        @media (max-width: 820px) {
            body { background-size: auto 760px; background-attachment: scroll; }
            .shell { width: min(100% - 24px, 680px); }
            .navbar { min-height: 66px; }
            .nav-link { min-width: auto; padding: 0 14px; }
            .nav-link span { display: none; }
            .time-stage { min-height: 310px; grid-template-columns: 1fr; padding: 28px 12px; }
            .season-rail, .mini-calendar { display: none; }
            .orbit { width: 440px; height: 440px; }
            .dashboard { grid-template-columns: 1fr; }
            .center-panel, .ghana-panel { grid-column: auto; grid-row: auto; }
            .center-panel { grid-row: 1; }
            .islamic-panel { grid-row: 2; }
            .ghana-panel { grid-row: 3; }
            .footer { grid-template-columns: 1fr; text-align: center; padding: 26px 0; }
            .footer-links { justify-content: center; }
        }

        @media (max-width: 520px) {
            .brand { font-size: 0.94rem; }
            .brand-logo { width: 30px; height: 30px; }
            .live-clock { font-size: clamp(3rem, 18vw, 4.6rem); }
            .date-form { grid-template-columns: 1fr; }
            .analyze-btn { width: 100%; }
            .center-panel { padding: 22px 16px; }
            .side-panel { padding: 22px 16px; }
            .result-row { grid-template-columns: 40px 1fr; }
            .result-icon { width: 40px; height: 40px; }
            .calendar-badge { grid-column: 2; justify-self: start; }
            .analyzer-copy { margin-left: 0; }
            .footer-links { flex-wrap: wrap; gap: 12px 18px; }
        }

        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
        }
