@font-face {
    font-family: 'Inter';
    src: url('./fonts/Inter-Regular.woff2') format('woff2'),
         url('./fonts/Inter-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('./fonts/Inter-Italic.woff2') format('woff2'),
         url('./fonts/Inter-Italic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

:root {
    --bg-1: #f5f5f5;
    --bg-2: #ececec;
    --surface-1: #ffffff;
    --surface-2: #f1f1f1;
    --text-main: #141414;
    --text-soft: #535353;
    --stroke: #d5d5d5;
    --shadow-1: 0px 16px 35px rgba(0, 0, 0, 0.12);
    --shadow-2: 0px 18px 40px rgba(0, 0, 0, 0.18);
    --radius-md: 0.7rem;
    --radius-lg: 1rem;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    padding: 1.25rem;
    font-family: Inter, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 15% 20%, #ffffff 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, #e8e8e8 0%, transparent 42%),
        linear-gradient(160deg, var(--bg-1), var(--bg-2));
}

.app {
    width: min(640px, 100%);
    min-height: calc(100vh - 2.5rem);
    margin: 0 auto;
    position: relative;
}

/* ========================= */
/* Shared Screen System      */
/* ========================= */

.screen {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(560px, 100%);
    transform: translate(-50%, -53%);
    text-align: center;

    transition: opacity 0.35s ease,
                transform 0.35s ease,
                filter 0.35s ease;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    filter: blur(2px);
}

.screen.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    filter: blur(0);
}

/* ========================= */
/* Shared Components         */
/* ========================= */

.btn {
    border: 1px solid transparent;
    background-color: #111111;
    color: #ffffff;
    font-family: inherit;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.72rem 1.6rem;
    border-radius: var(--radius-md);
    box-shadow: 0px 8px 18px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    transition: transform 0.22s ease,
                box-shadow 0.22s ease,
                background-color 0.22s ease,
                color 0.22s ease,
                border-color 0.22s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus-visible {
    outline: none;
    border-color: #6f6f6f;
    box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.18);
}

/* ========================= */
/* Start Screen              */
/* ========================= */

#startQuizContainer {
    background: linear-gradient(180deg, #f3f3f3, #e7e7e7);
    border: 1px solid #d7d7d7;
    color: var(--text-main);
    font-weight: 600;
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow-1);
}

#startQuizContainer:hover {
    transform: translate(-50%, -50%) scale(1.01);
    box-shadow: var(--shadow-2);
}

.screen-text {
    margin: 0 0 1rem 0;
    color: #2a2a2a;
    line-height: 1.45;
}

#startQuizBtn {
    min-width: 6rem;
    max-width: 7rem;
}

/* ========================= */
/* Quiz Main Content         */
/* ========================= */

#quizContent {
    max-width: 540px;
    width: min(540px, 100%);
    background: linear-gradient(180deg, #f9f9f9, #f0f0f0);
    border: 1px solid var(--stroke);
    border-radius: 1.1rem;
    padding: 1.55rem;
    box-shadow: var(--shadow-1);
}

.card {
    background: var(--surface-1);
    border: 1px solid #e2e2e2;
    border-radius: 0.9rem;
    padding: 1.2rem;
    box-shadow: 0px 9px 20px rgba(0, 0, 0, 0.08);
}

.question {
    margin: 0 0 1.1rem 0;
    font-size: 1.28rem;
    line-height: 1.45;
    letter-spacing: -0.01em;
    font-weight: 650;
}

#form {
    margin-top: 0.25rem;
    text-align: left;
}

.options {
    display: grid;
    gap: 0.62rem;
}

.options br {
    display: none;
}

.option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    border: 1px solid #d4d4d4;
    background-color: var(--surface-2);
    border-radius: 0.7rem;
    padding: 0.75rem 0.9rem;
    transition: background-color 0.2s ease,
                border-color 0.2s ease,
                transform 0.2s ease,
                box-shadow 0.2s ease;
    cursor: pointer;
}

.option:hover {
    background-color: #ebebeb;
    border-color: #bcbcbc;
    transform: translateY(-1px);
    box-shadow: 0px 5px 12px rgba(0, 0, 0, 0.08);
}

.option input[type="radio"] {
    margin: 0;
    width: 1rem;
    height: 1rem;
    accent-color: #202020;
    cursor: pointer;
}

.option span {
    color: #1f1f1f;
    font-weight: 500;
    line-height: 1.4;
}

.option input[type="radio"]:focus-visible {
    outline: 2px solid #7a7a7a;
    outline-offset: 2px;
}

.option input[type="radio"]:checked + span {
    font-weight: 600;
}

/* ========================= */
/* Result Screen             */
/* ========================= */

#quizResultContainer {
    max-width: 460px;
    width: min(460px, 100%);
    background: linear-gradient(180deg, #f4f4f4, #e9e9e9);
    border: 1px solid #d6d6d6;
    border-radius: 1rem;
    padding: 1.6rem;
    box-shadow: var(--shadow-1);
}

#resultText {
    margin: 0.35rem 0 0.7rem 0;
    font-weight: 650;
    letter-spacing: -0.01em;
}

#resultSubtext {
    margin: 0 0 1.1rem 0;
    color: var(--text-soft);
    line-height: 1.5;
}

.actions {
    display: flex;
    justify-content: center;
}

#restartBtn {
    min-width: 132px;
}

/* ========================= */
/* Responsive                */
/* ========================= */

@media (max-width: 600px) {
    body {
        padding: 0.9rem;
    }

    .app {
        min-height: calc(100vh - 1.8rem);
    }

    #startQuizContainer,
    #quizContent,
    #quizResultContainer {
        padding: 1.2rem;
    }

    .question {
        font-size: 1.13rem;
    }

    .option {
        padding: 0.66rem 0.75rem;
    }

    .btn {
        width: 100%;
    }
}
