* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Georgia', serif;
    background: radial-gradient(ellipse at bottom, #001a44 0%, #000d1a 100%);
    background-attachment: fixed;
    color: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding: 20px 10px;
    min-height: 100vh;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(147, 197, 253, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    bottom: -10px;
    animation: floatParticle linear infinite;
    opacity: 0;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        bottom: -10px;
        transform: translateX(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        bottom: 100vh;
        transform: translateX(100px) rotate(360deg);
    }
}

.floating-light {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 40%, transparent 70%);
    border-radius: 50%;
    animation: floatLight ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

@keyframes floatLight {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-20px, -50px) scale(0.9);
        opacity: 0.6;
    }
    75% {
        transform: translate(40px, -20px) scale(1.2);
        opacity: 0.9;
    }
}

.container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3),
                0 0 100px rgba(59, 130, 246, 0.2),
                inset 0 0 30px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    z-index: 10;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
}

.title {
    font-size: 2.2em;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #60a5fa, #93c5fd, #dbeafe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(96, 165, 250, 0.5);
    animation: pulse 2s ease-in-out infinite;
    line-height: 1.2;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.countdown-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0;
}

.countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.countdown-value {
    font-size: 2.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    line-height: 1;
}

.countdown-label {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.anniversary-date {
    margin-top: 40px;
    font-size: 1.4em;
    opacity: 0.9;
}

.anniversary-date p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.date-text {
    font-style: italic;
    color: rgba(147, 197, 253, 0.9);
    font-weight: 300;
    letter-spacing: 1px;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@media (max-width: 768px) {
    body {
        padding: 10px 5px;
        min-height: 100vh;
    }
    
    .container {
        padding: 20px 15px;
        margin: 10px auto;
        border-radius: 20px;
        width: calc(100% - 10px);
        max-width: none;
    }
    
    .title {
        font-size: 1.6em;
        margin-bottom: 20px;
    }
    
    .countdown-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .countdown-item {
        padding: 15px 8px;
        border-radius: 15px;
    }
    
    .countdown-value {
        font-size: 1.8em;
    }
    
    .countdown-label {
        font-size: 0.7em;
        letter-spacing: 0.5px;
    }
    
    .anniversary-date {
        margin-top: 20px;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
        width: calc(100% - 10px);
    }
    
    .title {
        font-size: 1.5em;
    }
    
    .countdown-value {
        font-size: 1.8em;
    }
    
    .countdown-label {
        font-size: 0.8em;
    }
}

.music-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    font-size: 1.5em;
}

.music-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Interactive Elements */
.container {
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
}

body {
    background-size: 150% 150%;
    background-position: center center;
    transition: background-position 0.1s ease-out;
}

.particle, .floating-light {
    transition: transform 0.1s ease-out;
}

/* Ripple Effects */
.ripple {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.6) 0%, transparent 70%);
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
    z-index: 100;
}

.ripple-burst {
    background: radial-gradient(circle, rgba(255, 182, 193, 0.8) 0%, rgba(147, 197, 253, 0.6) 50%, transparent 70%);
    animation: rippleBurst 1s ease-out;
}

@keyframes rippleEffect {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
    }
    100% {
        width: 150px;
        height: 150px;
        opacity: 0;
    }
}

@keyframes rippleBurst {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
    }
    50% {
        width: 200px;
        height: 200px;
        opacity: 0.8;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* Trail Particles */
.trail-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 99;
    animation: fadeOut 1s ease-out;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
}

/* Unit Toggle Buttons */
.unit-toggles {
    margin-top: 30px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.unit-btn {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15) 0%, rgba(147, 197, 253, 0.1) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(96, 165, 250, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 1px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.unit-btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.unit-btn:active:before {
    width: 300px;
    height: 300px;
}

.unit-btn:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.25) 0%, rgba(147, 197, 253, 0.2) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.4);
    border-color: rgba(96, 165, 250, 0.5);
}

.unit-btn.active {
    background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(96, 165, 250, 0.5);
    transform: translateY(-2px);
}

/* Total Time Display */
.total-time {
    margin-top: 30px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.total-value {
    font-size: 4em;
    font-weight: bold;
    background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 50%, #dbeafe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(96, 165, 250, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.total-label {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Navigation */
.navigation {
    margin-top: 50px;
}

.nav-link {
    display: inline-block;
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.2) 0%, rgba(96, 165, 250, 0.15) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(147, 197, 253, 0.3);
    color: rgba(255, 255, 255, 0.95);
    padding: 18px 40px;
    border-radius: 60px;
    text-decoration: none;
    font-size: 1.3em;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(96, 165, 250, 0.2);
}

.nav-link:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nav-link:active:before {
    width: 400px;
    height: 400px;
}

.nav-link:hover {
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.3) 0%, rgba(96, 165, 250, 0.25) 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(96, 165, 250, 0.4);
    border-color: rgba(147, 197, 253, 0.5);
}

@media (max-width: 768px) {
    .unit-toggles {
        margin-top: 20px;
        gap: 8px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .unit-btn {
        padding: 12px 20px;
        font-size: 1em;
        border-radius: 30px;
        font-weight: 500;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .total-time {
        margin-top: 20px;
        min-height: 80px;
    }
    
    .total-value {
        font-size: 2.2em;
    }
    
    .total-label {
        font-size: 1em;
    }
    
    .navigation {
        margin-top: 30px;
        margin-bottom: 20px;
    }
    
    .nav-link {
        padding: 14px 25px;
        font-size: 1em;
        border-radius: 40px;
        display: block;
        max-width: 280px;
        margin: 0 auto;
    }
}