/* Globale Stile & Dark Mode */
:root {
    --accent-blue: #3b82f6;
    --bg-dark: #050505;
}

body {
    background-color: var(--bg-dark);
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Light Mode Refinement */
:root {
    --bg-light: #f1f5f9; /* Soft Slate statt Weiß */
}

html:not(.dark) body {
    background-color: var(--bg-light);
    color: #0f172a;
}

html:not(.dark) .glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

html:not(.dark) #clock {
    background: linear-gradient(180deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphismus Dark Mode */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1), background 0.3s ease, border 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
}

/* Hauptuhr */
#clock {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(3rem, 16vw, 12rem);
    line-height: 1;
    display: block;
    width: 100%;
    background: linear-gradient(180deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.15));
    white-space: nowrap;
}

/* Werbe-Platzhalter (AdSense konform) */
.ad-slot {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 2rem 0;
}
.ad-slot:not(:empty) {
    display: flex;
}

/* Sprachwechsler Custom Styling */
#language-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Hilfsklasse für Text-Kürzung */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

/* Kiosk / Fullscreen Mode */
:fullscreen {
    background: #000 !important;
}

:fullscreen body {
    background: #000 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100vh !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
}

:fullscreen main {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

:fullscreen header,
:fullscreen footer,
:fullscreen section:not(.time-container),
:fullscreen .ad-slot,
:fullscreen #sticky-footer-ad,
:fullscreen #time-diff-container,
:fullscreen #seo-time-card,
:fullscreen #search-container,
:fullscreen #social-share-container {
    display: none !important;
}

:fullscreen .time-container {
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100vh !important;
    padding: 0 !important;
    max-width: none !important;
}

:fullscreen #main-heading {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 3vw !important;
    margin-bottom: 2vh !important;
    opacity: 0.5 !important;
    letter-spacing: 0.2em !important;
    color: #fff !important;
    width: 100% !important;
    text-align: center !important;
}

:fullscreen #main-heading span {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

:fullscreen #clock {
    font-size: 12vw !important;
    width: auto !important;
    text-align: center !important;
    background: #fff !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.2)) !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

:fullscreen #countdowns {
    margin-top: 5vh !important;
    opacity: 0.6 !important;
}

:fullscreen #kiosk-exit {
    display: block !important;
    opacity: 0.2 !important;
    pointer-events: auto !important;
    z-index: 9999 !important;
}

:fullscreen #kiosk-exit:hover {
    opacity: 1 !important;
}

/* Favorites Heart Icons */
.fav-btn {
    color: rgba(156, 163, 175, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fav-btn:hover {
    color: #ef4444;
    transform: scale(1.2);
}

.fav-btn.active {
    color: #ef4444;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.4));
}

/* Fav Toggle Main Clock */
#fav-toggle.active {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.08);
    transform: scale(1.05);
}

/* SEO Card Animation */
#seo-time-card .glass-card {
    border-left: 4px solid var(--accent-blue);
    animation: slideInUp 0.6s cubic-bezier(0.2, 0, 0.2, 1);
}

/* Custom Search Input Styling to match Clock */
.search-input-styled {
    background: linear-gradient(180deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    caret-color: #3b82f6; /* Normaler Cursor */
}

html:not(.dark) .search-input-styled {
    background: linear-gradient(180deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Placeholder fix for gradient text */
.search-input-styled::placeholder {
    color: rgba(156, 163, 175, 0.4);
    -webkit-text-fill-color: rgba(156, 163, 175, 0.4);
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animationen */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.15; transform: scale(1.1); }
}

.animate-pulse-slow {
    animation: pulse-slow 8s infinite ease-in-out;
}
