@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #38b6ff;
    --secondary-color: #0099e6;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
}

.kepribadian-container {
    padding-top: 80px;
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Hero - Updated to match Calculator style */
.kepribadian-hero {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.kepribadian-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff !important;
    background: linear-gradient(135deg, #38b6ff 0%, #0099e6 100%);
    text-align: center;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 15px rgba(56, 182, 255, 0.3);
    margin: 0;
}

.kepribadian-subtitle {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    color: #fff;
    background: #0099e6;
    padding: 16px 20px;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kepribadian-description {
    font-size: 15px;
    text-align: center;
    color: #fff;
    line-height: 1.7;
    background: #0099e6;
    padding: 16px 20px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 15px rgba(0, 153, 230, 0.2);
    margin: 0;
}

/* Form */
.kepribadian-form {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

.section-title i {
    color: var(--primary-color);
}

.section-subtitle {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #bbb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    height: 50px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(56, 182, 255, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    display: block;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 5px;
}

.form-text {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* Select2 Styling */
.select2-container--default .select2-selection--single {
    height: 50px !important;
    border: 1px solid #bbb !important;
    border-radius: 8px !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection__rendered {
    line-height: 50px !important;
    color: var(--text-dark) !important;
}

.select2-container--default .select2-selection__arrow {
    height: 50px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(56, 182, 255, 0.1) !important;
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
    margin: 40px 0;
}

/* Question Cards */
.question-card {
    background: #f8fbff;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    transition: var(--transition);
}

.question-card:hover {
    box-shadow: var(--shadow);
}

.question-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.question-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    min-width: 30px;
}

.question-instruction {
    flex: 1;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.6;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.option-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.option-label:hover {
    border-color: var(--primary-color);
    background: rgba(56, 182, 255, 0.05);
}

.option-label:has(.option-radio:checked) {
    border-color: var(--primary-color);
    background: rgba(56, 182, 255, 0.1);
}

.option-radio {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.option-content {
    flex: 1;
    display: flex;
    gap: 6px;
}

.option-letter {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 20px;
}

.option-text {
    color: var(--text-dark);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Progress Bar */
.progress-container {
    margin: 40px 0;
    padding: 30px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-text {
    text-align: center;
    color: var(--text-dark);
    font-weight: 500;
    margin: 0;
}

#answeredCount {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Submit Button */
.form-actions {
    text-align: center;
    margin-top: 40px;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(56, 182, 255, 0.3);
    width: 100%;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #0099e6 0%, #007acc 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 182, 255, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.question-card.answered {
    border-left-color: var(--success-color);
    background: #f0fff4;
}

/* Responsive */
@media (max-width: 768px) {
    .kepribadian-container {
        padding-top: 60px;
    }

    .kepribadian-hero {
        padding: 0 15px;
    }

    .kepribadian-title {
        font-size: 22px;
        padding: 16px;
    }

    .kepribadian-subtitle {
        font-size: 16px;
        padding: 14px 16px;
    }

    .kepribadian-description {
        font-size: 14px;
        padding: 14px 16px;
    }

    .kepribadian-form {
        padding: 25px 20px;
    }

    .section-title {
        font-size: 18px;
    }

    .question-card {
        padding: 15px;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .option-label {
        padding: 10px 12px;
    }

    .btn-submit {
        padding: 14px 30px;
    }
}

@media (max-width: 480px) {
    .kepribadian-title {
        font-size: 20px;
    }

    .kepribadian-subtitle {
        font-size: 15px;
    }

    .kepribadian-description {
        font-size: 13px;
    }

    .question-header {
        flex-direction: column;
        gap: 8px;
    }

    .question-number {
        font-size: 1rem;
    }

    .option-text {
        font-size: 0.9rem;
    }
}