/* ============================================
   DIAGNOSA FORM STYLES - THEME AWARE
   ============================================ */

.diagnosa-section {
    background: transparent;
}

.diagnosa-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
}

/* Progress Steps */
.progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 25%;
    width: 50%;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.step.active .step-number {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-glow);
    transform: scale(1.1);
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step.completed .step-number::after {
    content: '✓';
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeInRight 0.4s ease;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-step-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

/* Form Groups */
.form-group {
    margin-bottom: 2rem;
}

/* Form Hint Text */
.form-hint {
    color: #94a3b8;
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

body.light-theme .form-hint {
    color: #64748b;
}


.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

/* Dark theme: Make input backgrounds darker with lighter text for better contrast */
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 1rem;
    transition: var(--transition-base);
}

/* Light theme: Lighter background with dark text */
body.light-theme .form-group input[type="text"],
body.light-theme .form-group input[type="number"],
body.light-theme .form-group select {
    background: #ffffff;
    color: #1e293b;
    border: 2px solid #e2e8f0;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Dark theme: Lighter placeholder text */
.form-group input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

/* Light theme: Darker placeholder text */
body.light-theme .form-group input::placeholder {
    color: #64748b;
    opacity: 0.8;
}

/* Dark theme: Darker dropdown options with light text */
.form-group select option {
    background-color: #1e293b;
    color: #ffffff;
}

/* Light theme: Light dropdown options with dark text */
body.light-theme .form-group select option {
    background-color: #ffffff;
    color: #1e293b;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Range Inputs */
.input-with-value {
    position: relative;
    padding-top: 2rem;
}

.input-with-value input[type="range"] {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.input-with-value input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    transition: var(--transition-base);
}

.input-with-value input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.7);
}

.input-with-value input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.range-value {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    min-width: 60px;
    text-align: center;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.range-category {
    font-weight: 600;
    color: var(--primary-light);
}

/* Radio Group */
.radio-group {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.radio-card {
    position: relative;
    cursor: pointer;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-content {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 0.75rem;
    text-align: center;
    transition: var(--transition-base);
}

.radio-card input[type="radio"]:checked+.radio-content {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.radio-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.radio-label {
    font-size: 0.75rem;
    color: #ffffff;
    font-weight: 500;
}

/* Light theme: Dark text for radio labels */
body.light-theme .radio-label {
    color: #1e293b;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
}

.form-navigation .btn {
    flex: 1;
}

/* Hasil Container */
.hasil-container {
    text-align: center;
}

.hasil-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.hasil-nilai {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeIn 0.8s ease;
}

.hasil-kategori {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease;
}

.hasil-kategori.rendah {
    background: var(--gradient-success);
    color: white;
}

.hasil-kategori.sedang {
    background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
    color: white;
}

.hasil-kategori.tinggi {
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
    color: white;
}

.hasil-kategori.sangat-tinggi {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
}

.hasil-rekomendasi {
    background: var(--bg-card);
    border-left: 4px solid var(--primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: left;
    margin-top: 2rem;
    animation: fadeInUp 1.2s ease;
}

.hasil-rekomendasi h4 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.hasil-rekomendasi p {
    color: var(--text-muted);
    line-height: 1.8;
    white-space: pre-line;
}

/* ============================================
   RIWAYAT TABLE
   ============================================ */

.table-container {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: rgba(99, 102, 241, 0.2);
}

.data-table th {
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.data-table tbody tr {
    transition: var(--transition-base);
}

.data-table tbody tr:hover {
    background: var(--bg-card);
}

.risk-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.risk-badge.rendah {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.risk-badge.sedang {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.risk-badge.tinggi {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.risk-badge.sangat-tinggi {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.about-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition-base);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.about-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
}

.about-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Empty State */
.empty-state {
    padding: 3rem;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    color: #cbd5e1;
    font-size: 1.125rem;
}

body.light-theme .empty-state p {
    color: #64748b;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .radio-group {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .diagnosa-container {
        padding: 2rem 1.5rem;
    }

    .progress-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .radio-group {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-navigation {
        flex-direction: column;
    }

    .table-container {
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .radio-group {
        grid-template-columns: 1fr;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
    }
}