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

body, html {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

/* YouTube Background Layer */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none; 
    transition: opacity 0.4s ease;
}

.video-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.77vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Sleep Mode Blackout Layer */
#sleepOverlay {
    position: fixed;
    inset: 0;
    background: black;
    opacity: 0;
    z-index: 5;
    pointer-events: none;
    transition: opacity 10s linear;
}

/* Invisible Audio Player */
#audioPlayerContainer {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Click Capture Overlay */
#videoClickOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1); /* Default dimness */
    z-index: 0;
    pointer-events: none;
    transition: background-color 0.2s ease, opacity 0.4s ease;
}

.text-shadow-lg {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.clock-text {
    font-size: clamp(5rem, 15vw, 10rem);
    line-height: 1;
    font-weight: 400;
}

.date-text {
    font-size: clamp(1rem, 3vw, 2rem);
    letter-spacing: 0.1em;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.date-text:hover { opacity: 0.8; }

.weather-text {
    position: relative;
    display: inline-block;
    font-size: 1.25rem;
    opacity: 0.95;
    margin-top: 1rem;
    font-weight: 500;
    cursor: pointer;
    pointer-events: auto;
    transition: opacity 0.2s;
}

.weather-text::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 3px;
    bottom: -4px;
    left: 0;
    background-color: white;
    border-radius: 99px;
    transform-origin: bottom center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.weather-text:hover { opacity: 1; }
.weather-text:hover::after { transform: scaleX(1); }

.glass-modal {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Calendar Grid Styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.month-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    padding: 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-day, .month-item {
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border-radius: 12px;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
}

.month-item {
    aspect-ratio: auto;
    padding: 1.5rem 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.calendar-day.today, .month-item.current-month {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
}

.calendar-day.selected {
    background: white;
    color: black;
    font-weight: 800;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255,255,255,0.2);
}

.calendar-day.holiday { color: #fbbf24; }

.holiday-dot {
    width: 4px;
    height: 4px;
    background: #fbbf24;
    border-radius: 50%;
    position: absolute;
    bottom: 6px;
}

.calendar-day:not(.empty):not(.selected):hover, .month-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.calendar-day.empty { opacity: 0.1; cursor: default; }

/* Navigation Menu Styles */
.nav-container {
    position: relative;
    display: flex;
    gap: 1rem;
    padding-bottom: 2px;
}

.tab-btn {
    position: relative;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    color: rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.tab-btn.active { color: white; }

#nav-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

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

.animate-in { animation: fadeIn 0.8s ease-out forwards; }

.hidden-modal { display: none !important; }

.custom-scroll::-webkit-scrollbar { width: 4px; height: 4px; }
.custom-scroll::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); }
.custom-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

@media (max-width: 640px) { .forecast-grid { grid-template-columns: repeat(2, 1fr); } }

.forecast-card { transition: all 0.2s ease; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.05); }
.forecast-card:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }
.forecast-card.active { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.4); }

#inlineHourlyContainer {
    grid-column: 1 / -1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, margin 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1.5rem;
}
#inlineHourlyContainer.expanded {
    max-height: 400px;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    overflow-y: auto;
}

.precip-bar { transition: height 1s cubic-bezier(0.4, 0, 0.2, 1); }

.clickable-header {
    cursor: pointer;
    border-radius: 8px;
    padding: 0 8px;
    transition: background 0.2s;
}
.clickable-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Control Styles */
input[type="range"] {
    -webkit-appearance: none;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    height: 4px;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

#audioSeeker {
    background: linear-gradient(to right, #3b82f6 var(--seek-before-width, 0%), rgba(255,255,255,0.1) var(--seek-before-width, 0%));
}

.btn-icon {
    @apply p-2 rounded-full transition-all hover:bg-white/10 active:scale-90 text-white disabled:opacity-20 disabled:pointer-events-none;
}

.mode-btn {
    @apply px-3 py-2 rounded-xl text-xs font-medium transition-all bg-white/5 text-white/60 border border-white/5 hover:bg-white/10 hover:text-white flex items-center justify-center gap-1.5;
}
.mode-btn.active-mode {
    @apply bg-blue-500/20 text-blue-400 border-blue-500/40 font-semibold;
}

kbd {
    @apply px-1.5 py-0.5 text-[9px] font-mono font-semibold text-white/80 bg-white/10 border border-white/20 rounded shadow-sm;
}

.queue-item {
    @apply flex items-center justify-between px-2 py-1.5 rounded-lg border border-transparent group transition-colors;
}
.queue-item.active-item {
    @apply bg-blue-500/20 border-blue-500/30;
}
.queue-item:not(.active-item) {
    @apply hover:bg-white/5;
}
