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

html {
    background: #000;
}

:root {
    --primary: #1b4f9c;
    --secondary: #2a78d8;
    --accent: #cf1b1b;
    --topbar-bg-1: #1b4f9c;
    --topbar-bg-2: #2a78d8;
    --topbar-text: #ffffff;
    --section-title-bg-1: #cf1b1b;
    --section-title-bg-2: #f06424;
    --section-title-text: #ffffff;
    --panel-bg: #f2f5fb;
    --panel-bg-2: #ffffff;
    --text: #0b1b2b;
    --muted: #4a5b72;
    --glow: 0 0 10px rgba(255, 255, 255, 0.35);
    --card-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
    --border-strong: rgba(0, 0, 0, 0.18);
}

body {
    background: #000;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    overflow: hidden;
}

#app {
    width: 1920px;
    height: 1080px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center;
    display: grid;
    grid-template-rows: 132px 1fr 106px;
    gap: 18px;
    padding: 20px 26px;
    overflow: visible;
}

.topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 16px 20px;
    padding: 10px 24px;
    overflow: visible;
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 10px, rgba(255, 255, 255, 0.04) 10px 20px),
        linear-gradient(90deg, var(--topbar-bg-1), var(--topbar-bg-2));
    border-radius: 18px;
    box-shadow: var(--card-shadow);
    border: 2px solid rgba(0, 0, 0, 0.25);
}

.topbar-left {
    justify-self: start;
    min-width: 0;
    display: flex;
    align-items: center;
    align-self: center;
}

.topbar-center {
    grid-column: 2;
    justify-self: center;
    align-self: start;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
    min-height: 0;
    overflow: visible;
}

.topbar-right {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    align-self: center;
}

.brand-logo-slot {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 72px;
}

.brand-logo-slot--school {
    max-height: none;
    width: 158px;
    height: 158px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(165deg, #ffffff 0%, #eef3fb 55%, #e4ebf7 100%);
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    padding: clamp(8px, 1.2vmin, 14px);
    margin-bottom: -46px;
    position: relative;
    z-index: 2;
}

.brand-logo-slot--school .brand-logo--school {
    max-height: 94%;
    max-width: 94%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.22));
}

.brand-logo-slot.is-empty {
    display: none;
}

.brand-logo {
    display: block;
    max-height: 68px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.brand-logo--company {
    max-height: 88%;
    max-width: 88%;
    width: auto;
    height: auto;
}

.school-name {
    font-size: 46px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--topbar-text);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.datetime {
    font-size: 44px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--topbar-text);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.main-grid {
    display: grid;
    grid-template-columns: 320px 1fr 328px;
    gap: 18px;
    min-height: 0;
    height: 100%;
    align-self: stretch;
    position: relative;
    z-index: 1;
}

.left-col,
.right-col {
    display: flex;
    min-height: 0;
}

.center-col {
    display: flex;
    min-height: 0;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.right-stack {
    flex: 1;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.right-stack > .panel-card {
    flex: 1;
    min-height: 0;
}

.company-brand-box {
    flex-shrink: 0;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 0;
    background: #fff;
    border-radius: 18px;
    border: 2px solid var(--border-strong);
    box-shadow: var(--card-shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.company-brand-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), transparent 55%);
    pointer-events: none;
}

.company-brand-box .brand-logo-slot {
    position: relative;
    z-index: 1;
    max-height: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-brand-box.is-empty {
    display: none;
}

.module-card,
.panel-card {
    flex: 1;
    background: linear-gradient(180deg, var(--panel-bg) 0%, var(--panel-bg-2) 100%);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    border: 2px solid var(--border-strong);
    position: relative;
    overflow: hidden;
}

.module-title,
.panel-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(90deg, var(--section-title-bg-1), var(--section-title-bg-2));
    color: var(--section-title-text);
    padding: 8px 10px;
    border-radius: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 0, 0, 0.25);
}

.module-card::before,
.panel-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.06), transparent 30%),
        radial-gradient(circle at 20% 10%, rgba(0, 0, 0, 0.08), transparent 40%);
    pointer-events: none;
}

.module-body,
.panel-body {
    flex: 1 1 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
    min-height: 0;
}

.custom-modules-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    gap: 10px;
}

.custom-modules-stack {
    flex: 1 1 0;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-right: 6px;
}

.custom-modules-wrap--empty p {
    flex: 1 1 auto;
    margin: 0;
    align-self: stretch;
}

.custom-modules-site-footer {
    flex-shrink: 0;
    margin-top: auto;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--muted);
    padding: 8px 4px 2px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.custom-mod-stack-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-mod-stack-title {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--section-title-bg-1), var(--section-title-bg-2));
    color: var(--section-title-text);
    padding: 6px 10px;
    border-radius: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 0, 0, 0.25);
}

.custom-mod-stack-body {
    font-size: 17px;
    line-height: 1.45;
    padding: 4px 2px 2px;
    color: var(--text);
}

.custom-mod-stack-body .custom-mod-empty {
    color: var(--muted);
    font-style: italic;
}

.custom-mod-stack-gap {
    flex-shrink: 0;
    height: 1.4em;
    min-height: 20px;
}

.list {
    display: grid;
    gap: 10px;
    min-height: 100%;
    align-content: start;
}

.list-item {
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.08);
}

.slide-wrapper {
    flex: 0 1 auto;
    width: 98%;
    height: 98%;
    max-width: 98%;
    max-height: 98%;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    position: relative;
    border: 2px solid var(--border-strong);
}

#slideContainer {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    z-index: 0;
    pointer-events: none;
    transition:
        opacity 0.6s ease,
        visibility 0s linear 0.6s;
}

.slide-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    pointer-events: auto;
    transition:
        opacity 0.6s ease,
        visibility 0s linear 0s;
}

.slide-item img,
.slide-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-item iframe.slide-youtube {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

/* Sağ panel: durum + kaydırılabilir ders listesi */
#rightPanelBody {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.schedule-status {
    flex-shrink: 0;
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--muted);
    padding: 8px 10px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.program-list-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    padding-right: 2px;
}

.program-list-marquee-track {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    will-change: transform;
}

@keyframes program-list-marquee {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(0, -50%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .program-list-marquee-track {
        animation: none !important;
    }
}

.program-list {
    display: grid;
    gap: 8px;
    min-height: min-content;
}

.program-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background: #ffffff;
    border-radius: 8px;
    font-size: 17px;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.program-row--muted {
    color: var(--muted);
    font-size: 15px;
}

.panel-card .news-list {
    display: grid;
    gap: 10px;
    min-height: 100%;
}

.panel-card .news-list--compact {
    gap: 6px;
}

.news-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px;
    align-items: center;
    background: #ffffff;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.news-item--text-only {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 5px 10px;
    align-items: center;
}

.news-item-title {
    font-size: 16px;
    line-height: 1.35;
}

.news-item img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.ticker {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 0;
    box-shadow: var(--card-shadow);
    border: 2px solid var(--border-strong);
}

.ticker-track {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 88px;
    padding-left: 100%;
    animation: ticker-move 20s linear infinite;
    font-size: 58px;
    line-height: 1.03;
    font-weight: 600;
    color: var(--accent);
}

@keyframes ticker-move {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.fade-enter {
    animation: fade-in 0.6s ease;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 8px;
    background: #3ddc84;
    box-shadow: 0 0 6px rgba(61, 220, 132, 0.6);
}

.status-dot.error {
    background: #ffcc00;
}
.weather-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.weather-temp {
    font-size: 36px;
    font-weight: 700;
}

/* Sağ panel — hava durumu (okunaklı, TV mesafesi) */
.weather-box.weather-box--pano {
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 14px;
    min-height: min(100%, 240px);
    padding: 12px 8px 20px;
    box-sizing: border-box;
}

.weather-box.weather-box--pano .weather-city {
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    font-weight: 700;
    color: #2d3748;
    letter-spacing: 0.03em;
}

.weather-box.weather-box--pano .weather-temp {
    font-size: clamp(2.85rem, 5.5vw, 4.1rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #1a202c;
}

.weather-box.weather-box--pano .weather-condition {
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    font-weight: 600;
    color: #4a5568;
    max-width: 95%;
}

/* Sol panel etkinlik sayacı — daha kalın vurgu */
#leftModuleBody .countdown-box {
    font-weight: 800;
}

#leftModuleBody .countdown-box .countdown-title {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

#leftModuleBody .countdown-box .countdown-label {
    font-size: 1.05rem;
    font-weight: 800;
    opacity: 0.95;
}

#leftModuleBody .countdown-box .countdown-days {
    font-weight: 900;
    letter-spacing: 0.02em;
}

#leftModuleBody .countdown-box .countdown-sub {
    font-size: 1.2rem;
    font-weight: 800;
}

#leftModuleBody .countdown-box--done .countdown-done-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 10px;
}

#leftModuleBody .countdown-box--done .countdown-done-msg {
    font-size: 1.25rem;
    font-weight: 800;
}
