:root {
    /* colour palette */
    --bg: #0a0a0f;
    --green: #2ecc71;
    --text: #e0e0e0;
    --subtext: #999;
    --accent-bg: rgba(46,204,113,0.1);
    --transition: 0.3s ease;
}

/* base */
body {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a27 100%);
    color: var(--text);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* subtle animated glow in the background */
.glow {
    position: fixed;
    top: -20%;
    left: -20%;
    width: 140vw;
    height: 140vh;
    background: radial-gradient(circle at center, rgba(46,204,113,0.2), transparent 60%);
    animation: pulse 8s infinite alternate;
    pointer-events: none;
    z-index: -1;
}

@keyframes pulse {
    from { transform: scale(1); opacity: 0.8; }
    to   { transform: scale(1.2); opacity: 0.6; }
}

#app {
    width: 90%;
    max-width: 800px;
    text-align: center;
    padding: 20px;
}

/* header styling */
#header {
    padding: 40px 20px 20px;
    backdrop-filter: blur(8px);
    background: var(--accent-bg);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.logo {
    font-size: 50px;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

h1 {
    margin: 10px 0 5px; /* space below title */
    font-size: 2.4rem;
    line-height: 1.3; /* slightly looser for readability */
}

.subtitle {
    margin: 8px 0 18px; /* tighten slightly above and below */
    font-size: 1rem;
    line-height: 1.4;
    color: var(--subtext);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 16px; /* slightly reduced gap for compactness */
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--subtext);
    margin-bottom: 20px; /* extra space below stats before button */
}

.accent { color: var(--green); }

.primary-btn {
    background: transparent;
    border: 2px solid var(--green);
    color: var(--green);
    padding: 16px 50px; /* a bit more vertical padding */
    border-radius: 30px;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.primary-btn:hover {
    background: var(--green);
    color: #000;
    box-shadow: 0 0 25px rgba(46,204,113,0.4);
    transform: scale(1.05);
}

.tip {
    font-size: 0.8rem;
    color: var(--subtext);
    margin-top: 10px;
}

#stage {
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    position: relative;
    display: none;
    margin: 20px 0 40px; /* leave space for hint */
    overflow: hidden;
}

/* hint text above the animation stage */
.hint {
    font-size: 1.1rem;
    color: var(--text);
    margin: 10px 0 0;
    min-height: 1.4em;
    transition: var(--transition);
}

#ball {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: radial-gradient(circle at 30%, #fff, var(--green));
    position: absolute;
    display: none;
    box-shadow: 0 0 25px var(--green);
    transition: transform 0.1s;
}

.progress-container {
    width: 220px;
    height: 4px;
    background: #333;
    margin: 20px auto;
    border-radius: 2px;
    overflow: hidden;
    display: none;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: var(--green);
    transition: var(--transition);
}

#quote-box {
    font-style: italic;
    color: var(--subtext);
    font-size: 0.9rem;
    /* reposition into stage center */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    text-align: center;
    pointer-events: none;
}

/* ensure stage preserves its own background when quote shows */
#stage {
    position: relative;
}

.social-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-links a {
    color: var(--text);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--green);
}

.social-links svg {
    width: 24px;
    height: 24px;
}

/* responsive tweaks */
@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    .stats { flex-direction: column; gap: 8px; }
    .primary-btn { padding: 12px 36px; }
}
