/* Header layout + quiz entry */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-nav.layui-nav {
    background: transparent;
    padding: 0;
}

.header-nav .layui-nav-item {
    line-height: 60px;
}

.header-nav .layui-nav-item a {
    padding: 0 18px;
    font-size: 16px;
}

/* Quiz form modal – styled after spoto.net .form-card */
.nav-quiz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    height: 38px;
    padding: 0 18px 0 14px;
    border: none;
    background: #ff5b03;
    color: #fff;
    border-radius: 20px;
    font-size: 16px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 91, 3, 0.3);
}

.nav-quiz-btn-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.nav-quiz-btn:hover {
    background: #e65100;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 91, 3, 0.4);
}

.quiz-modal-overlay {
    display: none !important;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: transparent;
    pointer-events: none;
}

.quiz-modal-overlay.is-open {
    display: flex !important;
}

.quiz-modal-overlay .quiz-form-card {
    position: relative;
    z-index: 1;
    pointer-events: auto;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    text-align: center;
}

@keyframes quizModalIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.quiz-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.quiz-modal-close:hover {
    color: #333;
}

.quiz-form-card .form-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #19192d;
    padding: 6px 16px 0;
    font-size: 14px;
    margin-bottom: 10px;
}

.quiz-form-card .form-badge-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.quiz-form-card .form-title {
    font-size: 28px;
    font-weight: 700;
    color: #19192d;
    margin: 0 0 14px;
    line-height: 1.25;
}

.quiz-form-card .form-subtitle {
    font-size: 14px;
    color: #ff5b04;
    margin-bottom: 14px;
    display: inline-block;
}

.quiz-form-card .form-group {
    margin-bottom: 16px;
    text-align: left;
}

.quiz-form-card .form-group input,
.quiz-form-card .form-group select {
    width: 100%;
    height: 44px;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background-color: rgba(107, 95, 143, 0.06);
    color: #333;
    font-size: 14px;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.quiz-form-card .form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.quiz-form-card .form-group input:focus,
.quiz-form-card .form-group select:focus {
    outline: none;
    border-color: #ff5b03;
    box-shadow: 0 0 0 3px rgba(255, 107, 26, 0.1);
}

.quiz-form-card .form-group input::placeholder {
    color: #9aa3b2;
    opacity: 1;
}

.quiz-form-card .btn-submit {
    width: 100%;
    padding: 10px;
    background: #ff5b03;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    box-shadow: 0 7px 14px #f9cbb1;
}

.quiz-form-card .btn-submit:hover {
    background: #e65100;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 107, 26, 0.35);
}

.quiz-form-card #quizForm.is-submitting {
    pointer-events: none;
}

.quiz-form-card #quizForm.is-submitting .btn-submit {
    opacity: 0.85;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quiz-form-card .form-privacy-note {
    display: block;
    margin: 10px 0 0;
    font-size: 12px;
    color: #999;
    text-align: center;
    line-height: 1.5;
}

.quiz-form-error {
    margin: 0 0 12px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #c92626;
    background: #fff5f5;
    border-radius: 8px;
    text-align: left;
    display: none;
}

.quiz-form-error.is-visible {
    display: block;
}

@media (max-width: 480px) {
    .quiz-form-card {
        padding: 24px 20px;
        border-radius: 14px;
    }

    .quiz-form-card .form-title {
        font-size: 24px;
    }
}
