/* 기본 리셋 및 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ffffff;
    --secondary-color: #e5e7eb;
    --accent-color: #d1d5db;
    --text-color: #f8fafc;
    --bg-gradient-start: #1f2937;
    --bg-gradient-end: #111827;
    --card-bg: rgba(30, 41, 59, 0.6);
    --glow-color: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 배경 애니메이션 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: twinkle 3s infinite;
}

.star:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.star:nth-child(2) {
    top: 40%;
    left: 60%;
    animation-delay: 1s;
}

.star:nth-child(3) {
    top: 70%;
    left: 30%;
    animation-delay: 2s;
}

.star:nth-child(4) {
    top: 30%;
    left: 80%;
    animation-delay: 1.5s;
}

.star:nth-child(5) {
    top: 60%;
    left: 70%;
    animation-delay: 0.5s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* 컨테이너 */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 헤더 */
header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
}

.title {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.5rem;
    color: #cbd5e1;
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* 카운트다운 컨테이너 */
main {
    width: 100%;
    max-width: 900px;
}

.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 40px var(--glow-color);
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.countdown-item {
    text-align: center;
    min-width: 120px;
}

.countdown-value {
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.countdown-value:hover {
    transform: scale(1.1);
}

.countdown-label {
    font-size: 1rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.countdown-separator {
    font-size: 3rem;
    color: var(--secondary-color);
    font-weight: 300;
    animation: pulse 2s ease-in-out infinite;
}

/* 메시지 */
.message {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.message p {
    font-size: 1.8rem;
    color: #e2e8f0;
    font-weight: 300;
    letter-spacing: 0.03em;
}

.message.celebrate {
    animation: celebrate 1s ease-out;
}

.message.celebrate p {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 2px 15px rgba(255, 255, 255, 0.5);
}

/* 푸터 */
footer {
    margin-top: 4rem;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.8s backwards;
}

footer p {
    font-size: 1.3rem;
    color: #cbd5e1;
    font-weight: 400;
}

/* 애니메이션 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes celebrate {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* 테스트 버튼 */
.test-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.test-button.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.test-button.jan1-button {
    bottom: 70px;
}

.test-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.test-button:active {
    transform: translateY(0);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .countdown-container {
        padding: 2rem 1rem;
        gap: 0.5rem;
    }

    .countdown-item {
        min-width: 70px;
    }

    .countdown-value {
        font-size: 3rem;
    }

    .countdown-label {
        font-size: 0.8rem;
    }

    .countdown-separator {
        font-size: 2rem;
    }

    .message p {
        font-size: 1.3rem;
    }

    .message.celebrate p {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .countdown-container {
        flex-wrap: wrap;
        padding: 1.5rem 0.5rem;
    }

    .countdown-item {
        min-width: 60px;
    }

    .countdown-value {
        font-size: 2.5rem;
    }

    .countdown-separator {
        font-size: 1.5rem;
    }

    .countdown-separator:nth-child(6) {
        display: none;
    }
}
