/* ============================================
   Ranking Quiz LP - Front End Styles
   ============================================ */

/* === Quiz Page === */
.rqlp-quiz-wrap {
    background: #F5F7FA;
    padding: 40px 16px;
    min-height: 400px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", sans-serif;
}

.rqlp-quiz-container {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Progress */
.rqlp-progress {
    margin-bottom: 32px;
}
.rqlp-progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}
.rqlp-progress-bar {
    height: 8px;
    background: #E8ECF0;
    border-radius: 4px;
    overflow: hidden;
}
.rqlp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Question */
.rqlp-question-text {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: #1a1a1a;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* Choices */
.rqlp-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rqlp-choice-btn {
    display: block;
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    background: #fff;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    line-height: 1.4;
    font-family: inherit;
}
.rqlp-choice-btn:hover {
    border-color: #4CAF50;
    background: #F0FFF0;
    box-shadow: 0 2px 8px rgba(76,175,80,0.15);
}
.rqlp-choice-btn:active,
.rqlp-choice-btn.rqlp-choice-selected {
    border-color: #4CAF50;
    background: #E8F5E9;
    color: #2E7D32;
    font-weight: 600;
}

/* Nav */
.rqlp-nav {
    margin-top: 20px;
    text-align: center;
}
.rqlp-back-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    font-family: inherit;
}
.rqlp-back-btn:hover {
    color: #333;
}

/* Loading */
.rqlp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}
.rqlp-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #E8ECF0;
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: rqlp-spin 0.8s linear infinite;
}
@keyframes rqlp-spin {
    to { transform: rotate(360deg); }
}
.rqlp-loading-text {
    margin-top: 16px;
    font-size: 15px;
    color: #666;
}

/* === Result Page === */
.rqlp-result-wrap {
    padding: 20px 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", sans-serif;
    background: #F5F7FA;
    min-height: 400px;
}
.rqlp-result-content {
    max-width: 800px;
    margin: 0 auto;
}
.rqlp-result-header {
    text-align: center;
    margin-bottom: 32px;
}
.rqlp-result-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}
.rqlp-result-subtitle {
    font-size: 14px;
    color: #777;
    margin: 0;
}

/* Rank Card */
.rqlp-rank-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    border: 2px solid transparent;
}
.rqlp-rank-first {
    border-color: #FFD700;
    box-shadow: 0 4px 16px rgba(255,215,0,0.2);
}

/* Badge */
.rqlp-rank-badge {
    position: absolute;
    top: 0;
    left: 0;
    padding: 6px 16px;
    border-radius: 0 0 12px 0;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    background: #888;
    z-index: 2;
}
.rqlp-badge-gold { background: linear-gradient(135deg, #FFD700, #FFA500); }
.rqlp-badge-silver { background: linear-gradient(135deg, #C0C0C0, #A8A8A8); }
.rqlp-badge-bronze { background: linear-gradient(135deg, #CD7F32, #B87333); }

/* Body */
.rqlp-rank-body {
    padding: 24px;
    padding-top: 40px;
}
.rqlp-rank-top {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.rqlp-rank-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
}
.rqlp-rank-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.rqlp-rank-info {
    flex: 1;
}
.rqlp-rank-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}

/* Stars */
.rqlp-rank-stars {
    margin-bottom: 4px;
}
.rqlp-star {
    font-size: 16px;
    line-height: 1;
}
.rqlp-star-full { color: #FFB800; }
.rqlp-star-half { color: #FFB800; opacity: 0.6; }
.rqlp-star-empty { color: #DDD; }
.rqlp-rating-num {
    font-size: 14px;
    font-weight: 600;
    color: #FFB800;
    margin-left: 4px;
}
.rqlp-rank-jobs {
    font-size: 13px;
    color: #777;
    margin: 4px 0 0;
}

/* Match bar */
.rqlp-match-bar-wrap {
    margin-bottom: 16px;
}
.rqlp-match-label {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}
.rqlp-match-label strong {
    color: #4CAF50;
    font-size: 16px;
}
.rqlp-match-bar {
    height: 10px;
    background: #E8ECF0;
    border-radius: 5px;
    overflow: hidden;
}
.rqlp-match-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #81C784);
    border-radius: 5px;
    transition: width 1s ease;
}

/* Features */
.rqlp-rank-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rqlp-rank-features li {
    background: #F0F7FF;
    color: #1565C0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* Description */
.rqlp-rank-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 16px;
}
.rqlp-rank-desc p {
    margin: 0 0 8px;
}

/* CTA */
.rqlp-rank-cta {
    text-align: center;
}
.rqlp-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B35, #F4511E);
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 40px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}
.rqlp-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255,107,53,0.4);
    opacity: 0.95;
}

/* No result */
.rqlp-no-result {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* Retry */
.rqlp-retry {
    text-align: center;
    margin-top: 32px;
}
.rqlp-retry-btn {
    display: inline-block;
    color: #4CAF50 !important;
    font-size: 14px;
    text-decoration: underline !important;
    cursor: pointer;
}

/* === Responsive === */
@media (max-width: 600px) {
    .rqlp-quiz-container {
        padding: 24px 16px;
        border-radius: 12px;
    }
    .rqlp-question-text {
        font-size: 18px;
    }
    .rqlp-choice-btn {
        padding: 14px 16px;
        font-size: 15px;
    }
    .rqlp-rank-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .rqlp-rank-name {
        font-size: 16px;
    }
    .rqlp-rank-features {
        justify-content: center;
    }
    .rqlp-cta-btn {
        width: 100%;
        padding: 14px 20px;
        box-sizing: border-box;
    }
    .rqlp-result-title {
        font-size: 20px;
    }
}
