/* Neujahrs-Countdown Styles */

/* Prevent scrolling */
html, body {
    overflow-y: hidden;
    overflow-x: hidden;
    height: 100%;
}

/* In fullscreen, ensure no clipping */
body.fullscreen-mode,
body.fullscreen-mode .countdown-page,
body.fullscreen-mode .countdown-container,
body.fullscreen-mode .countdown-display {
    overflow: visible !important;
}

/* Page Layout */
.countdown-page {
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2rem);
    padding-top: clamp(5rem, 10vh, 7rem);
    padding-bottom: clamp(4rem, 8vh, 5rem);
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-sizing: border-box;
    gap: clamp(0.5rem, 2vh, 1rem);
}

.page-header {
    text-align: center;
    margin-bottom: 0;
    flex-shrink: 0;
}

.page-header h1 {
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, #FFD700, #FFA500, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.subtitle {
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    color: var(--text-grey);
    font-weight: 500;
}

/* Back Link */
.back-link {
    position: fixed;
    top: clamp(0.75rem, 2vw, 1.5rem);
    left: clamp(0.75rem, 2vw, 1.5rem);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.75rem, 2vw, 1.25rem);
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-link:hover {
    background: var(--header-bg);
    transform: translateX(-5px);
}

.back-link svg {
    width: clamp(14px, 2vw, 20px);
    height: clamp(14px, 2vw, 20px);
}

/* Countdown Container */
.countdown-container {
    padding: clamp(1rem, 3vw, 2.5rem) clamp(1rem, 4vw, 3rem);
    border-radius: clamp(16px, 3vw, 24px);
    text-align: center;
    margin: 0;
    width: 100%;
    max-width: 900px;
    flex-shrink: 0;
}

.countdown-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.25rem, 1vw, 0.5rem);
    flex-wrap: wrap;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: clamp(50px, 12vw, 120px);
}

.countdown-value {
    font-size: clamp(2rem, 10vw, 6rem);
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 50%, #FF6B6B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    text-shadow: 0 0 40px rgba(255, 165, 0, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.countdown-label {
    font-size: clamp(0.55rem, 1.5vw, 0.9rem);
    color: var(--text-grey);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: clamp(1px, 0.3vw, 2px);
    margin-top: clamp(0.25rem, 0.5vh, 0.5rem);
}

.countdown-separator {
    font-size: clamp(1.5rem, 7vw, 4rem);
    font-weight: 700;
    color: var(--primary);
    margin: 0 clamp(0rem, 0.5vw, 0.25rem);
    animation: blink 1s ease-in-out infinite;
    align-self: flex-start;
    margin-top: clamp(0.25rem, 1vw, 0.5rem);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.countdown-target {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--text-grey);
    margin-top: clamp(1rem, 2vh, 1.5rem);
}

.countdown-target strong {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Info Cards */
.info-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 16px;
}

.info-icon {
    font-size: 1.5rem;
}

.info-text {
    font-weight: 600;
    color: var(--text-color);
}

/* Celebration Canvas */
#celebrationCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Prosit Overlay */
#prositOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    pointer-events: none;
}

#prositOverlay.hidden {
    display: none;
}

#prositText {
    font-size: clamp(2.5rem, 14vw, 8rem);
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    color: #FFFFFF;
    text-align: center;
    animation: text-glow-white 2s ease-in-out infinite, scale-in 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    transform: scale(0);
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 1),
        0 0 40px rgba(255, 165, 0, 0.8),
        0 0 60px rgba(255, 107, 107, 0.6),
        0 0 80px rgba(255, 215, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.5);
    padding: clamp(0.5rem, 2vw, 1rem);
    max-width: 90vw;
    letter-spacing: 0.05em;
}

@keyframes text-glow-white {
    0%, 100% { 
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 1),
            0 0 40px rgba(255, 165, 0, 0.8),
            0 0 60px rgba(255, 107, 107, 0.6),
            0 0 80px rgba(255, 215, 0, 0.4),
            0 4px 8px rgba(0, 0, 0, 0.5);
    }
    50% { 
        text-shadow: 
            0 0 30px rgba(255, 215, 0, 1),
            0 0 60px rgba(255, 165, 0, 1),
            0 0 90px rgba(255, 107, 107, 0.8),
            0 0 120px rgba(255, 215, 0, 0.6),
            0 4px 8px rgba(0, 0, 0, 0.5);
    }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes text-glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8)); }
    50% { filter: drop-shadow(0 0 40px rgba(255, 165, 0, 1)); }
}

@keyframes scale-in {
    0% { 
        opacity: 0;
        transform: scale(0);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Glass Card Enhancement */
.glass-card {
    background: var(--card-bg);
    border: var(--card-border);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* New Year Celebration Mode */
.celebration-mode .countdown-value {
    animation: celebration-pulse 0.5s ease-in-out infinite;
}

@keyframes celebration-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Info Cards Responsive */
.info-cards {
    display: flex;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    flex-shrink: 1;
}

.info-card {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 1vw, 0.5rem);
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.75rem, 2vw, 1rem);
    border-radius: clamp(10px, 2vw, 14px);
    flex: 1;
    min-width: 120px;
}

.info-icon {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.info-icon svg {
    width: clamp(16px, 3vw, 20px);
    height: clamp(16px, 3vw, 20px);
}

.info-text {
    font-weight: 600;
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: var(--text-color);
}

/* Very small screens - stack countdown vertically */
@media (max-width: 360px) {
    .countdown-display {
        gap: 0.5rem;
    }
    
    .countdown-separator {
        display: none;
    }
    
    .countdown-unit {
        min-width: 45%;
        margin-bottom: 0.5rem;
    }
}

/* Timezone Selector */
.timezone-selector {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 1.5vw, 0.75rem);
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.75rem, 2vw, 1rem);
    border-radius: clamp(10px, 2vw, 14px);
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 450px;
    flex-shrink: 1;
}

.timezone-selector label {
    font-weight: 600;
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: var(--text-color);
    text-align: center;
}

.timezone-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.75rem, 2vw, 1rem);
    color: var(--text-color);
    font-size: clamp(0.85rem, 2vw, 1rem);
    font-family: inherit;
    cursor: pointer;
    min-width: clamp(150px, 40vw, 200px);
    max-width: 100%;
    transition: all 0.3s ease;
}

.timezone-selector select:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.15);
}

.timezone-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(162, 76, 255, 0.2);
}

.timezone-selector select option,
.timezone-selector select optgroup {
    background: #1a1a2e;
    color: var(--text-color);
}

/* Large screens - bigger elements */
@media (min-width: 1200px) {
    .countdown-container {
        max-width: 1000px;
    }
    
    .info-cards {
        max-width: 700px;
    }
}

/* ============ FULLSCREEN BUTTON ============ */
.fullscreen-btn {
    position: fixed;
    bottom: clamp(1rem, 3vw, 2rem);
    right: clamp(1rem, 3vw, 2rem);
    width: clamp(48px, 8vw, 56px);
    height: clamp(48px, 8vw, 56px);
    border-radius: 50%;
    background: var(--card-bg);
    border: var(--card-border);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.fullscreen-btn:hover {
    background: var(--header-bg);
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
}

.fullscreen-btn svg {
    width: clamp(20px, 4vw, 24px);
    height: clamp(20px, 4vw, 24px);
}

/* ============ FULLSCREEN MODE ============ */
body.fullscreen-mode .back-link,
body.fullscreen-mode .page-header,
body.fullscreen-mode .info-cards,
body.fullscreen-mode .timezone-selector,
body.fullscreen-mode #christmas-info-panel,
body.fullscreen-mode #navbar,
body.fullscreen-mode #snowflake-container,
body.fullscreen-mode #cursor-shine,
body.fullscreen-mode #star-canvas,
body.fullscreen-mode .settings-modal,
body.fullscreen-mode #settings-modal,
body.fullscreen-mode .modal,
body.fullscreen-mode [id*="settings"],
body.fullscreen-mode [class*="settings"],
body.fullscreen-mode footer,
body.fullscreen-mode #footer-container {
    display: none !important;
}

body.fullscreen-mode .countdown-page {
    padding: 0;
    justify-content: center;
}

body.fullscreen-mode .countdown-container {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    max-width: 100vw;
    width: 100%;
    padding: clamp(0.5rem, 2vw, 1.5rem);
}

body.fullscreen-mode .countdown-display {
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    justify-content: center;
}

body.fullscreen-mode .countdown-unit {
    min-width: auto;
    padding: 0 clamp(0.5rem, 1vw, 1rem);
}

body.fullscreen-mode .countdown-value {
    font-size: clamp(3rem, 14vw, 12rem);
}

body.fullscreen-mode .countdown-separator {
    font-size: clamp(2.5rem, 11vw, 10rem);
    margin: 0;
}

body.fullscreen-mode .countdown-label {
    font-size: clamp(0.7rem, 2vw, 1.5rem);
}

body.fullscreen-mode .countdown-target {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-top: clamp(2rem, 4vh, 3rem);
}

body.fullscreen-mode .countdown-target strong {
    font-size: clamp(2rem, 5vw, 3rem);
}

body.fullscreen-mode .fullscreen-btn {
    opacity: 0.3;
}

body.fullscreen-mode .fullscreen-btn:hover {
    opacity: 1;
}

/* Prosit Neujahr in fullscreen - positioned at top */
body.fullscreen-mode #prositOverlay {
    align-items: flex-start;
    padding-top: clamp(2rem, 8vh, 5rem);
}

body.fullscreen-mode #prositText {
    font-size: clamp(3rem, 12vw, 7rem);
}

/* Hide button in actual browser fullscreen */
:fullscreen .fullscreen-btn {
    bottom: clamp(0.5rem, 2vw, 1rem);
    right: clamp(0.5rem, 2vw, 1rem);
}
