* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: white;
    background: linear-gradient(135deg, #0f172a, #1e1b4b, #312e81);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-x: hidden;
}

.background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(25px);
    opacity: 0.55;
    animation: float 9s ease-in-out infinite;
}

.blob-1 {
    width: 340px;
    height: 340px;
    background: #22d3ee;
    top: -80px;
    left: -70px;
}

.blob-2 {
    width: 420px;
    height: 420px;
    background: #a855f7;
    right: -120px;
    bottom: -90px;
    animation-delay: 1.5s;
}

.blob-3 {
    width: 260px;
    height: 260px;
    background: #facc15;
    right: 20%;
    top: 15%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-28px) scale(1.06);
    }
}

.app {
    width: 100%;
    max-width: 850px;
}

.card {
    background: rgba(15, 23, 42, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    padding: 36px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(18px);
}

.hidden {
    display: none;
}

.logo {
    font-size: 64px;
    margin-bottom: 12px;
    animation: pop 0.7s ease;
}

@keyframes pop {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

h1 {
    margin: 0;
    font-size: 46px;
    line-height: 1.05;
}

.subtitle {
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.5;
}

.settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 30px 0;
}

label {
    display: grid;
    gap: 8px;
    color: #e2e8f0;
    font-weight: bold;
}

input {
    width: 100%;
    border: 0;
    outline: none;
    border-radius: 16px;
    padding: 16px;
    font-size: 18px;
    color: white;
    background: rgba(255, 255, 255, 0.12);
}

input:focus {
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.45);
}

button {
    border: 0;
    cursor: pointer;
    font-weight: bold;
    transition: 0.18s ease;
}

.primary-btn,
.secondary-btn {
    width: 100%;
    border-radius: 18px;
    padding: 17px 20px;
    font-size: 18px;
    color: #07111f;
}

.primary-btn {
    background: linear-gradient(135deg, #facc15, #22c55e, #22d3ee);
}

.secondary-btn {
    margin-top: 18px;
    background: linear-gradient(135deg, #93c5fd, #c4b5fd);
}

.primary-btn:hover,
.secondary-btn:hover,
.answer-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.error {
    color: #fecaca;
    font-weight: bold;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.quiz-header > div {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 14px 18px;
}

.small-label {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 4px;
}

.progress-wrap {
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #facc15);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.question-box {
    text-align: center;
    margin-bottom: 26px;
}

.question-box p {
    color: #cbd5e1;
    font-size: 18px;
    margin: 0 0 8px;
}

.question-box h2 {
    margin: 0;
    font-size: 44px;
    color: #facc15;
}

.answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.answer-btn {
    min-height: 74px;
    padding: 18px;
    border-radius: 20px;
    font-size: 18px;
    text-align: left;
    color: white;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.answer-btn:disabled {
    cursor: default;
}

.answer-btn.correct {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
}

.answer-btn.wrong {
    background: linear-gradient(135deg, #dc2626, #f97316);
    color: white;
}

.message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 18px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.success {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.error-message {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

.result-circle {
    width: 180px;
    height: 180px;
    margin: 28px auto;
    border-radius: 50%;
    background: conic-gradient(#22c55e 0deg, #facc15 160deg, #334155 160deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 45px rgba(34, 197, 94, 0.35);
}

.result-circle span {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: bold;
}

.result-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 24px 0;
}

.result-stats div {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 18px;
    text-align: center;
}

.result-stats strong {
    display: block;
    font-size: 34px;
}

.result-stats span {
    color: #cbd5e1;
}

@media (max-width: 700px) {
    .settings,
    .answers,
    .result-stats {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 34px;
    }

    .question-box h2 {
        font-size: 34px;
    }

    .card {
        padding: 24px;
    }

    .quiz-header {
        flex-direction: column;
    }
}