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

:root {
    --bar-height: 64px;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: #000;
    overflow-x: hidden;
}

/* Noise grain overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.04;
    pointer-events: none;
    z-index: 10;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

.stage {
    width: 100%;
    height: calc(100dvh - var(--bar-height));
    padding: clamp(1rem, 3vh, 2rem) clamp(1rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.stage-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
}

.city-label {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.7rem, 1.5vw, 1rem);
    color: #555;
    letter-spacing: 0.1em;
    margin-top: 0.5em;
    text-transform: none;
}

.swabian-time {
    font-family: 'Outfit', system-ui, sans-serif;
    font-weight: 900;
    color: #FFFE2A;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    line-height: 0.9;
    text-align: center;
    word-wrap: break-word;
    transition: opacity 0.25s ease, transform 0.25s ease;
    will-change: font-size;
}

.swabian-time.fade-out {
    opacity: 0;
    transform: scale(0.98);
}

.swabian-time.fade-in {
    opacity: 1;
    transform: scale(1);
}

/* Minute Bar */
.minute-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: #FFFE2A;
    z-index: 30;
    transition: width 1s linear;
}

/* Share Button */
.share-btn {
    position: fixed;
    top: clamp(0.8rem, 2vh, 1.5rem);
    right: clamp(0.8rem, 2vw, 1.5rem);
    z-index: 15;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: color 0.15s ease, background 0.15s ease;
    line-height: 0;
}

.share-btn:hover {
    color: #999;
    background: rgba(255, 255, 255, 0.05);
}

.share-btn.copied {
    color: #FFFE2A;
}

/* City Bar */
.city-bar {
    height: var(--bar-height);
    background: #0a0a0a;
    border-top: 1px solid #1a1a1a;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    font-family: 'Space Mono', monospace;
    position: relative;
    z-index: 20;
}

.city-bar::-webkit-scrollbar {
    display: none;
}

.city-bar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.city-bar-inner {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding-left: 50vw;
    padding-right: 50vw;
}

.city-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 14px;
    height: 100%;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.city-bar a:hover {
    background: #151515;
}

.city-bar a.active {
    background: #151515;
}

.city-bar a .city-time {
    font-size: 0.75rem;
    color: #555;
    letter-spacing: 0.05em;
}

.city-bar a.active .city-time {
    color: #FFFE2A;
}

.city-bar a .city-name {
    font-size: 0.55rem;
    color: #444;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.city-bar a.active .city-name {
    color: #fff;
}

.city-bar a:hover .city-name {
    color: #888;
}

.city-bar a:hover .city-time {
    color: #888;
}

.city-bar a.active:hover .city-time {
    color: #FFFE2A;
}

.city-bar a.active:hover .city-name {
    color: #fff;
}

/* Site Footer */
.site-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8em;
    padding: 16px clamp(1rem, 4vw, 3rem);
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    color: #999;
    letter-spacing: 0.05em;
}

.site-footer a {
    color: #999;
    text-decoration: none;
}

.site-footer a:hover {
    color: #555;
}

/* Impressum / Datenschutz Page */
body:has(.impressum) {
    height: auto;
    overflow: auto;
}

.impressum {
    max-width: 480px;
    margin: 0 auto;
    padding: 3rem 2rem;
    font-family: 'Space Mono', monospace;
    color: #999;
    font-size: 0.8rem;
    line-height: 1.7;
}

.impressum h1 {
    font-family: 'Outfit', system-ui, sans-serif;
    font-weight: 900;
    color: #FFFE2A;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.impressum h2 {
    color: #ccc;
    font-size: 0.85rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.impressum p {
    margin-bottom: 1.2rem;
}

.impressum ul {
    margin-bottom: 1.2rem;
    padding-left: 1.2rem;
}

.impressum li {
    margin-bottom: 0.3rem;
}

.impressum a {
    color: #FFFE2A;
    text-decoration: none;
}

.impressum a:hover {
    text-decoration: underline;
}

.impressum-back {
    display: inline-block;
    margin-top: 2rem;
    color: #555;
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.impressum-back:hover {
    color: #FFFE2A;
}
