:root {
    --bg: #0d0d1a;
    --bg2: #13132b;
    --border: rgba(255, 255, 255, 0.08);
    --text: #e0e0ff;
    --text-muted: #7777aa;
    --primary: #7c6ef5;
    --primary-glow: rgba(124, 110, 245, 0.45);
    --secondary: #ec4899;
    --card: rgba(255, 255, 255, 0.04);
    --card-achieved: rgba(124, 110, 245, 0.12);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
header {
    border-bottom: 1px solid var(--border);
    background: rgba(13, 13, 26, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-name {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.lang-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    letter-spacing: 0.5px;
    transition: border-color 0.2s, color 0.2s;
}

.lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.counter-display {
    text-align: center;
    margin-bottom: 36px;
}

.counter-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.counter-num {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.counter-num.bump {
    animation: counter-bump 0.3s ease;
}

@keyframes counter-bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.12); color: var(--primary); }
    100% { transform: scale(1); }
}

.countdown {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ── Main / Hero ── */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 24px 40px;
}

.hero {
    text-align: center;
}

.button-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

/* ── The Button ── */
.click-btn {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(145deg, #7c6ef5 0%, #a855f7 50%, #ec4899 100%);
    box-shadow:
        0 0 40px var(--primary-glow),
        0 0 80px rgba(124, 110, 245, 0.18),
        inset 0 2px 6px rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
    animation: idle-pulse 2.5s ease-in-out infinite;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.click-btn:hover {
    animation: none;
    transform: scale(1.06);
    box-shadow:
        0 0 70px rgba(124, 110, 245, 0.75),
        0 0 130px rgba(124, 110, 245, 0.28),
        inset 0 2px 6px rgba(255, 255, 255, 0.25);
}

.click-btn.pressing {
    animation: none;
    transform: scale(0.91) !important;
    box-shadow:
        0 0 20px rgba(124, 110, 245, 0.35),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-label {
    font-size: 1.75rem;
    font-weight: 900;
    color: white;
    letter-spacing: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    user-select: none;
}

@keyframes idle-pulse {
    0%, 100% {
        box-shadow:
            0 0 40px var(--primary-glow),
            0 0 80px rgba(124, 110, 245, 0.18),
            inset 0 2px 6px rgba(255, 255, 255, 0.25);
    }
    50% {
        box-shadow:
            0 0 65px rgba(124, 110, 245, 0.75),
            0 0 130px rgba(124, 110, 245, 0.32),
            inset 0 2px 6px rgba(255, 255, 255, 0.25);
    }
}

/* Ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    transform: scale(0);
    animation: ripple-anim 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

.tagline {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* ── Hall of Fame ── */
.hall-of-fame {
    max-width: 960px;
    margin: 0 auto;
    padding: 56px 24px 72px;
    width: 100%;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.section-desc {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 0.95rem;
}

.milestones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.milestone-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    transition: border-color 0.3s, background 0.3s, transform 0.2s;
}

.milestone-card:hover {
    transform: translateY(-2px);
}

.milestone-card.achieved {
    background: var(--card-achieved);
}

.milestone-card.hidden-milestone {
    animation: border-rainbow 2.5s linear infinite;
}

.milestone-card.hidden-milestone.achieved {
    background: rgba(255, 255, 255, 0.05);
}

.m-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.m-number {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 8px;
}

.m-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    word-break: break-word;
}

.m-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.m-pending {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ── Rainbow ── */
@keyframes rainbow-text {
    0%   { color: #ff4444; }
    14%  { color: #ff8c00; }
    28%  { color: #ffcc00; }
    42%  { color: #44cc44; }
    57%  { color: #4488ff; }
    71%  { color: #8844ff; }
    85%  { color: #ff44cc; }
    100% { color: #ff4444; }
}

@keyframes border-rainbow {
    0%   { border-color: #ff4444; }
    14%  { border-color: #ff8c00; }
    28%  { border-color: #ffcc00; }
    42%  { border-color: #44cc44; }
    57%  { border-color: #4488ff; }
    71%  { border-color: #8844ff; }
    85%  { border-color: #ff44cc; }
    100% { border-color: #ff4444; }
}

.rainbow-text {
    animation: rainbow-text 2s linear infinite;
}

.rainbow-name {
    animation: rainbow-text 2s linear infinite;
    font-weight: 700;
}

/* ── Info sections (사용 방법 / FAQ) ── */
.info-section {
    padding: 56px 24px;
    border-top: 1px solid var(--border);
}

.faq-section {
    background: rgba(255, 255, 255, 0.015);
}

.info-inner {
    max-width: 960px;
    margin: 0 auto;
}

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

.step-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.step-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.step-card-hidden {
    animation: border-rainbow 2.5s linear infinite;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.step-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.faq-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-q {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.faq-a {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ── Footer ── */
footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--primary);
}

.footer-dot {
    color: var(--border);
}

@media (max-width: 640px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Popup ── */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.popup-overlay[hidden] {
    display: none;
}

.popup-box {
    background: var(--bg2);
    border: 1px solid var(--primary);
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 0 80px rgba(124, 110, 245, 0.3);
    animation: popup-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popup-in {
    from { transform: scale(0.75); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.popup-emoji {
    font-size: 3.5rem;
    margin-bottom: 16px;
    display: block;
    animation: bounce-in 0.5s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes bounce-in {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

.popup-title {
    font-size: 1.75rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.popup-msg {
    font-size: 1.05rem;
    margin-bottom: 8px;
    line-height: 1.5;
}

.popup-milestone-num {
    color: var(--primary);
    font-weight: 900;
    font-size: 1.2rem;
}

.popup-sub {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.popup-input {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 1rem;
    font-family: var(--font);
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.popup-input:focus {
    border-color: var(--primary);
}

.popup-input::placeholder {
    color: var(--text-muted);
}

.popup-input.error {
    border-color: #ef4444;
    animation: shake 0.35s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-6px); }
    75%       { transform: translateX(6px); }
}

.popup-actions {
    display: flex;
    gap: 12px;
}

.btn-register {
    flex: 1;
    padding: 13px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: opacity 0.2s, transform 0.1s;
}

.btn-register:hover  { opacity: 0.88; }
.btn-register:active { transform: scale(0.97); }

.btn-pass {
    flex: 1;
    padding: 13px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--font);
    transition: border-color 0.2s, color 0.2s;
}

.btn-pass:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .counter-num { font-size: 1.5rem; }

    .click-btn {
        width: 175px;
        height: 175px;
    }

    .btn-label { font-size: 1.4rem; }

    .milestones-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .popup-box { padding: 32px 20px; }
}
