/* Reset body margin when quiz layout is active */
body:has(.quiz-layout) {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Quiz Layout */
.quiz-layout {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(180deg, #0D1E51 11.54%, #2669A8 48.56%, #000354 81.73%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Quiz Container */
.quiz-container {
    --_zoom: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    min-height: calc(100dvh / var(--_zoom, 1));
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px 20px;
    color: #FFFFFF;
    text-align: center;
    position: relative;
    zoom: var(--_zoom);
}

/* Gauge */
.quiz-gauge-wrapper {
    width: 77%;
    margin-bottom: 30px;
    flex-shrink: 0;
    overflow: visible;
    position: relative;
    top: -8px;
}

.quiz-gauge-svg {
    width: 100%;
    height: auto;
    overflow: visible;
    display: block;
}

.quiz-gauge-arc {
    fill: none;
    stroke-width: 100;
    stroke-linecap: butt;
}

.quiz-gauge-needle {
    stroke: #FFFFFF;
    stroke-width: 8;
    stroke-linecap: round;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-gauge-needle-base {
    fill: #FFFFFF;
}

/* Content area */
.quiz-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1;
    padding-top: 20px;
}

/* Welcome Screen */
.quiz-welcome-saznajte {
    font-family: 'Changa', sans-serif;
    font-weight: 400;
    font-size: 34px;
    line-height: 120%;
    letter-spacing: 0.1em;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.quiz-welcome-potencijal {
    font-family: 'Changa', sans-serif;
    font-weight: 700;
    font-size: 68px;
    line-height: 120%;
    letter-spacing: 0;
    color: #FFFFFF;
}

.quiz-welcome-vase-proizvodnje {
    font-family: 'Changa', sans-serif;
    font-weight: 700;
    font-size: 41px;
    line-height: 120%;
    letter-spacing: 0;
    color: #FFFFFF;
    margin-bottom: 30px;
}

.quiz-welcome-vecina {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 25px;
    line-height: 120%;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.quiz-welcome-range {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 55px;
    line-height: 120%;
    color: #FFFFFF;
}

.quiz-welcome-kapaciteta {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 25px;
    line-height: 120%;
    color: #FFFFFF;
    margin-bottom: 30px;
}

.quiz-welcome-cta {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 500;
    font-size: 22px;
    line-height: 120%;
    color: #00BBFF;
    margin-bottom: 30px;
}

/* Buttons */
.quiz-btn-primary {
    background: linear-gradient(135deg, #00C3FF, #0681BF);
    color: #FFFFFF;
    border: none;
    border-radius: 15px;
    padding: 20px 44px;
    font-family: 'Baloo 2', sans-serif;
    font-size: 27px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    margin-bottom: 12px;
    min-width: 242px;
}

.quiz-btn-primary:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.quiz-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.quiz-btn-secondary {
    background: transparent;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 35px;
    padding: 13px 33px;
    font-size: 15px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.quiz-btn-secondary:hover {
    opacity: 0.8;
    border-color: #FFFFFF;
}

/* Question */
.quiz-question-number {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: #FFFFFF;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.quiz-question-text {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 500;
    font-size: 40px;
    line-height: 120%;
    color: #FFFFFF;
    margin-bottom: 24px;
}

/* Answers */
.quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.quiz-answer-btn {
    background: #00BFFF;
    color: #FFFFFF;
    border: none;
    border-radius: 15px;
    padding: 24px 24px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.quiz-answer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 191, 255, 0.4);
    background: #33ccff;
}

.quiz-answer-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: none;
    background: #009ad6;
}

/* Result Screen */
.quiz-result-subtitle {
    font-family: 'Baloo 2', sans-serif;
    font-size: 40px;
    font-weight: 500;
    color: #FFFFFF;
    line-height: 120%;
    margin-bottom: 16px;
}

.quiz-result-level-box {
    border: 2px solid;
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 20px;
}

.quiz-result-level {
    font-family: 'Changa', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
}

.quiz-result-description {
    font-family: 'Baloo 2', sans-serif;
    font-size: 25px;
    font-weight: 500;
    color: #FFFFFF;
    line-height: 120%;
    margin-bottom: 24px;
    max-width: 460px;
}

.quiz-result-potential-label {
    font-family: 'Baloo 2', sans-serif;
    font-size: 33px;
    font-weight: 500;
    color: #FFFFFF;
    line-height: 110%;
    margin-bottom: 4px;
}

.quiz-result-potential {
    font-family: 'Baloo 2', sans-serif;
    font-size: 50px;
    font-weight: 500;
    color: #FFFFFF;
    line-height: 110%;
    margin-bottom: 30px;
}

/* QR Code Screen */
.quiz-qr-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 24px;
    line-height: 1.4;
}

.quiz-qr-container {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    display: inline-block;
}

/* Email Page */
.quiz-email-title {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 500;
    font-size: 40px;
    line-height: 120%;
    letter-spacing: 0;
    text-align: center;
    color: #FFFFFF;
    margin-bottom: 16px;
}

.quiz-email-subtitle {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 500;
    font-size: 29px;
    line-height: 120%;
    letter-spacing: 0;
    text-align: center;
    color: #FFFFFF;
    margin-bottom: 24px;
    max-width: 460px;
}

/* Email Form */
.quiz-email-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 460px;
    gap: 16px;
}

.quiz-email-input {
    width: 100%;
    padding: 18px 22px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    font-family: 'Baloo 2', sans-serif;
    font-size: 18px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.quiz-email-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.quiz-email-input:focus {
    border-color: #00BBFF;
}

.quiz-email-error {
    color: #E53935;
    font-size: 14px;
    font-family: 'Baloo 2', sans-serif;
}

.quiz-email-success {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Loading & Error */
.quiz-loading {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 18px;
    color: #FFFFFF;
    padding: 40px 0;
}

.quiz-error {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 16px;
    color: #E53935;
    padding: 40px 0;
}

/* Reset Button */
.quiz-btn-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
    border: none;
    border-radius: 16px;
    padding: 14px 24px;
    cursor: pointer;
    margin-top: 40px;
    opacity: 0.5;
    transition: opacity 0.2s;
    width: 250px;
}

.quiz-btn-reset:hover {
    opacity: 0.7;
}

.quiz-reset-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.quiz-btn-reset span {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 500;
    font-size: 23px;
    line-height: 100%;
    white-space: nowrap;
}

/* Footer */
.quiz-footer {
    margin-top: auto;
    padding: 30px 0 20px;
    opacity: 0.7;
}

/* Responsive scaling for tablets and larger screens */
@media (min-width: 768px) {
    .quiz-container { --_zoom: 1.15; }
}

@media (min-width: 900px) {
    .quiz-container { --_zoom: 1.35; }
}

@media (min-width: 1024px) {
    .quiz-container { --_zoom: 1.5; }
}

@media (min-width: 1200px) {
    .quiz-container { --_zoom: 1.75; }
}

@media (min-width: 1400px) {
    .quiz-container { --_zoom: 2; }
}
