* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #1a202c;
    position: relative;
}

.dark {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #e2e8f0;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    text-align: center;
    position: relative;
    margin-bottom: 100px;
}

.dark .container {
    background: rgba(45, 55, 72, 0.95);
    border-color: rgba(255,255,255,0.1);
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.date {
    font-size: 1rem;
    font-weight: 500;
    color: #718096;
    margin-bottom: 32px;
    letter-spacing: 0.5px;
}

.dark .date {
    color: #a0aec0;
}

.timer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 32px 0;
}

.block {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.dark .block {
    background: rgba(52, 64, 83, 0.8);
    border-color: rgba(255,255,255,0.2);
}

.block:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.number {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    display: block;
    color: #2d3748;
    line-height: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dark .number {
    color: #f7fafc;
}

.label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #718096;
}

.dark .label {
    color: #a0aec0;
}

.buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 28px 0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.7);
    color: #2d3748;
    border: 1px solid rgba(255,255,255,0.5);
}

.dark .btn-secondary {
    background: rgba(52, 64, 83, 0.7);
    color: #f7fafc;
    border-color: rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-photo {
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%) !important;
    color: white !important;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4) !important;
    font-size: 1rem !important;
    padding: 14px 28px !important;
}

.btn-photo:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 20px 50px rgba(255, 107, 157, 0.6) !important;
}

.moments {
    margin-top: 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.moments.show {
    max-height: 500px;
}

.moment {
    background: rgba(255, 255, 255, 0.6);
    padding: 16px;
    border-radius: 12px;
    margin: 8px 0;
    backdrop-filter: blur(10px);
    border-left: 4px solid #667eea;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.4;
}

.dark .moment {
    background: rgba(52, 64, 83, 0.6);
}

.footer {
    margin-top: 28px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    animation: pulse 2s infinite;
}

.dark .footer {
    color: #a0aec0;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.dark .theme-toggle {
    background: rgba(52, 64, 83, 0.7);
    border-color: rgba(255,255,255,0.3);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

#timer {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contacts {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 12px 20px;
    font-size: 0.8rem;
    color: #718096;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    z-index: 100;
    max-width: 90vw;
    text-align: center;
    line-height: 1.4;
    pointer-events: auto;
}

.dark .contacts {
    background: rgba(52,64,83,0.95);
    color: #a0aec0;
    border-color: rgba(255,255,255,0.2);
}

.contact-item {
    margin: 2px 0;
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-item a:hover {
    color: #667eea;
}

.contact-item.small {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 4px;
}

.photo-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.photo-modal img {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 20px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    transition: transform 0.3s ease;
}

.photo-modal:hover img {
    transform: scale(1.02);
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    color: white;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 480px) {
    .container {
        padding: 24px 20px;
        margin: 10px;
        margin-bottom: 120px;
    }
    
    .timer {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .contacts {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        font-size: 0.75rem;
        padding: 10px 15px;
        max-width: none;
    }
    
    .theme-toggle {
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 360px) {
    .timer {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 20px 16px;
        margin-bottom: 130px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 500px;
        padding: 48px;
        margin-bottom: 120px;
    }
}

@media (min-width: 1200px) {
    .contacts {
        font-size: 0.7rem;
        padding: 8px 16px;
    }
}

@media all and (display-mode: standalone) {
    .contacts {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        margin-top: 20px;
        background: none;
        box-shadow: none;
        border: none;
        padding: 10px 0;
        margin-bottom: 20px;
    }
    
    .container {
        margin-bottom: 0 !important;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}