@font-face {
    font-family: 'Stardos Stencil';
    src: url('resources/f/StardosStencil-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Stardos Stencil';
    src: url('resources/f/StardosStencil-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
    font-family: 'Stardos Stencil', serif;
}

/* Hide scrollbar for all elements */
*::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html {
    overflow-x: hidden;
    height: 100%;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    margin: 0;
    padding: 0;
    /* background-image: url('resources/concrete-1600535.jpg'); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
body {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-image: url('resources/concrete-1600535.jpg'); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.main {
    background-color: rgba(255, 255, 255, 0.8);
    width: min(60rem, 100%);
    margin: 0 auto;
    padding: clamp(1rem, 4vw, 2.5rem);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 1);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sfields {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: .5rem;
    padding-bottom: 1rem;
    opacity: 0;
    animation: fadeInScale 0.6s ease-out forwards;
}

.sfields[style*="display: block"] {
    animation: fadeInScale 0.6s ease-out forwards;
}

.header {
    position: relative;
    z-index: 2;
    padding: 20px;
    margin: 0 auto;
    text-align: center;
}

.logo h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: black;
    line-height: 1;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: .25rem 1rem;
    font-size: 1rem;
    font-family: 'Stardos Stencil', serif;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-btn:hover:not(:disabled) {
    background-color: #555;
}

.nav-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.question-counter {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.submit-btn {
    display: none;
    background-color: #33a837;
}

.submit-btn:hover:not(:disabled) {
    background-color: #45a049;
}

.landing {
    padding: 3rem 2rem;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: slideInDown 0.8s ease-out;
}

.logo svg {
    width: 32px;
    height: 32px;
    stroke: black;
    flex-shrink: 0;
    animation: rotate360 1.5s ease-in-out;
}

.tagline {
    font-size: 1rem;
    color: black;
    opacity: .75;
    margin-top: 2rem;
    animation: fadeIn 1.2s ease-out 0.3s backwards;
}

.begin-btn {
    padding: .5rem 2rem;
    font-size: 1.25rem;
    font-family: 'Stardos Stencil', serif;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    animation: pulse 2s ease-in-out 0.8s backwards, fadeInUp 1s ease-out 0.5s backwards;
}

.begin-btn:hover {
    background-color: #555;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.75;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate360 {
    0% {
        transform: rotate(0deg) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

.question {
    padding: clamp(1.5rem, 5vw, 2.5rem);
    min-height: 200px;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.question[style*="display: block"] {
    opacity: 1;
    transform: translateX(0);
    animation: slideInRight 0.5s ease-out;
}

.question h3 {
    margin-top: 0;
    margin-left: clamp(0, 2vw, 2rem);
    font-size: clamp(1rem, 2.6vw, 1.25rem);
    font-weight: 600;
    color: #222;
    line-height: 1.5;
}

.question-spacer {
    height: 1px;
    background-color: black;
    opacity: .125;
    margin-bottom: 3rem;
}

.option-label {
    display: block;
    padding: .5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: .5rem;
    transition: all 0.3s ease;
    position: relative;
    padding-top: -.1rem;
}

.option-label:hover {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.3);
}

.option-label input {
    display: none;
}

.option-label:has(input:checked) {
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    font-weight: 700;
}

.question textarea {
    padding: .5rem 1rem;
    font-size: 1rem;
    font-family: 'Stardos Stencil', serif;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: .5rem;
    resize: vertical;
    transition: border-color 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
}

.question textarea:focus {
    outline: none;
    border-color: #4CAF50;
    background-color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 640px) {
    body {
        padding: 0 1rem 2rem;
    }

    .main {
        padding: .0rem;
        border-radius: .75rem;
    }

    .sfields:not([style*="display: none"]) ~ .header,
    .sfields[style*="display: block"] ~ .header {
        display: none;
    }

    body:has(.sfields:not([style*="display: none"])) .header,
    body:has(.sfields[style*="display: block"]) .header {
        display: none;
    }

    .header {
        padding: 1.5rem 1rem;
    }

    .logo {
        gap: .5rem;
    }

    .logo h1 {
        font-size: 1.75rem;
        text-align: center;
    }

    .tagline {
        font-size: .85rem;
        margin-top: 1rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }

    .navigation {
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .nav-btn {
        font-size: 1.05rem;
        flex: 1;
        max-width: 48%;
    }

    .submit-btn {
        width: 100%;
        font-size: 1.05rem;
    }

    .question-counter {
        order: -1;
        text-align: center;
        width: 100%;
        margin-bottom: 0.125rem;
    }

    .question {
        padding: 1rem;
        min-height: auto;
    }

    .question h3 {
        margin: 0 auto;
        text-align: center;
        margin-bottom: .5rem;
    }

    .option-label {
        font-size: .95rem;
        padding: .75rem 1rem;
    }

    .question-spacer {
        margin: 0;
        margin-bottom: 1.5rem;
    }

    .nav-btn {
        padding: .375rem .75rem;
    }

    .option-label {
        padding: .25rem .75rem;
    }
}