@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Poppins', sans-serif;
        }
        /* Keep scrollbar rules */
        ::-webkit-scrollbar {
            width: 10px;
        }
        ::-webkit-scrollbar-track {
            background: #f1f1f1;
        }
        ::-webkit-scrollbar-thumb {
            background: var(--primary-color);
            border-radius: 5px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark);
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        header {
            background: rgba(255, 255, 255, 0.95);
            /* thinner header: reduced vertical padding */
            padding: 12px 0;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            margin-bottom: 18px;
            position: sticky;
            top: 0;
            z-index: 1000;
            transition: all 0.22s ease;
        }
        header.scrolled {
            padding: 8px 0;
            background: rgba(255, 255, 255, 0.98);
        }
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 20px;
            font-weight: 800;
        /* Dark theme override: make inline alert visible on dark backgrounds */
        body.dark-theme .duration-alert {
            display: block; 
            background: linear-gradient(90deg, rgba(40,48,60,0.9), rgba(18,22,28,0.9));
            color: #ffdede;
            border: 1px solid rgba(255,110,110,0.12);
            box-shadow: 0 8px 26px rgba(0,0,0,0.6);
        }
        body.dark-theme .duration-alert em { color: #ffb6b6; }
        body.dark-theme .duration-alert strong { color: #ffdede; }
            color: #b43f3f;
            letter-spacing: 1px;
            position: relative;
            z-index: 10;
            transition: all 0.22s ease;
        }
        .logo:hover {
            transform: scale(1.05);
        }
.logo { text-decoration: none; }
.logo-img {
    width: 72px;
    height: auto;
    border-radius: 50%;
    object-fit: contain;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
    transition: transform 0.32s ease, filter 0.32s ease;
}
.logo-img:hover {
  transform: scale(1.05) rotate(-2deg);
  filter: brightness(1.1) saturate(1.15);
}
.logo-text {
    background: linear-gradient(
        90deg,
        #00f5ff,
        #0072ff,
        #8a2be2,
        #ff00ff,
        #ff6a00,
        #00f5ff
    );
    background-size: 400% 400%;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 5s ease infinite;
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.18);
    position: relative;
    transition: all 0.22s ease;
    font-size: 22px;
    line-height: 1.05;
}
.logo-text::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 60%;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 80%);
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.logo:hover .logo-text::after {
  opacity: 1;
}
.logo-text:hover {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4),
               0 0 25px rgba(0, 255, 255, 0.3),
               0 0 40px rgba(255, 0, 255, 0.25);
  transform: scale(1.05);
}
/* Gradient Animation */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
/* ====== Responsive Adjustments ====== */
@media (max-width: 768px) {
  .logo {
    gap: 10px;
  }
  .logo-img {
    width: 55px;  /* smaller for tablets */
  }
  .logo-text {
    font-size: 26px;
  }
    /* when screen <=768 reduce logo font-size for balance */
    .logo { font-size: 22px; }
}

@media (max-width: 480px) {
  .logo {
    flex-direction: row;
  }
  .logo-img {
    width: 45px;  /* smaller for phones */
  }
  .logo-text {
    font-size: 22px;
  }
}
        nav {
            display: flex;
            gap: 20px;
        }
        nav a {
            text-decoration: none;
            color: var(--secondary-color);
            font-weight: 500;
            padding: 8px 16px;
            border-radius: 20px;
            transition: all 0.3s ease;
            position: relative;
        }
        nav a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 2px;
            background: var(--primary-color);
            transition: width 0.3s ease;
        }
        nav a:hover::after {
            width: 100%;
        }
        nav a:hover {
            color: #3498db;
        }
:root{
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --page-bg: var(--bg-gradient);
    --card-bg: rgba(255,255,255,0.95);
    --text-color: #2c3e50;
    --muted: #7f8c8d;
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --glass: rgba(255,255,255,0.7);
}
body.dark-theme,
body[data-theme="dark"] {
  --page-bg: linear-gradient(180deg, #0f1724 0%, #071124 100%); /* darker background */
  --card-bg: rgba(10, 14, 20, 0.7);
  --text-color: #e6eef8;
  --muted: #a9b7c7;
  --primary-color: #60a5fa;
  --accent-color: #ff7a7a;
  --glass: rgba(255,255,255,0.04);
  color: var(--text-color);
}
body {
  background: var(--page-bg);
  color: var(--text-color);
  transition: background .35s ease, color .35s ease;
}
/* Explicit: ensure light theme uses the old purple gradient */
body:not(.dark-theme),
body:not([data-theme="dark"]) {
    background: var(--bg-gradient);
    color: var(--text-color);
}
.symptoms-form,
.about-section,
.contact-section,
.feature-card,
.contact-form,
.contact-info,
.result-card {
  background: var(--card-bg);
  transition: background .35s ease, box-shadow .35s ease, transform .2s ease;
  color: var(--text-color);
}
a, .logo-text, .feature-card i {
  color: var(--primary-color);
}
p, .stat-label, .feature-card p {
  color: var(--muted);
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: transparent;
  font-size: 18px;
    width: 36px;
    height: 36px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
  color: var(--text-color);
  box-shadow: none;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-1px);
}
body.dark-theme .theme-toggle:hover {
  background: rgba(255,255,255,0.03);
}
.theme-toggle i {
  pointer-events: none;
}
        .hero {
            text-align: center;
            padding: 80px 0;
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
            animation: rotate 30s linear infinite;
            z-index: -1;
        }

        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .hero h1 {
            font-size: 56px;
            color: white;
            margin-bottom: 20px;
            font-weight: 700;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
            animation: fadeInDown 1s ease;
        }

        .hero p {
            font-size: 20px;
            color: rgba(255,255,255,0.9);
            margin-bottom: 30px;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
            line-height: 1.6;
            animation: fadeInUp 1s ease 0.2s;
            animation-fill-mode: both;
        }
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        .symptoms-form {
            /* modern glass card with subtle gradient */
            background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.78));
            border-radius: 18px;
            padding: 28px 24px;
            max-width: 860px;
            margin: 12px auto 18px;
            box-shadow: 0 12px 40px rgba(18,38,63,0.08);
            border: 1px solid rgba(34,60,80,0.06);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
            display: block;
        }
        .symptoms-form:hover {
            transform: translateY(-6px);
            box-shadow: 0 22px 50px rgba(18,38,63,0.12);
            border-color: rgba(52,152,219,0.08);
        }
        .symptoms-form form {
            display: grid;
            grid-template-columns: 1fr 220px;
            gap: 14px;
            align-items: center;
            grid-template-areas:
                "symptoms duration"
                "submit submit";
        }
        .symptoms-form form .form-group:nth-of-type(1) { grid-area: symptoms; }
        .symptoms-form form .form-group:nth-of-type(2) { grid-area: duration; }
        .symptoms-form form .form-group.form-actions { grid-area: submit; display:flex; justify-content:flex-end; align-items:center; }
        .symptoms-input-container {
            display: flex;
            gap: 8px;
            align-items: center;
            width: 100%;
        }
        #symptoms {
            flex: 1;
            padding: 14px 14px;
            border-radius: 12px;
            border: 1px solid rgba(34,60,80,0.08);
            font-size: 16px;
            outline: none;
            transition: box-shadow .18s ease, border-color .18s ease, transform .12s ease;
            background: rgba(255,255,255,0.95);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
        }
        #symptoms:focus {
            border-color: var(--primary-color);
            box-shadow: 0 8px 30px rgba(52,152,219,0.06);
            transform: translateY(-1px);
        }
        .voice-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            padding: 0;
            border: 1px solid rgba(52,152,219,0.1);
            border-radius: 12px;
            background: rgba(52,152,219,0.08);
            color: var(--primary-color);
            font-size: 18px;
            cursor: pointer;
            transition: all .2s ease;
            flex-shrink: 0;
        }
        .voice-btn:hover {
            background: rgba(52,152,219,0.14);
            transform: scale(1.05);
        }
        .voice-btn:active {
            transform: scale(0.98);
        }
        /*listening state */
        .voice-btn.listening {
            background: linear-gradient(135deg, #00f5ff, #8a2be2);
            color: white;
            border-color: transparent;
            box-shadow: 0 8px 24px rgba(0,245,255,0.3), 0 0 12px rgba(138,43,226,0.2);
            animation: voicePulse 1s ease-in-out infinite;
        }
        /* Error state */
        .voice-btn.error {
            background: rgba(231,76,60,0.12);
            color: #c0392b;
            border-color: rgba(231,76,60,0.2);
        }
        /* Voice pulse animation during listening */
        @keyframes voicePulse {
            0%, 100% { box-shadow: 0 8px 24px rgba(0,245,255,0.3), 0 0 12px rgba(138,43,226,0.2); }
            50% { box-shadow: 0 8px 24px rgba(0,245,255,0.5), 0 0 20px rgba(138,43,226,0.3); }
        }
        /* Dark theme voice button */
        body.dark-theme .voice-btn {
            background: rgba(96,165,250,0.1);
            color: #60a5fa;
            border-color: rgba(96,165,250,0.1);
        }
        body.dark-theme .voice-btn:hover {
            background: rgba(96,165,250,0.18);
        }
        body.dark-theme .voice-btn.listening {
            background: linear-gradient(135deg, #00f5ff, #8a2be2);
            color: white;
            box-shadow: 0 8px 28px rgba(0,245,255,0.4), 0 0 16px rgba(138,43,226,0.3);
        }
        body.dark-theme .voice-btn.error {
            background: rgba(255,122,122,0.12);
            color: #ffb3b3;
            border-color: rgba(255,122,122,0.2);
        }
        .symptom-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 10px;
        }
        .symptom-tags .tag {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(90deg, rgba(52,152,219,0.12), rgba(231,76,60,0.08));
            color: var(--secondary-color);
            padding: 6px 10px;
            border-radius: 999px;
            font-weight: 600;
            font-size: 13px;
            border: 1px solid rgba(52,152,219,0.06);
        }
        .symptom-tags .tag button {
            background: transparent;
            border: none;
            color: rgba(44,62,80,0.6);
            cursor: pointer;
            font-weight: 700;
            padding: 0 0 0 4px;
        }
        .symptoms-form form .submit-btn {
            justify-self: end;
            padding: 12px 26px;
            border-radius: 12px;
            font-size: 15px;
            box-shadow: 0 8px 30px rgba(52,152,219,0.12);
        }

        @media (max-width: 720px) {
            .symptoms-form form { 
                grid-template-columns: 1fr; 
                grid-template-areas:
                    "symptoms"
                    "duration"
                    "submit";
            }
            .symptoms-form { padding: 20px; }
            .symptoms-form form .form-group.form-actions { justify-content: center; width:100%; }
            .symptoms-form form .submit-btn { justify-self: stretch; width:100%; }
        }
        .form-group {
            margin-bottom: 20px;
        }
        label {
            display: block;
            margin-bottom: 8px;
            color: #2c3e50;
            font-weight: 500;
        }
        input[type="text"],
        select,
        textarea {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 16px;
        }
        .symptom-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 10px;
        }
        .submit-btn {
            background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
            color: white;
            border: none;
            padding: 15px 35px;
            border-radius: 25px;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            z-index: 1;
            font-weight: 500;
            letter-spacing: 0.5px;
            box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
        }
        .submit-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, var(--primary-dark), var(--accent-color));
            transition: transform 0.5s ease;
            z-index: -1;
            transform: scaleX(0);
            transform-origin: right;
        }
        .submit-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
        }
        .submit-btn:hover::before {
            transform: scaleX(1);
            transform-origin: left;
        }
        .submit-btn:active {
            transform: translateY(1px);
            box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
        }
        .features {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 30px;
            margin-top: 60px;
        }
            /* Diagnosis results wrapper: styles for JS-inserted results */
            .diagnosis-results {
                margin-top: 30px;
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
                gap: 18px;
                align-items: start;
            }
            .diagnosis-results > h3 {
                display: flex;
                align-items: center;
                gap: 12px;
                font-size: 1.3rem;
                font-weight: 800;
                letter-spacing: 0.2px;
                margin-bottom: 12px;
                /* gradient text with a fallback color for older browsers */
                background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
                -webkit-background-clip: text;
                background-clip: text;
                -webkit-text-fill-color: transparent;
                color: var(--primary-color);
                /* subtle shadow to keep text legible on varied backgrounds */
                text-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 6px 18px rgba(0,0,0,0.06);
                position: relative;
                padding-left: 6px;
                animation: fadeInDown 0.45s ease both;
            }
            .diagnosis-results > h3::before {
                content: "";
                width: 8px;
                height: 36px;
                border-radius: 6px;
                background: linear-gradient(180deg, #00f5ff, #8a2be2);
                display: inline-block;
            }
            .diagnosis-results > h3::after {
                content: "";
                position: absolute;
                left: 0;
                right: 0;
                bottom: -8px;
                height: 4px;
                border-radius: 4px;
                background: linear-gradient(90deg, rgba(52,152,219,0.12), rgba(231,76,60,0.08));
                opacity: 0.9;
            }
            .diagnosis-results .result-card {
                position: relative;
                /* Use the card background variable for good contrast in light mode */
                background: var(--card-bg);
                /* subtle layered sheen to keep the visual style */
                background-image: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02));
                border: 1px solid rgba(0,0,0,0.06);
                padding: 22px 18px 18px;
                border-radius: 14px;
                color: var(--text-color);
                box-shadow: 0 6px 18px rgba(0,0,0,0.06);
                transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
                display: flex;
                flex-direction: column;
                gap: 8px;
                overflow: hidden;
                animation: cardIn .32s ease both;
                backdrop-filter: blur(6px);
                -webkit-backdrop-filter: blur(6px);
            }
            .diagnosis-results .result-card:hover {
                transform: translateY(-8px) scale(1.01);
                box-shadow: 0 18px 46px rgba(0,0,0,0.14);
                border-color: rgba(52,152,219,0.14);
            }
            .diagnosis-results .result-card p.disclaimer {
                color: #c0392b;
                font-size: 0.9em;
                margin-top: 10px;
            }
            .diagnosis-results .result-card a {
                display: inline-block;
                margin-top: 8px;
                color: #fff;
                text-decoration: none;
                background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
                padding: 8px 12px;
                border-radius: 10px;
                box-shadow: 0 6px 18px rgba(52,152,219,0.12);
                transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
            }
            .diagnosis-results .result-card a:hover {
                transform: translateY(-3px);
                box-shadow: 0 12px 30px rgba(52,152,219,0.18);
                opacity: 0.98;
            }
            /* decorative accent bar and title styling */
            .diagnosis-results .result-card::before {
                content: "";
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
                height: 6px;
                background: linear-gradient(90deg, #00f5ff, #0072ff, #8a2be2, #ff6a00);
            }
            .diagnosis-results .result-card b {
                font-size: 1.08rem;
                font-weight: 700;
                background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
                -webkit-background-clip: text;
                background-clip: text;
                color: transparent;
                display: inline-block;
                line-height: 1.2;
            }
            .diagnosis-results .result-card b::before {
                content: "🩺";
                margin-right: 8px;
                display: inline-block;
            }
            @keyframes cardIn {
                from { opacity: 0; transform: translateY(8px) scale(.995); }
                to { opacity: 1; transform: translateY(0) scale(1); }
            }
            /* Result card internal layout: header, icon, score, tags, progress */
            .diagnosis-results .result-card .card-header {
                display: flex;
                align-items: center;
                gap: 12px;
                width: 100%;
            }

            .diagnosis-results .result-card .result-icon {
                width: 56px;
                height: 56px;
                border-radius: 12px;
                flex: 0 0 56px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                font-size: 22px;
                color: #fff;
                background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
                box-shadow: 0 8px 18px rgba(52,152,219,0.14);
            }
            .diagnosis-results .result-card .card-meta {
                display: flex;
                flex-direction: column;
                gap: 4px;
                min-width: 0;
            }
            .diagnosis-results .result-card .card-meta .card-title {
                font-size: 1rem;
                font-weight: 700;
                color: var(--text-color);
                /* allow up to two lines and then truncate with an ellipsis */
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
                text-overflow: ellipsis;
                word-break: break-word;
                line-height: 1.15;
                max-height: calc(1.15em * 2); /* ensures two-line clamp consistency */
            }
            .diagnosis-results .result-card .card-meta .card-sub {
                font-size: 0.86rem;
                color: var(--muted);
            }
            .diagnosis-results .result-card .result-score {
                margin-left: auto;
                flex: 0 0 auto;
                background: linear-gradient(90deg, #ffb86b, #ff7a7a);
                color: #071124;
                padding: 6px 10px;
                border-radius: 999px;
                font-weight: 700;
                font-size: 0.92rem;
                box-shadow: 0 6px 18px rgba(255,122,122,0.12);
            }
            .diagnosis-results .result-card .result-progress {
                height: 8px;
                background: rgba(0,0,0,0.06);
                border-radius: 999px;
                overflow: hidden;
                margin-top: 8px;
            }
            .diagnosis-results .result-card .result-progress > span {
                display: block;
                height: 100%;
                width: 0%; 
                background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
                transition: width .8s cubic-bezier(.2,.9,.2,1);
            }
            .diagnosis-results .result-card .result-tags {
                display: flex;
                gap: 8px;
                flex-wrap: wrap;
                margin-top: 10px;
            }
            .diagnosis-results .result-card .result-tags .tag {
                background: rgba(0,0,0,0.04);
                color: var(--muted);
                padding: 6px 10px;
                border-radius: 999px;
                font-size: 12px;
                font-weight: 600;
            }
            /* small-screen adjustments for the new layout */
            @media (max-width: 480px) {
                .diagnosis-results .result-card .result-icon { width:48px; height:48px; font-size:18px; }
                .diagnosis-results .result-card .result-score { padding:5px 8px; font-size:0.85rem; }
            }
        /* Dark theme adjustments for diagnosis results */
        body.dark-theme .diagnosis-results {
            gap: 18px;
        }
        body:not(.dark-theme) .diagnosis-results > h3,
        body[data-theme="light"] .diagnosis-results > h3 {
            background: none !important;
            -webkit-background-clip: unset !important;
            background-clip: unset !important;
            -webkit-text-fill-color: initial !important;
            color: var(--text-color) !important;
            text-shadow: 0 1px 0 rgba(255,255,255,0.6), 0 6px 18px rgba(0,0,0,0.04);
        }

        /* Extra explicit fallback for browsers (including Edge) where gradient-clipped
           text may render transparent — use a solid high-contrast color. */
        html body:not(.dark-theme) .diagnosis-results > h3 {
            color: #1f2937 !important; /* visible charcoal */
            -webkit-text-fill-color: inherit !important;
            text-shadow: 0 1px 0 rgba(255,255,255,0.65), 0 6px 18px rgba(0,0,0,0.05) !important;
        }
        body.dark-theme .diagnosis-results > h3 {
            /* ensure heading remains visible & vibrant in dark mode */
            background: linear-gradient(90deg, #7bdff6, #9b8bff);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        body.dark-theme .diagnosis-results .result-card {
            background: linear-gradient(180deg, rgba(8,10,14,0.55), rgba(6,8,12,0.45));
            border: 1px solid rgba(255,255,255,0.04);
            color: var(--text-color);
            box-shadow: 0 10px 30px rgba(0,0,0,0.65);
        }

        body.dark-theme .diagnosis-results .result-card::before {
            /* make accent bar slightly brighter in dark mode */
            background: linear-gradient(90deg, #00f5ff, #4cc9ff, #8a2be2, #ff8a00);
            filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
        }
        body.dark-theme .diagnosis-results .result-card b {
            background: linear-gradient(90deg, #7bdff6, #8aa2ff);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        body.dark-theme .diagnosis-results .result-card p.disclaimer {
            color: #ffb3b3; /* softer warning on dark */
        }
        body.dark-theme .diagnosis-results .result-card a {
            color: #071124; /* darker text on bright button */
            background: linear-gradient(45deg, #60a5fa, #8b5cf6);
            box-shadow: 0 8px 22px rgba(75,85,99,0.18);
        }
        body.dark-theme .diagnosis-results .result-card a:hover {
            transform: translateY(-3px);
            box-shadow: 0 14px 36px rgba(75,85,99,0.25);
            opacity: 1;
        }
        .feature-card {
            background: white;
            padding: 30px;
            border-radius: 10px;
            text-align: center;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        .feature-card i {
            font-size: 40px;
            color: #fff;
            margin-bottom: 20px;
            /* neon icon tile */
            width: 84px;
            height: 84px;
            display: inline-grid;
            place-items: center;
            border-radius: 14px;
            background: linear-gradient(135deg, #00f5ff 0%, #8a2be2 50%, #ff00ff 100%);
            box-shadow: 0 12px 40px rgba(0,245,255,0.12), 0 0 40px rgba(138,43,226,0.06);
            transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
        }
        .feature-card:hover i {
            transform: translateY(-6px) rotate(-6deg) scale(1.06);
            box-shadow: 0 22px 60px rgba(0,245,255,0.18), 0 0 36px rgba(255,0,255,0.08);
            filter: saturate(1.08) brightness(1.08);
        }
        .contact-info-item i {
            font-size: 24px;
            width: 56px;
            height: 56px;
            border-radius: 12px;
            display: inline-grid;
            place-items: center;
            color: #fff;
            background: linear-gradient(135deg, #00f5ff 0%, #8a2be2 60%);
            box-shadow: 0 12px 34px rgba(0,245,255,0.10), 0 0 24px rgba(138,43,226,0.06);
            margin-right: 18px;
            transition: transform .2s ease, box-shadow .2s ease;
        }
        .contact-info-item:hover i {
            transform: translateX(-6px) scale(1.04);
            box-shadow: 0 18px 48px rgba(0,245,255,0.16), 0 0 32px rgba(138,43,226,0.08);
        }
        .social-links a {
            width: 54px;
            height: 54px;
            display: inline-grid;
            place-items: center;
            border-radius: 50%;
            background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.95));
            border: 1px solid rgba(52,152,219,0.12);
            color: var(--primary-color);
            transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
        }
        .social-links a i { font-size: 20px; }
        .social-links a:hover {
            transform: translateY(-6px) scale(1.06);
            background: linear-gradient(135deg, #00f5ff 0%, #8a2be2 60%, #ff00ff 100%);
            color: white;
            box-shadow: 0 20px 56px rgba(0,245,255,0.14), 0 0 36px rgba(255,0,255,0.08);
            border-color: rgba(255,255,255,0.06);
        }
        /* Theme toggle icon refinement */
        .theme-toggle i {
            font-size: 16px;
            display: inline-block;
            width: 22px;
            height: 22px;
            line-height: 22px;
            text-align: center;
            transition: transform .18s ease, color .18s ease;
        }
        .theme-toggle:hover i {
            transform: rotate(18deg) scale(1.08);
            color: #00f5ff;
            text-shadow: 0 4px 18px rgba(0,245,255,0.14);
        }
        .feature-card h3 {
            color: #2c3e50;
            margin-bottom: 15px;
        }
        .feature-card p {
            color: #7f8c8d;
        }
        footer {
            text-align: center;
            padding: 20px;
            margin-top: 60px;
            color: #7f8c8d;
        }
        .about-section {
            background: rgba(255, 255, 255, 0.95);
            padding: 80px 0;
            margin: 80px 0;
            border-radius: 30px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.2);
            position: relative;
            overflow: hidden;
        }
        .about-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, 
                rgba(102, 126, 234, 0.05) 0%,
                rgba(118, 75, 162, 0.05) 100%);
            z-index: 0;
        }
        .about-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 60px;
            align-items: center;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 30px;
            position: relative;
            z-index: 1;
        }
        .about-text h2 {
            font-size: 42px;
            background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            margin-bottom: 30px;
            font-weight: 700;
            animation: fadeInLeft 1s ease;
        }
        .about-text p {
            color: var(--secondary-color);
            line-height: 1.8;
            margin-bottom: 25px;
            font-size: 16px;
            opacity: 0;
            animation: fadeInUp 0.8s ease forwards;
            animation-delay: 0.3s;
        }
        .about-stats {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 25px;
            margin-top: 40px;
        }
        .stat-item {
            text-align: center;
            padding: 30px 20px;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 20px;
            box-shadow: 0 10px 20px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            border: 1px solid rgba(255,255,255,0.3);
            transform: translateY(0);
        }
        .stat-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 30px rgba(0,0,0,0.1);
            background: linear-gradient(135deg, 
                rgba(255,255,255,1) 0%,
                rgba(255,255,255,0.9) 100%);
        }
        .stat-number {
            font-size: 32px;
            font-weight: 700;
            background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            margin-bottom: 10px;
            display: inline-block;
        }
        .stat-label {
            color: var(--secondary-color);
            font-size: 16px;
            font-weight: 500;
            opacity: 0.8;
        }
        @keyframes fadeInLeft {
            from {
                opacity: 0;
                transform: translateX(-30px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        .about-image {
            position: relative;
            padding-bottom: 75%;
            overflow: hidden;
            border-radius: 10px;
        }
        .about-image img {
            position: absolute;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        @media (max-width: 768px) {
            .about-container {
                grid-template-columns: 1fr;
            }   
            .about-image {
                order: -1;
            }
        }
        /* Contact Section Styles */
        .contact-section {
            background: rgba(255, 255, 255, 0.95);
            padding: 80px 0;
            margin: 80px 0;
            border-radius: 30px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.2);
            position: relative;
            overflow: hidden;
        }
        .contact-section::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, 
                rgba(102, 126, 234, 0.05) 0%,
                rgba(118, 75, 162, 0.05) 100%);
            animation: rotateBackground 30s linear infinite;
            z-index: 0;
        }
        @keyframes rotateBackground {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        .contact-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 30px;
            position: relative;
            z-index: 1;
        }
        .contact-header {
            text-align: center;
            margin-bottom: 70px;
            animation: fadeInDown 1s ease;
        }
        .contact-header h2 {
            font-size: 42px;
            background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            margin-bottom: 20px;
            font-weight: 700;
        }
        .contact-header p {
            color: var(--secondary-color);
            font-size: 18px;
            line-height: 1.6;
            max-width: 600px;
            margin: 0 auto;
            opacity: 0.9;
        }
        .contact-content {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 60px;
            animation: fadeInUp 1s ease 0.3s;
            animation-fill-mode: both;
        }
        .contact-info {
            padding: 30px;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 20px;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255,255,255,0.3);
        }
        .contact-info-item {
            display: flex;
            align-items: center;
            margin-bottom: 35px;
            padding: 15px;
            border-radius: 15px;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.5);
        }
        .contact-info-item:hover {
            transform: translateX(10px);
            background: rgba(255, 255, 255, 0.9);
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        }
        .contact-info-item i {
            font-size: 28px;
            background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            margin-right: 20px;
            width: 40px;
            text-align: center;
        }
        .contact-info-item .info {
            color: var(--secondary-color);
        }
        .contact-info-item .info h3 {
            font-size: 20px;
            margin-bottom: 8px;
            font-weight: 600;
        }
        .contact-info-item .info p {
            color: var(--secondary-color);
            line-height: 1.6;
            opacity: 0.8;
            font-size: 15px;
        }
        .contact-form {
            background: rgba(255, 255, 255, 0.7);
            padding: 40px;
            border-radius: 20px;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255,255,255,0.3);
            box-shadow: 0 15px 35px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
        }
        .contact-form:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            background: rgba(255, 255, 255, 0.8);
        }
        .contact-form .form-group {
            margin-bottom: 25px;
            position: relative;
        }
        .contact-form label {
            display: block;
            margin-bottom: 10px;
            color: var(--secondary-color);
            font-weight: 500;
            font-size: 15px;
            transition: all 0.3s ease;
        }
        .contact-form input,
        .contact-form textarea {
            width: 100%;
            padding: 15px;
            border: 2px solid rgba(52, 152, 219, 0.2);
            border-radius: 12px;
            font-size: 16px;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.9);
            color: var(--secondary-color);
        }
        .contact-form input:focus,
        .contact-form textarea:focus {
            border-color: var(--primary-color);
            outline: none;
            box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
            transform: translateY(-2px);
        }
        .contact-form input::placeholder,
        .contact-form textarea::placeholder {
            color: rgba(44, 62, 80, 0.5);
        }
        .contact-form button {
            background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
            color: white;
            border: none;
            padding: 16px 32px;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            position: relative;
            overflow: hidden;
            letter-spacing: 0.5px;
        }
        .contact-form button::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, var(--primary-dark), var(--accent-color));
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .contact-form button:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
        }
        .contact-form button:hover::before {
            opacity: 1;
        }
        .contact-form button span {
            position: relative;
            z-index: 1;
        }
        .social-links {
            display: flex;
            gap: 20px;
            margin-top: 30px;
            justify-content: center;
        }
        .social-links a {
            color: var(--primary-color);
            font-size: 24px;
            transition: all 0.3s ease;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(52, 152, 219, 0.2);
        }
        .social-links a:hover {
            transform: translateY(-5px);
            color: var(--accent-color);
            box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
            border-color: var(--accent-color);
        }
        @media (max-width: 768px) {
            .contact-content {
                grid-template-columns: 1fr;
            }
        }
/* Tablets (max-width: 992px) */
@media (max-width: 992px) {
    /* Make hero text scale */
    .hero h1 {
        font-size: 36px;
        line-height: 1.3;
    }
    .hero p {
        font-size: 18px;
    }
    .symptoms-form, 
    .about-section, 
    .contact-section {
        padding: 20px;
    }/
}
/* Mobile Landscape (max-width: 768px) */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    nav a {
        font-size: 16px;
        display: block;
        padding: 10px;
    }
    /* logo font-size moved to the main 768px responsive block above */
    .hero h1 {
        font-size: 30px;
    }
    .symptoms-form {
        padding: 18px;
    }
    .container {
        width: 100%;
        padding: 0 12px;
    }
    .contact-info {
        flex-direction: column;
        gap: 12px;
    }
}
/* Mobile Portrait (max-width: 480px) */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    header {
        padding: 12px 0;
    }
    .logo-img {
        width: 80px;
        height: 80px;
    }
    /* consolidated small responsive tweak for theme-toggle */
    .theme-toggle { width:40px; height:40px; font-size:16px; }
    .hero h1 {
        font-size: 26px;
    }
    .hero p {
        font-size: 15px;
    }
    input,
    textarea,
    select {
        font-size: 14px;
        padding: 10px;
    }
    .submit-btn {
        width: 100%;
        padding: 14px;
        font-size: 15px;
    }
    .contact-form {
        padding: 15px;
    }
}