/* ------------------------------------------------------------------
   Root + Resets
------------------------------------------------------------------ */

:root {
    /* Farbpalette – modern + islamisch inspiriert, jetzt etwas heller-blau */
    --color-bg-deep: #061326;
    --color-bg-soft: #07172e;
    --color-bg-panel: rgba(12, 32, 72, 0.94);
    --color-border-main: rgba(191, 219, 254, 0.55);
    /* Hauch Türkis im Glow */
    --color-border-glow: rgba(103, 232, 249, 0.22);
    --color-text-main: #e5f0ff;
    --color-text-muted: #c7ddff;
    --color-accent-gold: #facc15;
    --color-accent-gold-soft: #fbbf24;
    --color-accent-emerald: #22c55e;
    --color-accent-emerald-dark: #16a34a;
    --color-accent-sky: #38bdf8;
    --color-accent-indigo: #818cf8;
    --color-accent-orange: #f97316;

    /* optionale Türkis-Akzentvariablen, falls du später mehr nutzen willst */
    --accent-turquoise: #67e8f9;
    --accent-turquoise-soft: rgba(103, 232, 249, 0.18);

    /* Schriften – für 4K etwas größer */
    --fs-base: 18px;
    --radius-panel: 24px;
    --shadow-strong: 0 26px 70px rgba(6, 12, 30, 0.65);
    --shadow-soft: 0 20px 50px rgba(7, 23, 55, 0.8);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--fs-base);
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-text-main);
    height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.22), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(191, 219, 254, 0.16), transparent 55%),
        radial-gradient(circle at top, #0b1f3b, #061326);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Dezentes geometrisches Muster über dem Hintergrund – islamische Anmutung */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.16;
    mix-blend-mode: soft-light;
    background-image:
        radial-gradient(circle at 0 0, transparent 70%, rgba(15, 30, 90, 0.85) 71%),
        conic-gradient(
            from 45deg,
            rgba(148, 191, 255, 0.25) 0 15deg,
            transparent 15deg 30deg,
            rgba(37, 99, 235, 0.22) 30deg 45deg,
            transparent 45deg 60deg,
            rgba(226, 232, 240, 0.16) 60deg 75deg,
            transparent 75deg 90deg
        );
    background-size: 260px 260px;
}

/* Layout-Hülle für 4K – zentriert mit großzügigen Rändern */
.page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 24px 36px;
    max-width: 3840px;
    margin: 0 auto;
    gap: 16px;
}

/* ------------------------------------------------------------------
   Top Bar
------------------------------------------------------------------ */

.top-bar {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1.4fr;
    align-items: center;
    padding: 18px 32px;
    border-radius: var(--radius-panel);
    background: linear-gradient(
        135deg,
        rgba(12, 32, 72, 0.97),
        rgba(15, 43, 96, 0.93),
        rgba(12, 32, 72, 0.97)
    );
    border: 1px solid var(--color-border-main);
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

/* Dezentes ornamentales Band oben in der Top-Bar */
.top-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid var(--color-border-glow);
    pointer-events: none;
    mask-image: radial-gradient(circle at 0 0, transparent 46%, black 62%);
}

.top-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 0, rgba(56, 189, 248, 0.32), transparent 65%),
        radial-gradient(circle at 80% 100%, rgba(234, 179, 8, 0.2), transparent 65%);
    opacity: 0.45;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.logo img {
    height: 9rem;
    max-width: 28rem;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6));
}

.title {
    text-align: center;
    z-index: 1;
}

.title h1 {
    font-size: 4.5rem;
    line-height: 1.25;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text-main);
    text-shadow: 0 0 24px rgba(15, 23, 42, 0.9);
}

/* Optional arabische Unterzeile – falls per HTML gesetzt */
.title .subtitle-ar {
    margin-top: 0.75rem;
    font-size: 2.6rem;
    letter-spacing: 0.08em;
    color: var(--color-accent-gold-soft);
}

.dates {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    z-index: 1;
}

.dates .gregorian {
    font-weight: 600;
    font-size: 2.2rem;
    color: var(--color-text-main);
}

.dates .hijri {
    font-style: italic;
    font-size: 2rem;
    color: var(--color-accent-indigo);
}

.dates .clock {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-accent-gold);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ------------------------------------------------------------------
   Main Layout
------------------------------------------------------------------ */

.content {
    display: grid;
    grid-template-columns: 3fr 1.4fr;
    gap: 18px;
    flex: 1;
    overflow: hidden;
}

/* Rechter Bereich */
.side-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ------------------------------------------------------------------
   Shared Card Styling (Panels rechts + Gebetsliste)
------------------------------------------------------------------ */

.prayers,
.side-panel .weather,
.side-panel .next-prayer-panel,
.clock-panel,
.announcements {
    background: var(--color-bg-panel);
    border-radius: var(--radius-panel);
    border: 1px solid var(--color-border-main);
    box-shadow: var(--shadow-strong);
    padding: 18px 24px 24px;
    position: relative;
    overflow: hidden;
}

/* ornamentale Rahmenlinie, leicht geometrisch */
.prayers::before,
.side-panel .weather::before,
.side-panel .next-prayer-panel::before,
.clock-panel::before,
.announcements::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid var(--color-border-glow);
    pointer-events: none;
    mask-image: radial-gradient(circle at 0 0, transparent 40%, black 62%);
}

/* dezentes geometrisches Muster im Panel-Hintergrund */
.prayers::after,
.side-panel .weather::after,
.side-panel .next-prayer-panel::after,
.clock-panel::after,
.announcements::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.22;
    mix-blend-mode: soft-light;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(59, 130, 246, 0.25),
            rgba(59, 130, 246, 0.25) 1px,
            transparent 1px,
            transparent 12px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(45, 212, 191, 0.22),
            rgba(45, 212, 191, 0.22) 1px,
            transparent 1px,
            transparent 12px
        );
}

/* Panel-Titel */
.prayers h2,
.side-panel .weather h2,
.side-panel .next-prayer-panel h2,
.side-panel .announcements h2 {
    font-size: 1.6rem;
    margin-bottom: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #a5b4fc;
    position: relative;
}

/* kleines Ornament unter Überschrift */
.prayers h2::after,
.side-panel .weather h2::after,
.side-panel .next-prayer-panel h2::after,
.side-panel .announcements h2::after {
    content: "";
    display: block;
    width: 4.5rem;
    height: 2px;
    margin-top: 8px;
    background-image: linear-gradient(
        to right,
        transparent 0,
        var(--color-accent-gold-soft) 30%,
        var(--color-accent-emerald) 70%,
        transparent 100%
    );
}

/* ------------------------------------------------------------------
   Prayer Grid / Cards
------------------------------------------------------------------ */

.prayer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 16px;
    height: calc(100% - 44px);
}

.prayer-card {
    --star-size: 60%;          /* Größe des Sterns */

    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.85), rgba(12, 32, 72, 0.97));
    border-radius: 22px;
    padding: 14px 12px 16px;
    border: 1px solid rgba(129, 140, 248, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    isolation: isolate;
}


/* 8-zackiger Rahmenstern */
.prayer-card .prayer-star {
    position: absolute;
    inset: 50%;
    transform: translate(-50%, -50%);
    width: 74%;
    height: auto;
}

/* Text über den Stern legen */
.prayer-card .label,
.prayer-card .time {
    position: relative;
    z-index: 1;
}

/* Label (z.B. FAJR, GÜNEŞ etc.) */
.prayer-card .label {
    font-size: 3.6rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    z-index: 1;
}

/* Gebetszeit */
.prayer-card .time {
    font-size: 7.8rem;
    font-weight: 700;
    text-shadow: 0 0 26px rgba(15, 23, 42, 0.9);
    z-index: 1;
}

/* Optional: aktive Gebetszeit hervorheben */
.prayer-card.is-current {
    border-color: var(--color-accent-gold-soft);
    box-shadow:
        0 0 0 2px rgba(250, 204, 21, 0.4),
        0 30px 80px rgba(0, 0, 0, 0.85);
}

.prayer-card.is-current .time {
    color: var(--color-accent-gold-soft);
}

/* ------------------------------------------------------------------
   Weather
------------------------------------------------------------------ */

.weather-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.weather-main .temp {
    font-size: 8.6rem;
    font-weight: 700;
    line-height: 1;
}

.weather-main .desc {
    font-size: 3.6rem;
    text-transform: capitalize;
    color: #dbeafe;
    line-height: 1.1;
    max-width: 100%;
}

.weather-extra {
    margin-top: 34px;
    font-size: 2.4rem;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ------------------------------------------------------------------
   Next Prayer Panel
------------------------------------------------------------------ */

.next-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 6px;
    position: relative;
    z-index: 1;
}

.next-countdown {
    font-size: 7.4rem;
    font-weight: 700;
    color: var(--color-accent-orange);
    text-shadow: 0 0 22px rgba(15, 23, 42, 0.9);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    animation: pulse-glow 3.2s ease-in-out infinite;
}

.next-info {
    text-align: right;
}

.next-name {
    font-size: 3.2rem;
    font-weight: 600;
}

.next-time {
    font-size: 3.6rem;
    font-weight: 700;
}

.clock-large {
    margin-top: 6px;
    font-size: 1.4rem;
    color: var(--color-accent-gold-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* sanftes Leuchten für Countdown */
@keyframes pulse-glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(248, 113, 113, 0.3);
        transform: translateY(0);
    }
    50% {
        text-shadow: 0 0 38px rgba(248, 113, 113, 0.58);
        transform: translateY(-2px);
    }
}

/* ------------------------------------------------------------------
   Big Clock Panel
------------------------------------------------------------------ */

.clock-panel {
    padding: 18px 26px;
}

.big-clock {
    font-size: 7.8rem;
    font-weight: 700;
    text-align: center;
    color: #f9fbff;
    text-shadow: 0 0 22px rgba(15, 30, 70, 0.9);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    position: relative;
    z-index: 1;
}

/* ------------------------------------------------------------------
   Announcements
------------------------------------------------------------------ */

.side-panel .announcements h2 {
    /* Styling schon oben in shared-title */
}

.announcements-text {
    font-size: 3.8rem;
    color: var(--color-text-main);
    line-height: 1.3;
    max-height: 30rem;
    overflow: hidden;
}

.announcements-text.empty {
    opacity: 0.7;
    font-style: italic;
}

/* ------------------------------------------------------------------
   Footer Ticker – hellere Töne, ganz leicht Richtung Türkis
------------------------------------------------------------------ */

.ticker-wrapper {
    margin-top: 4px;
    padding-top: 2px;
}

.ticker {
    position: relative;
    overflow: hidden;
    /* etwas helleres Blau + minimal türkiser Mittelton */
    background: linear-gradient(90deg, #0c2346, #093257, #0c2346);
    border-radius: 999px;
    border: 1px solid var(--color-border-main);
    padding: 10px 0;
    box-shadow: 0 18px 40px rgba(6, 12, 30, 0.7);
}

.ticker::before,
.ticker::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ticker::before {
    border-radius: inherit;
    /* hier der dezente türkise Glow */
    border: 1px solid rgba(103, 232, 249, 0.20);
    mask-image: radial-gradient(circle at 0 0, transparent 45%, black 60%);
}

.ticker::after {
    background-image: linear-gradient(
        to right,
        transparent,
        rgba(103, 232, 249, 0.09),
        transparent
    );
    opacity: 0.35;
    mix-blend-mode: soft-light;
}

.ticker__content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: ticker-scroll 35s linear infinite;
    font-size: 3.6rem;
}

/* Neuer Track – wird per JS in der Dauer gesteuert */
.ticker__track {
    display: inline-flex;
    white-space: nowrap;
    will-change: transform;
    animation-name: ticker-scroll;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: var(--ticker-duration, 20s); /* Fallback 20s */
}

.ticker__item {
    padding-right: 4rem;   /* Abstand zwischen den zwei Texten */
    font-size: 3.6rem;    /* bei dir ggf. größer */
}

/* GPU-freundliche Bewegung */
@keyframes ticker-scroll {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(-50%, 0, 0); /* eine „Länge“ des doppelten Textes */
    }
}

/* ------------------------------------------------------------------
   Messages (Status)
------------------------------------------------------------------ */

.error {
    color: #fecaca;
    margin-top: 8px;
}

.success {
    color: #bbf7d0;
    margin-bottom: 8px;
}

.hint {
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* ------------------------------------------------------------------
   Admin Page
------------------------------------------------------------------ */

/* ------------------------------------------------------------------
   Admin Page — doubled size
------------------------------------------------------------------ */

.admin-body {
    background: radial-gradient(circle at top, #0b1f3b, #061326);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px; /* doubled */
}

.admin-container {
    max-width: 1280px; /* doubled */
    width: 100%;
    color: var(--color-text-main);
}

.admin-container h1 {
    text-align: center;
    margin-bottom: 32px; /* doubled */
    font-size: 2.2rem; /* larger */
}

.card.admin-card {
    background: rgba(12, 32, 72, 0.96);
    border-radius: 36px; /* doubled */
    border: 2px solid var(--color-border-main);
    padding: 36px 40px; /* doubled */
    box-shadow: 0 36px 80px rgba(6, 12, 30, 0.7); /* doubled */
}

.admin-card h2 {
    margin-bottom: 24px; /* doubled */
    font-size: 1.8rem;
}

.admin-card label {
    display: block;
    margin-bottom: 16px; /* doubled */
    font-size: 1.4rem;
}

.admin-card input[type="text"],
.admin-card input[type="password"],
.admin-card textarea {
    width: 100%;
    padding: 16px 20px; /* doubled */
    border-radius: 20px; /* doubled */
    border: 2px solid rgba(191, 219, 254, 0.7);
    background: rgba(7, 23, 55, 0.9);
    color: var(--color-text-main);
    margin-top: 6px; /* doubled */
    font-size: 1.3rem;
}

.admin-card textarea {
    resize: vertical;
}

.admin-card button {
    margin-top: 20px; /* doubled */
    padding: 18px 32px; /* doubled */
    border-radius: 999px;
    border: none;
    background: linear-gradient(to right, var(--color-accent-emerald), var(--color-accent-emerald-dark));
    color: #f9fafb;
    font-weight: 700; /* slightly bigger */
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.12s ease-out, filter 0.12s ease-out, box-shadow 0.12s ease-out;
}

.admin-card button:hover {
    filter: brightness(1.06);
    transform: translateY(-2px); /* doubled */
    box-shadow: 0 36px 80px rgba(22, 163, 74, 0.4);
}

/* Generic card */
.card {
    border-radius: 32px; /* doubled */
}

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */

@media (max-width: 1600px) {
    .title h1 {
        font-size: 3.2rem;
    }

    .prayer-card .time {
        font-size: 6.2rem;
    }

    .big-clock,
    .next-countdown {
        font-size: 6.2rem;
    }

    .weather-main .temp {
        font-size: 7rem;
    }
}

@media (max-width: 1024px) {
    .page {
        padding: 16px;
    }
    .top-bar {
        grid-template-columns: 1.2fr 2fr 1.4fr;
        padding: 14px 18px;
    }
    .title h1 {
        font-size: 2rem;
    }
    .prayer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }
    .page {
        height: auto;
        padding: 12px;
    }
    .content {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    .top-bar {
        grid-template-columns: 1fr;
        row-gap: 12px;
        text-align: center;
    }
    .dates {
        text-align: center;
        align-items: center;
    }
}

