@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
    --bg: #121212;
    --panel: #1f1f1f;
    --panel-border: #2a2a2a;
    --text: #e0e0e0;
    --accent: #2196f3;
    --accent-dark: #0c6bd6;
}

* {
    box-sizing: border-box;
}

/* Hide ALL scrollbars globally */
* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

*::-webkit-scrollbar {
    display: none;  /* Chrome, Safari, Opera */
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 24px;
    padding-bottom: 140px;
    line-height: 1.4;
    min-height: 100vh;
    overflow-y: auto;  /* Allow vertical scroll */
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    /* Hide scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
    display: none;
}

.container {
    max-width: 1400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    min-height: calc(100vh - 48px);  /* Changed from height to min-height */
}

.container > header {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.header-title h1 {
    margin: 0;
    font-size: 2rem;
}

.room-label {
    margin: 6px 0 0;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #bdbdbd;
}

#clock {
    font-size: 2.4rem;
    font-weight: 700;
}

.screen-footer {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.25);  /* Dæmpet fra 0.45 til 0.25 */
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 16px;
}

.screen-footer a {
    opacity: 0.5;  /* Admin link endnu mere dæmpet */
    transition: opacity 0.2s;
}

.screen-footer a:hover {
    opacity: 0.8;  /* Lidt lysere ved hover */
}

.info-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 18px;
}

.info-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    font-size: 1.1rem;
    line-height: 1.5;
}

.info-card[data-theme="default"] {
    background: var(--panel);
    color: var(--text);
}

.info-card[data-theme="slate"] {
    background: #263238;
    color: #eceff1;
}

.info-card[data-theme="teal"] {
    background: #005b4f;
    color: #e0f2f1;
}

.info-card[data-theme="plum"] {
    background: #4527a0;
    color: #ede7f6;
}

.info-card[data-theme="sun"] {
    background: #fdd835;
    color: #1b1b1b;
}

.info-card[data-theme="crimson"] {
    background: #c62828;
    color: #fff8e1;
}

.info-card h2 {
    margin: 0;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.info-card[data-theme="sun"] h2 {
    color: #7a4f00;
}

.info-card[data-theme="crimson"] h2 {
    color: #ffe082;
}

.info-card > div {
    flex: 1;
    overflow: auto;
}

.plan-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.plan-section {
    border-radius: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.plan-section h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: inherit;
}

.plan-section[data-theme="default"] { background: rgba(255, 255, 255, 0.05); color: #e3f2fd; }
.plan-section[data-theme="slate"] { background: #263238; color: #eceff1; }
.plan-section[data-theme="teal"] { background: #005b4f; color: #e0f2f1; }
.plan-section[data-theme="plum"] { background: #4527a0; color: #ede7f6; }
.plan-section[data-theme="sun"] { background: #fdd835; color: #1b1b1b; }
.plan-section[data-theme="crimson"] { background: #c62828; color: #fff8e1; }

.plan-section[data-theme="sun"] h3 {
    color: #7a4f00;
}

.plan-section[data-theme="crimson"] h3 {
    color: #ffe082;
}

.info-overlay {
    position: absolute;
    top: 110px;
    left: 5%;
    width: 90%;
    height: calc(90% - 110px);
    background: #fde047;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.info-overlay[hidden] {
    display: none;
}

.info-overlay-content {
    background: #fffdf0;
    border-radius: 20px;
    padding: 30px;
    max-width: 900px;
    width: 100%;
    color: #3e2723;
    font-size: 1.2rem;
    line-height: 1.5;
}

.info-overlay-content h2 {
    margin-top: 0;
    color: #795548;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.plan-body {
    min-height: 120px;
}

.help-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 280px;
}

.help-entry {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 58px;
}

.help-entry strong {
    display: block;
    font-size: 0.95rem;
    }

.help-entry p {
    margin: 3px 0 0;
    font-size: 0.9rem;
}

.help-meta {
    font-size: 0.8rem;
    color: #b0bec5;
}

.help-hint {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #b0bec5;
}

#help-card.help-alert {
    background: #fdd835;
    color: #1b1b1b;
    border-color: rgba(0, 0, 0, 0.2);
}

#help-card.help-alert h2 {
    color: #7a4f00;
}

#help-card.help-alert .help-hint {
    color: #5d4037;
}

#help-card.help-alert .help-entry {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.18);
}

#help-card.help-alert .help-entry strong,
#help-card.help-alert .help-entry p {
    color: #1b1b1b;
}

#help-card.help-blink {
    animation: helpBlink 1s ease-in-out 5;
}

@keyframes helpBlink {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 25px rgba(255, 214, 0, 0.95);
    }
}

.weather-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.weather-cell {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
}

.weather-cell h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #e0f2f1;
}

.weather-temp {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 6px 0;
}

.weather-meta {
    font-size: 0.85rem;
    color: #b0bec5;
}

.span-2 {
    grid-column: span 2;
    grid-row: span 1;
}

.span-3 {
    grid-column: span 3;
    grid-row: span 1;
}

@media (max-width: 900px) {
    .span-2 {
        grid-column: span 1;
    }

    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

.qr-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.qr-cards article {
    text-align: center;
}

.qr-cards img {
    width: 75px;
    height: 75px;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
}



.bus-gap {
    height: 24px;
    background: #000;
    border-radius: 12px;
}

#bus-ticker {
    background: #202020;
    border-radius: 18px;
    padding: 6px 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
}

.bus-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.bus-icon {
    font-size: 1.3rem;
}

#bus-times {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
    overflow: hidden;
    font-size: 1rem;
}

.bus-entry {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    border-right: 1px solid rgba(255,255,255,0.35);
    padding-right: 10px;
    margin-right: 10px;
}

.bus-entry:last-child {
    border-right: none;
    margin-right: 0;
}

.bus-line {
    font-weight: 700;
}

.bus-direction {
    opacity: 0.85;
}

.bus-time {
    font-weight: 600;
}

@media (max-width: 768px) {
    body {
        padding: 12px;
        padding-bottom: 140px;
    }

    .container {
        height: auto;
    }

    .container > header {
        flex-direction: column;
        align-items: flex-start;
    }

    #clock {
        align-self: flex-end;
    }

    .span-3 {
        grid-column: span 1;
    }

    .bus-card {
        flex-direction: column;
        gap: 8px;
        min-height: auto;
    }
}
/* Responsive tilføjelser til style.css */
/* Tilføj dette til BUNDEN af style.css */

/* For skærme med begrænset højde (f.eks. 1080p widescreen) */
@media (max-height: 900px) {
    body {
        padding: 16px;
        padding-bottom: 100px;
    }

    .container {
        gap: 16px;
    }

    .container > header {
        padding: 16px;
    }

    .header-title h1 {
        font-size: 1.6rem;
    }

    #clock {
        font-size: 1.8rem;
    }

    .info-card {
        padding: 16px;
        gap: 8px;
        font-size: 0.95rem;
    }

    .info-card h2 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .info-grid {
        gap: 12px;
    }
}

/* For endnu mindre højde (f.eks. 720p) */
@media (max-height: 768px) {
    body {
        padding: 12px;
        padding-bottom: 80px;
    }

    .container {
        gap: 12px;
    }

    .container > header {
        padding: 12px;
    }

    .header-title h1 {
        font-size: 1.4rem;
    }

    #clock {
        font-size: 1.6rem;
    }

    .info-card {
        padding: 12px;
        gap: 6px;
        font-size: 0.9rem;
    }

    .info-card h2 {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .info-grid {
        gap: 10px;
        grid-auto-rows: auto; /* Let content determine height */
    }
}

/* Zoom hele skærmen ned hvis alt er for stort */
@media (max-height: 600px) {
    body {
        zoom: 0.85;
        -moz-transform: scale(0.85);
        -moz-transform-origin: top left;
    }
}

/* For meget store skærme (4K, etc.) */
@media (min-width: 1920px) and (min-height: 1080px) {
    .container {
        max-width: 1800px;
    }

    .header-title h1 {
        font-size: 2.5rem;
    }

    #clock {
        font-size: 3rem;
    }

    .info-card {
        font-size: 1.3rem;
    }
}
/* CSS til 4K skærme med 200% Windows scaling */
/* Tilføj til BUNDEN af style.css */

/* Fjern tidligere 4K media query og brug denne i stedet */

/* For 4K med 200% scaling (effektiv viewport ~1920x1080) */
@media (min-width: 1800px) and (min-height: 1000px) {
    body {
        padding: 20px;
        padding-bottom: 120px;
        zoom: 0.9; /* Zoom hele siden ned 10% */
    }

    .container {
        max-width: 1600px;
        gap: 20px;
    }

    .container > header {
        padding: 20px;
    }

    .header-title h1 {
        font-size: 1.8rem;
    }

    #clock {
        font-size: 2.2rem;
    }

    .info-grid {
        gap: 16px;
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: auto; /* Lad indhold bestemme højde */
    }

    .info-card {
        padding: 20px;
        font-size: 1.05rem;
        gap: 10px;
    }

    .info-card h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    /* Reducer højde på bus ticker */
    #bus-ticker {
        padding: 12px 20px;
        font-size: 1.1rem;
    }

    .screen-footer {
        font-size: 0.9rem;
        margin-top: 12px;
    }
}

/* Alternativ: Brug CSS transform i stedet for zoom (bedre browser support) */
@supports not (zoom: 0.9) {
    @media (min-width: 1800px) and (min-height: 1000px) {
        body {
            transform: scale(0.9);
            transform-origin: top center;
            width: 111.11%; /* Kompensér for scale */
        }
    }
}

/* Specifik tilpasning for præcis 4K med 200% scaling */
@media (width: 1920px) and (height: 1080px) {
    /* Dette matcher 3840x2160 med 200% scaling */
    body {
        zoom: 0.85;
    }

    .container {
        gap: 18px;
    }

    .info-grid {
        gap: 14px;
    }

    .info-card {
        padding: 18px;
        font-size: 1rem;
    }
}

/* Reducer padding på plankort specifikt */
@media (min-width: 1800px) {
    .plan-sections {
        gap: 16px;
    }

    .plan-section {
        padding: 16px;
    }

    .plan-body ul {
        margin: 8px 0;
        padding-left: 20px;
    }

    .plan-body li {
        margin-bottom: 6px;
    }
}

/* Kompakt mode for at få alt til at passe */
@media (min-width: 1800px) and (max-height: 1100px) {
    /* Når der er meget indhold men begrænset højde */
    .info-card {
        padding: 16px;
        gap: 8px;
    }

    .info-card h2 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .info-card ul {
        margin: 6px 0;
    }

    .info-card li {
        margin-bottom: 4px;
        line-height: 1.4;
    }

    /* Reducer weather box */
    .weather-box {
        gap: 10px;
    }

    /* Reducer help list spacing */
    .help-list {
        gap: 8px;
    }

    /* Reducer QR cards */
    .qr-cards {
        gap: 12px;
    }
}
