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

:root {
    --bg: #050816;
    --accent: #6366f1;
    --accent-soft: rgba(99, 102, 241, 0.18);
    --text: #f9fafb;
    --muted: #9ca3af;
    --danger: #f97373;
    --radius-xl: 24px;
    --radius-lg: 16px;
    --blur: 22px;
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.7);
    --transition-fast: 0.18s ease-out;
}

body {
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, #22d3ee20, transparent 55%),
        radial-gradient(circle at bottom right, #a855f720, transparent 55%),
        var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.app {
    width: 100%;
    max-width: 420px;
}

.card {
    position: relative;
    width: 100%;
    padding: 24px 22px 26px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.22), transparent 55%);
    opacity: 0.7;
    filter: blur(var(--blur));
    z-index: -1;
}

.card-header {
    margin-bottom: 20px;
}

.card-header h1 {
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    font-weight: 650;
}

.card-header p {
    margin-top: 6px;
    font-size: 0.9rem;
    color: var(--muted);
}

.section {
    animation: fadeInUp 0.25s ease-out;
}

.hidden {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.8);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform var(--transition-fast),
                box-shadow var(--transition-fast),
                background var(--transition-fast),
                border-color var(--transition-fast);
}

.btn.primary {
    width: 100%;
    background: radial-gradient(circle at 0 0, #22d3ee, #6366f1);
    border-color: transparent;
    box-shadow: 0 16px 35px rgba(56, 189, 248, 0.4);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.7);
}

.btn.primary:hover {
    box-shadow: 0 18px 42px rgba(56, 189, 248, 0.55);
}

.btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.btn:disabled {
    opacity: 0.45;
    cursor: default;
    box-shadow: none;
    transform: none;
}

/* countdown */
#countdown {
    text-align: center;
    padding-block: 18px 10px;
}

.count-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

/* question */
.prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 14px;
    margin-bottom: 16px;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 0 0, var(--accent-soft), transparent 70%);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.arrow {
    font-size: 2.6rem;
    padding: 12px 22px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.9);
}

.prompt p {
    font-size: 0.95rem;
    color: var(--muted);
}

.options {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.options .btn {
    flex: 1;
}

.progress {
    display: flex;
    justify-content: flex-end;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.timer {
    position: relative;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    overflow: hidden;
}

.timer-bar {
    position: absolute;
    inset-block: 0;
    left: 0;
    width: 0%;
    background: linear-gradient(90deg, #22d3ee, #6366f1, #a855f7);
    transition: width 0.04s linear;
}

/* result */
#result {
    text-align: left;
}

#result h2 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

#score-text {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

#comment-text {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 14px;
}

/* motion */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .card {
        padding: 20px 16px 22px;
    }
    .arrow {
        font-size: 2.2rem;
    }
}