﻿* {
    margin: 0;
    padding: 0;
}

/* Sidens baggrund (sæt dit billede her) */
:root {
    --background-image-url: url('images/background.jpg');
}

/* Fuldskærms canvas til stjernehimmel bag indholdet */
#starfield {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    z-index: 0;
    pointer-events: none;
}

body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 600 12px Arial, Helvetica, sans-serif;
    color: #e0ffff;
    background-color: black;

    /* Baggrundsbillede */
    background-image: var(--background-image-url);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Sørg for at indhold ligger over stjernehimmel */
.container, .clock {
    position: relative;
    z-index: 2;
}

.clock {
    border: 1px solid #4aa3a3;
    color: cyan;
    padding: 32px 28px;
    border-radius: 12px;
    background-color: rgba(20, 30, 35, 0.82);
    backdrop-filter: blur(2px);

    /* Glødende kant (neon-effekt) */
    box-shadow:
        0 0 10px rgba(0, 255, 255, 0.6),
        0 0 20px rgba(0, 255, 255, 0.4),
        0 0 40px rgba(0, 255, 255, 0.25),
        inset 0 0 10px rgba(0, 255, 255, 0.15);
    animation: glowPulse 3s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    from {
        box-shadow:
            0 0 6px rgba(0, 255, 255, 0.5),
            0 0 14px rgba(0, 255, 255, 0.35),
            0 0 26px rgba(0, 255, 255, 0.2),
            inset 0 0 6px rgba(0, 255, 255, 0.12);
    }
    to {
        box-shadow:
            0 0 14px rgba(0, 255, 255, 0.8),
            0 0 28px rgba(0, 255, 255, 0.55),
            0 0 56px rgba(0, 255, 255, 0.35),
            inset 0 0 12px rgba(0, 255, 255, 0.2);
    }
}

#Date {
    font-size: 20px !important;
    text-align: center;
    margin-bottom: 10px;
}

.clock ul {
    list-style: none;
    display: flex;
    align-items: baseline;
    font-size: clamp(40px, 12vw, 100px);
    gap: 10px;
}

.clock li { line-height: 1; }

/* Blinkende kolon, respekterer reduced motion */
.colon {
    opacity: 1;
    animation: blink 1s steps(1, end) infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .colon { animation: none; }
    .clock { animation: none; }
}

/* Små skærme: tilpas padding */
@media (max-width: 420px) {
    .clock { padding: 20px 16px; }
    #Date { font-size: 18px !important; }
}

/* Branding nederst */
.brand {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    letter-spacing: 1.5px;
    z-index: 2; /* over stjernehimmel */
    user-select: none;
    transition: color 180ms ease, text-shadow 180ms ease, filter 180ms ease;
}
.brand:hover {
    color: #e0ffff;
    text-shadow:
        0 0 6px rgba(0, 255, 255, 0.55),
        0 0 12px rgba(0, 255, 255, 0.35),
        0 0 24px rgba(0, 255, 255, 0.2);
}

/* Settings button and panel */
.settings-btn {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 3;
    background: rgba(20,30,35,0.9);
    color: #bff;
    border: 1px solid #4aa3a3;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.settings-btn:hover { filter: brightness(1.1); }

.settings-panel {
    position: fixed;
    top: 52px;
    right: 12px;
    width: 260px;
    z-index: 3;
    background: rgba(10, 20, 25, 0.96);
    border: 1px solid #4aa3a3;
    border-radius: 10px;
    padding: 12px 14px;
    color: #e0ffff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.settings-panel h2 {
    font-size: 14px;
    margin-bottom: 10px;
}
.settings-panel form {
    display: grid;
    gap: 8px;
}
.settings-panel .switch {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

/* AM/PM badge */
.ampm {
    font-size: clamp(12px, 3vw, 18px);
    align-self: flex-end;
    margin-left: 6px;
    opacity: 0.85;
}

/* Home button */
.home-btn {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 3;
    background: rgba(20,30,35,0.9);
    color: #bff;
    border: 1px solid #4aa3a3;
    border-radius: 8px;
    padding: 8px 10px;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.home-btn:hover { filter: brightness(1.1); }

/* Utility: visually hidden */
.visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
