body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #0f1419 100%);
    background-attachment: fixed;
}

/* Light mode overrides */
[data-theme="light"] body {
    background: linear-gradient(135deg, #e8f0f7 0%, #f0f5fa 100%);
    background-attachment: fixed;
}

/* Symptom Grid Styling */
#symptoms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    padding: 4px;
}

/* Symptom Item Container */
#symptoms-grid > div {
    position: relative;
}

.symptom-checkbox {
    display: none; /* Hide the default checkbox */
}

.symptom-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    min-height: 56px;
    background: linear-gradient(135deg, #1a1f2e 0%, #151a26 100%);
    color: #94a3b8;
    border: 2px solid #2d3748;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    font-weight: 500;
    font-size: 13.5px;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.symptom-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(197, 48, 48, 0.1) 0%, rgba(155, 44, 44, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.symptom-label:hover {
    background: linear-gradient(135deg, #242938 0%, #1d2230 100%);
    border-color: #ef4444;
    color: #f1f5f9;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(239, 68, 68, 0.1);
}

.symptom-label:hover::before {
    opacity: 1;
}

.symptom-checkbox:checked + .symptom-label {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    border-color: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.symptom-checkbox:checked + .symptom-label::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.diagnosis-card {
    background: linear-gradient(135deg, #1e2433 0%, #181d2a 100%);
    border: 2px solid #374151;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(55, 65, 81, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.diagnosis-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    opacity: 0.8;
}

.diagnosis-card:hover {
    border-color: #ef4444;
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(239, 68, 68, 0.3), 0 0 32px rgba(239, 68, 68, 0.15);
}

.diagnosis-card h3 {
    color: #fca5a5;
    margin-bottom: 20px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(252, 165, 165, 0.2);
    padding-left: 12px;
}

.diagnosis-card p {
    line-height: 1.7;
    margin-bottom: 16px;
    color: #cbd5e1;
    font-size: 15px;
    padding-left: 12px;
}

.diagnosis-card p:last-child {
    margin-bottom: 0;
}

.diagnosis-card strong {
    color: #fca5a5;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 4px;
}

/* Custom styling for the section headers */
#symptom-selector {
    background: linear-gradient(135deg, #1e2433 0%, #181d2a 100%) !important;
    border: 2px solid #374151 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#symptom-selector h2 {
    color: #fca5a5;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(252, 165, 165, 0.2);
}

/* Results container */
#results-container {
    min-height: 120px;
}

#results-container p {
    color: #94a3b8;
    font-size: 16px;
    padding: 32px;
    background: linear-gradient(135deg, #1e2433 0%, #181d2a 100%);
    border: 2px dashed #374151;
    border-radius: 12px;
}

/* Diagnose button */
#diagnose-btn {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border: none;
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#diagnose-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#diagnose-btn:hover::before {
    width: 300px;
    height: 300px;
}

#diagnose-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
    box-shadow: 0 8px 28px rgba(220, 38, 38, 0.6), 0 0 0 1px rgba(239, 68, 68, 0.2);
    transform: translateY(-3px) scale(1.02);
}

#diagnose-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Light mode symptom labels */
[data-theme="light"] .symptom-label {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #495057;
    border-color: #ced4da;
}

[data-theme="light"] .symptom-label::before {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(10, 88, 202, 0.05) 100%);
}

[data-theme="light"] .symptom-label:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #f1f3f5 100%);
    border-color: #0d6efd;
    color: #212529;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(13, 110, 253, 0.1);
}

[data-theme="light"] .symptom-checkbox:checked + .symptom-label {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-color: #0d6efd;
    color: white;
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.3), 0 0 0 1px rgba(13, 110, 253, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Light mode diagnosis cards */
[data-theme="light"] .diagnosis-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-color: #dee2e6;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(222, 226, 230, 0.5);
}

[data-theme="light"] .diagnosis-card::before {
    background: linear-gradient(180deg, #0d6efd 0%, #0a58ca 100%);
}

[data-theme="light"] .diagnosis-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(13, 110, 253, 0.3), 0 0 32px rgba(13, 110, 253, 0.1);
}

[data-theme="light"] .diagnosis-card h3 {
    color: #0d6efd;
    text-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
}

[data-theme="light"] .diagnosis-card p {
    color: #495057;
}

[data-theme="light"] .diagnosis-card strong {
    color: #0d6efd;
}

[data-theme="light"] .diagnosis-card .text-gray-400 {
    color: #6c757d !important;
}

/* Light mode symptom selector */
[data-theme="light"] #symptom-selector {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-color: #dee2e6 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] #symptom-selector h2 {
    color: #0d6efd;
    text-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
}

[data-theme="light"] #symptom-counter {
    color: #6c757d !important;
}

[data-theme="light"] #clear-btn {
    background: #e9ecef !important;
    color: #495057 !important;
    border-color: #ced4da !important;
}

[data-theme="light"] #clear-btn:hover {
    background: #dee2e6 !important;
    border-color: #adb5bd !important;
    color: #212529 !important;
}

/* Light mode results container */
[data-theme="light"] #results-container p {
    color: #6c757d;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-color: #dee2e6;
}

/* Light mode diagnose button */
[data-theme="light"] #diagnose-btn {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3), 0 0 0 1px rgba(13, 110, 253, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="light"] #diagnose-btn:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
    box-shadow: 0 8px 28px rgba(13, 110, 253, 0.4), 0 0 0 1px rgba(13, 110, 253, 0.2);
}

[data-theme="light"] #diagnose-btn:active {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Light mode match badge */
[data-theme="light"] .diagnosis-card span[style*="background: rgba(239, 68, 68, 0.2)"] {
    background: rgba(13, 110, 253, 0.15) !important;
    color: #0d6efd !important;
    border-color: rgba(13, 110, 253, 0.3) !important;
}

/* Light mode page headings */
[data-theme="light"] h1.text-white {
    color: #212529 !important;
}

[data-theme="light"] .text-gray-400 {
    color: #6c757d !important;
}

[data-theme="light"] .text-gray-200 {
    color: #495057 !important;
}

[data-theme="light"] .text-gray-300 {
    color: #6c757d !important;
}

/* Light mode alert box */
[data-theme="light"] .bg-gradient-to-r {
    background: linear-gradient(to right, rgba(13, 110, 253, 0.1) 0%, rgba(10, 88, 202, 0.15) 100%) !important;
}

[data-theme="light"] .border-red-500 {
    border-color: #0d6efd !important;
}

[data-theme="light"] .text-red-400 {
    color: #0d6efd !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #symptoms-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .symptom-label {
        padding: 12px 14px;
        font-size: 12.5px;
        min-height: 50px;
    }

    .diagnosis-card {
        padding: 20px;
    }

    .diagnosis-card h3 {
        font-size: 22px;
    }
}
