{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Na mobile lepiej od góry */
    align-items: center;
    padding: 40px 0;
    
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('background.jpg') no-repeat center center fixed;
    background-size: cover;
    overflow-x: hidden;
}

.title {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    width: 100%;
}

/* --- BOX 1: GŁÓWNY LICZNIK --- */
.counter-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 30px 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
    max-width: 90%;
    margin-bottom: 25px;
}

.time-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.number { font-size: 3rem; font-weight: 700; }
.label { font-size: 0.85rem; text-transform: uppercase; font-weight: 300; }

/* --- OGÓLNE STYLE DLA BOXÓW STATYSTYK --- */
.geek-stats {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 25px;
}

.geek-stats h3 {
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-align: center;
    color: #ff9a9e;
    letter-spacing: 2px;
}

/* --- STYLE DLA KOSMICZNYCH (GRID) --- */
.stat-item {
    margin-bottom: 12px;
    font-size: 0.9rem;
    display: grid;
    grid-template-columns: 1.5fr 2fr 0.5fr; /* Trzy kolumny */
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.stat-label { text-align: left; }
.stat-value { 
    font-weight: 700; 
    color: #00f2fe; 
    text-align: center; /* WYŚRODKOWANIE NIEBIESKIEGO */
}
.stat-unit { text-align: right; color: rgba(255, 255, 255, 0.6); font-size: 0.8rem; }

/* --- STYLE DLA "INNYMI SŁOWY" --- */
.alt-units { text-align: center; }
.alt-label { font-size: 0.75rem; color: rgba(255, 255, 255, 0.5); margin: 5px 0; }
.alt-item { font-size: 1.2rem; margin: 2px 0; }
.alt-value { font-weight: 700; font-size: 1.5rem; }
#total-seconds { color: #ffd700; }

.server-status {
    position: fixed;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#current-server-time {
    color: #00f2fe; /* Ten sam błękit co w statystykach */
    font-weight: 700;
    margin-left: 5px;
}

/* Na bardzo małych telefonach chowamy lub przesuwamy, żeby nie zasłaniało tytułu */
@media (max-width: 400px) {
    .server-status {
        top: 5px;
        right: 5px;
        font-size: 0.6rem;
        padding: 4px 8px;
    }
}


/* --- MOBILE --- */
@media (max-width: 600px) {
    body { padding: 20px 0; }
    
    .counter-box {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 20px;
    }
    
    .time-section { min-width: 0; }
    .number { font-size: 2rem; }
    .label { font-size: 0.65rem; }

    .stat-item {
        grid-template-columns: 1fr; /* Na telefonie wszystko w pionie */
        text-align: center;
        gap: 5px;
    }
    .stat-label, .stat-value, .stat-unit { text-align: center; }
    
    /* Zmiana tła na mobilne jeśli je masz */
    body {
        background-attachment: scroll;
        background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('background-mobile.jpg');
    }
}

.photo-link-btn {
    display: block;
    width: 90%;
    max-width: 500px;
    margin: 10px auto 50px; /* 50px na dole, żeby nie dotykał krawędzi ekranu */
    padding: 22px;
    background: rgba(255, 255, 255, 0.25); /* Nieco mocniejsze tło, żeby się wyróżniał */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    
    color: #fff;
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* Efekt po najechaniu (na komputerze) */
.photo-link-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.02);
    border-color: #00f2fe; /* Zmiana koloru ramki na ten niebieski ze statystyk */
    box-shadow: 0 12px 30px rgba(0, 242, 254, 0.2);
}

/* Efekt kliknięcia */
.photo-link-btn:active {
    transform: scale(0.98);
}

/* Poprawka na mobile */
@media (max-width: 600px) {
    .photo-link-btn {
        padding: 18px;
        font-size: 0.95rem;
    }
}

.title {
    transition: all 0.8s ease;
}

/* Specjalny stan na rocznicę - Fioletowy motyw */
body.anniversary-mode {
    /* Głęboki fioletowy gradient */
    background: linear-gradient(rgba(75, 0, 130, 0.4), rgba(20, 0, 40, 0.8)), url('background.jpg') no-repeat center center fixed;
}

body.anniversary-mode .title {
    color: #d1b3ff; /* Jasny fioletowy dla tytułu */
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(106, 13, 173, 0.8);
}

body.anniversary-mode .counter-box {
    border: 2px solid #8a2be2; /* Fioletowa ramka */
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.5);
    background: rgba(75, 0, 130, 0.3);
}

body.anniversary-mode .number {
    color: #e6ccff; /* Jasny fioletowy dla liczb */
}

@keyframes pulse-rocznica {
    0% { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 0 35px rgba(138, 43, 226, 0.7); transform: scale(1.03); }
    100% { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); }
}

body.anniversary-mode .photo-link-btn {
    animation: pulse-rocznica 2s infinite ease-in-out;
    background: rgba(106, 13, 173, 0.5); /* Półprzezroczysty fiolet */
    border-color: #8a2be2;
}

/* ============================================================
   MODAL WIDEO – ROCZNICA
   ============================================================ */

#video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

#video-modal.visible {
    opacity: 1;
    pointer-events: all;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 0, 20, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.video-modal-content {
    position: relative;
    z-index: 1;
    width: 95vw;
    max-width: 900px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 0 2px rgba(138, 43, 226, 0.6),
        0 30px 80px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(138, 43, 226, 0.3);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#video-modal.visible .video-modal-content {
    transform: scale(1) translateY(0);
}

.video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    line-height: 0; /* usuwa lukę pod video */
}

#anniversary-video {
    width: 100%;
    max-height: 85vh;
    display: block;
    object-fit: contain;
    background: #000;
}

/* Przycisk zamknięcia */
.video-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.video-modal-close:hover {
    background: rgba(138, 43, 226, 0.7);
    transform: scale(1.1);
}

/* Overlay z przyciskiem Play (fallback gdy autoplay zablokowany) */
.video-play-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.video-play-overlay.visible {
    display: flex;
}

.video-play-btn {
    background: rgba(138, 43, 226, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 2rem;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 0 40px rgba(138, 43, 226, 0.6);
}

.video-play-btn p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    line-height: 1;
}

.video-play-btn:hover {
    transform: scale(1.1);
    background: rgba(106, 13, 173, 0.95);
}

@media (max-width: 600px) {
    .video-modal-content {
        width: 100vw;
        border-radius: 0;
        max-width: 100%;
    }

    #anniversary-video {
        max-height: 90vh;
    }

    .video-play-btn {
        width: 80px;
        height: 80px;
        font-size: 1.6rem;
    }
}