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

:root {
    --primary-red: #c41e3a;
    --dark-red: #8b0000;
    --light-red: #e63946;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #d9d9d9;
    --dark-gray: #6c757d;
    --text-dark: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.15) 0%, rgba(139, 0, 0, 0.25) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path d="M0 300 Q300 200 600 300 T1200 300" fill="none" stroke="rgba(196,30,58,0.1)" stroke-width="2"/><path d="M0 350 Q300 250 600 350 T1200 350" fill="none" stroke="rgba(196,30,58,0.08)" stroke-width="2"/></svg>');
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 0.3;
}

.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: var(--medium-gray);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--light-red) 100%);
    width: 0%;
    transition: width 0.4s ease;
    box-shadow: 0 0 10px rgba(196, 30, 58, 0.5);
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    min-height: calc(100vh - 80px);
}

.quiz-container {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-bottom: 20px;
    position: relative;
}

.participant-id {
    position: absolute;
    top: 15px;
    right: 25px;
    background: var(--primary-red);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3);
}

.block {
    animation: fadeIn 0.5s ease-in;
}

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

.block h2 {
    color: var(--primary-red);
    font-size: 28px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-red);
    font-weight: 700;
}

.block-intro {
    color: var(--dark-gray);
    font-size: 15px;
    margin-bottom: 30px;
    font-style: italic;
    line-height: 1.8;
}

.question {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--primary-red);
    transition: all 0.3s ease;
}

.question:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateX(2px);
}

.question label:first-child {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 16px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--white);
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
}

.radio-option:hover {
    border-color: var(--primary-red);
    background: rgba(196, 30, 58, 0.05);
    transform: translateX(4px);
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-red);
}

.radio-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--primary-red);
}

.scale-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.scale-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: var(--white);
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
    font-weight: 600;
}

.scale-option:hover {
    border-color: var(--primary-red);
    background: rgba(196, 30, 58, 0.05);
    transform: scale(1.05);
}

.scale-option input[type="radio"] {
    display: none;
}

.scale-option input[type="radio"]:checked + span {
    color: var(--white);
}

.scale-option:has(input[type="radio"]:checked) {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--white);
    transform: scale(1.1);
}

.text-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--white);
    font-family: inherit;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.inline-input {
    margin-top: 8px;
    max-width: 300px;
}

.conditional {
    border-left-color: var(--light-red);
    background: rgba(196, 30, 58, 0.03);
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-btn {
    flex: 1;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#prevBtn {
    background: var(--white);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}

#prevBtn:hover:not(:disabled) {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

#nextBtn {
    background: var(--primary-red);
    color: var(--white);
}

#nextBtn:hover:not(:disabled) {
    background: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.thank-you-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.8s ease-in;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.particles::before {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.particles::after {
    bottom: 15%;
    right: 15%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.1);
    }
}

.thank-you-content {
    text-align: center;
    color: var(--white);
    z-index: 1;
    animation: scaleIn 0.8s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.runner-icon {
    font-size: 120px;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.thank-you-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.thank-you-message {
    font-size: 20px;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 20px auto;
    }

    .quiz-container {
        padding: 25px 20px;
    }

    .participant-id {
        position: static;
        display: inline-block;
        margin-bottom: 20px;
    }

    .block h2 {
        font-size: 24px;
    }

    .question {
        padding: 15px;
    }

    .scale-options {
        gap: 8px;
    }

    .scale-option {
        min-width: 50px;
        padding: 10px;
    }

    .navigation-buttons {
        flex-direction: column;
        padding: 0 15px;
    }

    .nav-btn {
        width: 100%;
    }

    .thank-you-title {
        font-size: 32px;
    }

    .thank-you-message {
        font-size: 18px;
    }

    .runner-icon {
        font-size: 80px;
    }
}

@media (max-width: 480px) {
    .quiz-container {
        padding: 20px 15px;
    }

    .block h2 {
        font-size: 20px;
    }

    .question label:first-child {
        font-size: 15px;
    }

    .radio-option {
        padding: 10px 12px;
        font-size: 14px;
    }

    .scale-option {
        min-width: 45px;
        padding: 8px;
        font-size: 14px;
    }

    .text-input {
        font-size: 14px;
        padding: 10px 12px;
    }

    .nav-btn {
        padding: 14px 24px;
        font-size: 14px;
    }
}
