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

:root {
    --red: #e63946;
    --green: #2a9d8f;
    --gold: #f4d35e;
    --bg: #0a0a0f;
    --card: #12131a;
    --card2: #1a1b24;
    --border: #2a2b36;
    --t1: #f0f0f5;
    --t2: #8888a0;
    --t3: #555566;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg);
    color: var(--t1);
    min-height: 100vh;
    overflow-x: hidden;
}

.glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
}
.g1 { background: var(--red); top: -200px; left: -200px; }
.g2 { background: var(--green); bottom: -200px; right: -200px; }

.snow {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}
.flake {
    position: absolute;
    color: #fff;
    opacity: 0.6;
    animation: fall linear infinite;
}
@keyframes fall {
    to { transform: translateY(100vh) rotate(360deg); }
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
    z-index: 2;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
    position: relative;
}
header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--red), var(--gold), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}
.tree, .gift { font-size: 2rem; animation: bounce 2s infinite; }
.gift { animation-delay: 0.5s; }
@keyframes bounce { 50% { transform: translateY(-8px); } }

.info-btn {
    position: absolute;
    right: 0;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--t2);
    cursor: pointer;
}
.info-btn:hover { border-color: var(--gold); color: var(--t1); }

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}
@media (max-width: 900px) { main { grid-template-columns: 1fr; } }

.win {
    background: var(--card);
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.titlebar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(180deg, #2a2b36, #1f2028);
    border-bottom: 1px solid var(--border);
}
.titlebar span { flex: 1; text-align: center; font-size: 0.85rem; color: var(--t2); font-family: monospace; }
.dots { display: flex; gap: 8px; width: 52px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; }
.r { background: #ff5f57; }
.y { background: #ffbd2e; }
.g { background: #28c840; }

.content { padding: 24px; }

.counter { text-align: center; padding: 20px 0 30px; }
.counter small { font-size: 0.75rem; letter-spacing: 3px; color: var(--t3); display: block; margin-bottom: 12px; }
.counter .num {
    font-size: 4rem;
    font-weight: 700;
    font-family: monospace;
    background: linear-gradient(135deg, var(--gold), #fff, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.counter span { font-size: 0.85rem; color: var(--t2); }

.progress-box {
    background: var(--card2);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border);
}
.prog-head { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--t2); }
.prog-head span:last-child { color: var(--green); font-family: monospace; }
.bar {
    height: 24px;
    background: var(--bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--red), var(--gold), var(--green));
    border-radius: 12px;
    transition: width 1s ease;
    position: relative;
}
.fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

.stats { display: flex; justify-content: space-between; margin-top: 16px; }
.stats div { display: flex; flex-direction: column; gap: 4px; }
.stats small { font-size: 0.75rem; color: var(--t3); text-transform: uppercase; }
.stats span { font-family: monospace; font-size: 1.1rem; }

.log-content { padding: 0; height: 340px; display: flex; flex-direction: column; }
.log-head {
    display: grid;
    grid-template-columns: 1fr 30px 1fr 50px 80px;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.7rem;
    color: var(--t3);
    text-transform: uppercase;
    background: var(--card2);
    border-bottom: 1px solid var(--border);
}
.log-list { flex: 1; overflow: hidden; }
.log-scroll { display: flex; flex-direction: column; animation: scroll 30s linear infinite; }
.log-list:hover .log-scroll { animation-play-state: paused; }
@keyframes scroll { to { transform: translateY(-50%); } }

.row {
    display: grid;
    grid-template-columns: 1fr 30px 1fr 50px 80px;
    gap: 8px;
    padding: 10px 20px;
    font-family: monospace;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(42,43,54,0.5);
}
.row:hover { background: var(--card2); }
.row .arrow { color: var(--green); text-align: center; }
.row .amt { color: var(--gold); text-align: center; }
.row a { color: var(--t2); text-decoration: none; }
.row a:hover { color: var(--gold); }

.log-foot {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    background: var(--card2);
}
.live { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--green); }
.dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
.hint { font-size: 0.7rem; color: var(--t3); font-style: italic; }

footer {
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 20px;
    background: var(--card);
    border-radius: 10px;
    border: 1px solid var(--border);
}
footer div { text-align: center; }
footer small { display: block; font-size: 0.7rem; color: var(--t3); text-transform: uppercase; margin-bottom: 6px; }
footer span { font-family: monospace; }

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.modal.show { opacity: 1; visibility: visible; }
.modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
}
.modal-win {
    position: relative;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s;
    z-index: 1;
}
.modal.show .modal-win { transform: scale(1); }
.modal-body { text-align: center; }
.modal-body .emoji { font-size: 3rem; margin-bottom: 16px; }
.modal-body h2 { color: var(--gold); margin-bottom: 8px; }
.modal-body .tag { color: var(--t2); font-style: italic; margin-bottom: 24px; }
.close-btn {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.close-btn:hover, .close-btn:active {
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255,95,87,0.7);
}
.section { text-align: left; margin-bottom: 20px; padding: 16px; background: var(--card2); border-radius: 6px; }
.section h3 { font-size: 0.85rem; color: var(--green); margin-bottom: 10px; text-transform: uppercase; }
.section p { font-size: 0.9rem; color: var(--t2); line-height: 1.6; }
.section code { font-size: 0.75rem; color: var(--t1); word-break: break-all; }
.links { display: flex; justify-content: center; gap: 16px; margin-top: 20px; }
.links a {
    padding: 10px 20px;
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--t1);
    text-decoration: none;
}
.links a:hover { border-color: var(--gold); }

@media (max-width: 600px) {
    header h1 { font-size: 1.4rem; }
    .counter .num { font-size: 2.8rem; }
    footer { flex-direction: column; gap: 16px; }
}
