:root {
    --bg: transparent;
    --card: #fff;
    --text: #222;
    --brand-teal: #007f74;
    --choice-red: #dc2626;
    --light-gray: #e5e7eb;
    --dark-gray: #6b7280;
    --react-star: #fbbf24;
    --react-like: #00c4b4;
    --react-heart: #ef4444;
}

html, body {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    line-height: 1.6;
    color: var(--text);
    margin: 0; padding: 0;
    scroll-behavior: smooth;
}

.quiz-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
    position: relative;
}

.quiz-main-container {
    position: relative;
    min-height: 450px;
    height: auto;
    background-color: transparent;
    padding: 15px 0;
}

.quiz-page { display: none; animation: fadeIn 0.4s ease; }

#page-q1:checked ~ .quiz-main-container #content-q1,
#page-q2:checked ~ .quiz-main-container #content-q2,
#page-q3:checked ~ .quiz-main-container #content-q3,
#page-q4:checked ~ .quiz-main-container #content-q4,
#page-q5:checked ~ .quiz-main-container #content-q5,
#page-q6:checked ~ .quiz-main-container #content-q6,
#page-demo:checked ~ .quiz-main-container #content-demo {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.quiz-page-counter { font-size: 13px; color: #888; margin: 0 0 10px; font-weight: 700; text-transform: uppercase; }
.quiz-question-title { font-size: 20px; font-weight: 800; color: #333; margin: 0 0 15px 0; line-height: 1.4; }
.quiz-question-desc { color: #666; margin: -10px 0 20px; font-size: 14px; font-style: italic; }

.choices { display: flex; flex-direction: column; gap: 12px; }
.choice-item { position: relative; }
.choice-radio, .choice-checkbox { display: none; } 

.choice-label {
    display: flex; align-items: center; width: 100%; padding: 12px 15px;
    background: var(--card); border: 1px solid #ddd; cursor: pointer;
    font-size: 15px; transition: all 0.2s ease; position: relative;
    user-select: none; box-sizing: border-box; 
    color: #333;
    border-radius: 8px;
}

.choice-prefix {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 28px; height: 28px; margin-right: 12px; border-radius: 50%;
    background-color: var(--light-gray); font-weight: 700; color: var(--dark-gray);
    transition: all 0.2s ease;
}

.stat-feedback {
    display: none;
    margin-top: 4px;
    margin-left: 45px;
    font-size: 13px;
    color: var(--choice-red);
    font-weight: 600;
    font-style: italic;
}

.quiz-page:not(.answered) .choice-label:hover { background: #ffe4e1; border-color: var(--choice-red); }
.quiz-page:not(.answered) .choice-label:hover .choice-prefix { background-color: var(--choice-red); color: white; }

.choice-radio:checked + .choice-label,
.choice-checkbox:checked + .choice-label { 
    background: var(--choice-red); color: #fff; border-color: var(--choice-red); 
}
.choice-radio:checked + .choice-label .choice-prefix,
.choice-checkbox:checked + .choice-label .choice-prefix { 
    background: #fff; color: var(--choice-red); 
}
.choice-radio:checked ~ .stat-feedback,
.choice-checkbox:checked ~ .stat-feedback {
    display: block;
}

.box-controls { 
    margin-top: 25px; padding-top: 15px; border-top: 1px solid #eee; 
    display: flex; justify-content: space-between; align-items: center; gap: 15px; 
    flex-wrap: wrap; 
}
.progress-text { font-size: 13px; font-weight: 700; color: #888; }
.progress-text span { color: var(--brand-teal); } 

.box-controls > div:last-child {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-control { 
    display: inline-block;
    padding: 10px 24px; 
    font-size: 14px; 
    font-weight: 700; 
    cursor: pointer; 
    border: 1px solid transparent; 
    text-align: center; 
    user-select: none; 
    border-radius: 6px;
    white-space: nowrap;
}

.btn-next { background-color: var(--brand-teal); color: #fff; display: none; } 
.quiz-page.answered .btn-next { display: inline-block; }
#content-q5.ready-to-next .btn-next { display: inline-block; }

.btn-back { background-color: #6b7280; color: #fff; text-decoration: none; }

.demo-form { background: white; padding: 20px; border-radius: 8px; margin-top: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.demo-field { margin-bottom: 15px; }
.demo-field label { display: block; font-weight: 600; margin-bottom: 5px; }
.demo-field select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 15px; background-color: #f9fafb; outline: none; }
.demo-field select:focus { border-color: var(--brand-teal); } 

.btn-finish { 
    width: 100%; background: var(--brand-teal); 
    color: white; padding: 14px; border: none; font-weight: 700; 
    cursor: pointer; margin-top: 10px; font-size: 16px; border-radius: 6px; 
    transition: opacity 0.3s;
    display: block;
}
.btn-finish:hover { opacity: 0.9; }

#loading-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.98); z-index: 9999;
    justify-content: center; align-items: center; flex-direction: column;
}
.spinner {
    width: 50px; height: 50px; border: 5px solid #f3f3f3; 
    border-top: 5px solid var(--brand-teal); 
    border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 15px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

#thank-you-screen { display: none; text-align: center; padding: 40px 20px; animation: fadeIn 0.5s; }
.thank-title { font-size: 24px; font-weight: 800; color: var(--brand-teal); margin-bottom: 10px; } 
.thank-desc { color: #555; margin-bottom: 30px; }

.reaction-wrapper {
    margin: 20px auto; max-width: 100%; padding: 0 5px;
    display: flex; justify-content: center; gap: 15px;
}
.btn-react {
    background: #fff; border: 1px solid #eee; border-radius: 50px;
    padding: 8px 16px; cursor: pointer; font-size: 14px; font-weight: 600;
    display: flex; align-items: center; gap: 6px;
    transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.btn-react svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.btn-react:hover { transform: translateY(-2px); box-shadow: 0 3px 6px rgba(0,0,0,0.1); }
.btn-react[data-type="star"] { color: var(--react-star); border-color: #fde68a; }
.btn-react.active[data-type="star"] { background-color: #fffbeb; box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2); }
.btn-react[data-type="like"] { color: var(--react-like); border-color: #99f6e4; }
.btn-react.active[data-type="like"] { background-color: #f0fdfa; box-shadow: 0 0 0 2px rgba(0, 196, 180, 0.2); }
.btn-react[data-type="heart"] { color: var(--react-heart); border-color: #fca5a5; }
.btn-react.active[data-type="heart"] { background-color: #fef2f2; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2); }