/* ============================================================
   Big Five Personality Quiz — big5-quiz.css  v1.0
   Prefix: big5-  (all classes/IDs)
   ============================================================ */

/* ---------- Reset inside container ---------- */
.big5-quiz-container *,
.big5-results-wrap *,
.big5-gate-wrap * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================================
   QUIZ CONTAINER
   ============================================================ */
.big5-quiz-container {
    margin: 32px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    color: #333;
    padding: 0 16px 40px;
}

/* ---------- Progress ---------- */
.big5-progress-wrapper {
    margin-bottom: 28px;
}

.big5-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.big5-progress-pct {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.big5-step-label {
    font-size: 13px;
    color: #888;
}

.big5-progress-track {
    width: 100%;
    height: 7px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.big5-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #fd79a8);
    border-radius: 10px;
    transition: width 0.4s ease;
}

/* ---------- Scale Header ---------- */
.big5-scale-header {
    margin-bottom: 22px;
}

.big5-scale-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.big5-scale-title {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    color: #222;
    margin-bottom: 10px;
}

.big5-scale-labels {
    display: flex;
    justify-content: space-around;
    padding: 0 4px;
}

.big5-scale-labels span {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: #777;
    line-height: 1.3;
}

/* ---------- Questions ---------- */
.big5-questions-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.big5-question-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}

.big5-question-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.big5-question-text {
    font-size: 14px;
    color: #333;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.5;
}

.big5-radio-group {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
}

/* Hidden real radio inputs */
.big5-radio-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom radio circles */
.big5-radio-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.big5-radio-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    background: transparent;
    position: relative;
}

/* Value-specific colors */
.big5-radio-label[data-val="1"] .big5-radio-circle {
    border-color: #f28b82;
    background: #fff0ef;
}
.big5-radio-label[data-val="2"] .big5-radio-circle {
    border-color: #f5c07a;
    background: #fff8ef;
}
.big5-radio-label[data-val="3"] .big5-radio-circle {
    border-color: #bdbdbd;
    background: #f5f5f5;
}
.big5-radio-label[data-val="4"] .big5-radio-circle {
    border-color: #81c995;
    background: #f0faf2;
}
.big5-radio-label[data-val="5"] .big5-radio-circle {
    border-color: #4caf8a;
    background: #e8f8f2;
}

/* Checked states */
.big5-radio-label[data-val="1"] input[type="radio"]:checked + .big5-radio-circle {
    background: #f28b82; border-color: #f28b82;
}
.big5-radio-label[data-val="2"] input[type="radio"]:checked + .big5-radio-circle {
    background: #f5c07a; border-color: #f5c07a;
}
.big5-radio-label[data-val="3"] input[type="radio"]:checked + .big5-radio-circle {
    background: #757575; border-color: #757575;
}
.big5-radio-label[data-val="4"] input[type="radio"]:checked + .big5-radio-circle {
    background: #81c995; border-color: #81c995;
}
.big5-radio-label[data-val="5"] input[type="radio"]:checked + .big5-radio-circle {
    background: #4caf8a; border-color: #4caf8a;
}

/* Checkmark when selected */
.big5-radio-label input[type="radio"]:checked + .big5-radio-circle::after {
    content: '✓';
    display: block;
    font-size: 18px;
    color: #fff;
    font-weight: 700;
    line-height: 1;
}

.big5-radio-label .big5-radio-circle:hover {
    transform: scale(1.08);
}

/* Error highlight */
.big5-card-error {
    border: 2px solid #e53935 !important;
    background: #fff8f8 !important;
    transition: border 0.2s, background 0.2s;
}

/* ---------- Navigation ---------- */
.big5-nav-area {
    text-align: center;
    margin-top: 8px;
}

.big5-validation-msg {
    font-size: 13px;
    color: #e53935;
    margin-bottom: 10px;
    display: none;
}
.big5-validation-msg.big5-visible {
    display: block;
}

.big5-btn-next {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

.big5-btn-next:hover {
    opacity: 0.88;
}

.big5-btn-next:active {
    transform: scale(0.98);
}

.big5-btn-next:disabled {
    background: #9e9e9e;
    cursor: not-allowed;
}

/* ---------- Back Button ---------- */
.big5-btn-back {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1.5px solid #d0d0d0;
    border-radius: 10px;
    background: #fff;
    color: #666;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 0;
}

.big5-btn-back:hover {
    border-color: #6c5ce7;
    color: #6c5ce7;
    background: #f5f3ff;
}

.big5-btn-back:active {
    transform: scale(0.94);
}

.big5-scale-labels-offset {
    flex: 0 0 44px;
    min-width: 44px;
}

/* ---------- Loading state ---------- */
.big5-loading {
    text-align: center;
    padding: 40px 20px;
    color: #555;
    font-size: 15px;
}

.big5-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #6c5ce7;
    border-radius: 50%;
    animation: big5-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes big5-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   RESULTS PAGE
   ============================================================ */
.big5-results-body {
    background: #f4f6f9;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

.big5-results-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 28px 16px 64px;
}

/* --- Header --- */
.big5-results-header {
    text-align: center;
    margin-bottom: 28px;
}

.big5-site-logo {
    font-size: 13px;
    color: #6c5ce7;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 8px;
}

.big5-results-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.big5-result-date {
    font-size: 12px;
    color: #999;
}

/* --- Primary Card --- */
.big5-primary-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border-top: 5px solid var(--big5-type-color, #6c5ce7);
}

.big5-primary-badge {
    font-size: 52px;
    line-height: 1;
    flex-shrink: 0;
}

.big5-primary-info {
    flex: 1;
    min-width: 0;
}

.big5-primary-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 4px;
}

.big5-primary-name {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.big5-primary-tagline {
    font-size: 13px;
    color: #777;
    margin-bottom: 14px;
}

.big5-primary-score-bar {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
}

.big5-primary-score-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.big5-primary-score-text {
    font-size: 12px;
    color: #888;
}

/* --- Generic Card --- */
.big5-desc-card,
.big5-scores-card,
.big5-chart-card,
.big5-share-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.big5-desc-card h3,
.big5-scores-card h3,
.big5-chart-card h3,
.big5-share-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 14px;
}

.big5-desc-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 16px;
}

/* --- Traits columns --- */
.big5-traits {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.big5-traits-col {
    flex: 1;
    background: #f9f9fc;
    border-radius: 10px;
    padding: 14px 16px;
}

.big5-traits-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.big5-traits-col ul {
    list-style: none;
    padding: 0;
}

.big5-traits-col ul li {
    font-size: 13px;
    color: #555;
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
    line-height: 1.5;
}

.big5-traits-col ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #6c5ce7;
}

/* --- Chart Card --- */
.big5-chart-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.big5-radar-wrap {
    width: 260px;
    height: 260px;
    flex-shrink: 0;
}

#big5-radar-chart {
    filter: drop-shadow(0 4px 16px rgba(108,92,231,0.15));
}

.big5-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 180px;
}

.big5-legend-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}

.big5-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
}

.big5-legend-text strong {
    font-size: 12px;
    color: #222;
    display: block;
}

.big5-legend-pct {
    font-weight: 700;
    font-size: 14px;
}

/* --- Scores list --- */
.big5-scores-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.big5-score-row {}

.big5-score-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    font-weight: 500;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.big5-score-emoji {
    font-size: 16px;
}

.big5-badge-dominant {
    background: #6c5ce7;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    margin-left: 2px;
}

.big5-level-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    margin-left: auto;
}

.big5-score-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.big5-score-bar-bg {
    flex: 1;
    height: 10px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.big5-score-bar-inner {
    height: 100%;
    border-radius: 10px;
    transition: width 1.2s ease;
}

.big5-score-pct {
    font-size: 12px;
    color: #888;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

.big5-score-row.big5-score-dominant .big5-score-label {
    font-weight: 700;
    color: #1a1a2e;
}

/* --- Trait Detail Cards --- */
.big5-trait-detail-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.big5-trait-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.big5-trait-emoji {
    font-size: 28px;
    flex-shrink: 0;
}

.big5-trait-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
}

.big5-trait-level {
    font-size: 12px;
    font-weight: 600;
    margin-top: 2px;
}

.big5-trait-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.65;
    margin: 0;
}

/* --- Share Card --- */
.big5-share-card p {
    font-size: 13px;
    color: #777;
    margin-bottom: 14px;
}

.big5-share-url {
    display: flex;
    gap: 8px;
}

.big5-share-url input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    background: #fafafa;
    outline: none;
    min-width: 0;
}

.big5-btn-copy {
    padding: 10px 18px;
    background: #6c5ce7;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.big5-btn-copy:hover {
    opacity: 0.85;
}

/* --- Footer --- */
.big5-results-footer {
    text-align: center;
    margin-top: 28px;
}

.big5-btn-retake {
    display: inline-block;
    padding: 13px 30px;
    background: transparent;
    border: 2px solid #6c5ce7;
    color: #6c5ce7;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.big5-btn-retake:hover {
    background: #6c5ce7;
    color: #fff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */


@media (min-width: 768px) {
    .big5-quiz-container {
        max-width: 50%;
    }
}
@media (min-width: 1440px) {
    .big5-quiz-container {
        max-width: 66.666667%;
    }
}
@media (max-width: 600px) {
    .big5-quiz-container {
        max-width: 100% !important;
    }
    .big5-primary-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .big5-primary-badge {
        font-size: 56px;
    }
    .big5-primary-name {
        font-size: 18px;
    }
    .big5-traits {
        flex-direction: column;
    }
    .big5-radio-circle {
        width: 34px;
        height: 34px;
    }
    .big5-radio-label input[type="radio"]:checked + .big5-radio-circle::after {
        font-size: 15px;
    }
    .big5-share-url {
        flex-direction: column;
    }
    .big5-results-wrap {
        padding: 16px 12px 48px;
    }
    .big5-chart-wrap {
        flex-direction: column;
        gap: 20px;
    }
    .big5-radar-wrap {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 400px) {
    .big5-radar-wrap {
        width: 180px;
        height: 180px;
    }
}

/* ============================================================
   ACCESS GATE
   ============================================================ */
.big5-gate-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f4f6f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.big5-gate-box {
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.big5-gate-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.big5-gate-box h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.big5-gate-box p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.big5-gate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.big5-gate-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
    color: #333;
    box-sizing: border-box;
}

.big5-gate-form input:focus {
    border-color: #6c5ce7;
}

.big5-gate-error {
    color: #e53935;
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}
