:root {
    --background: #f4f8fb;
    --white: #ffffff;
    --navy: #102a43;
    --navy-light: #183f5d;
    --teal: #119b91;
    --teal-dark: #087d76;
    --cyan: #55c6d1;
    --text: #243b53;
    --muted: #8295a7;
    --border: #e3edf2;
    --soft-teal: #e7f6f4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.8;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select {
    font-family: inherit;
}

/* Header */

.header {
    background: var(--white);
    padding: 15px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--navy);
    font-size: 23px;
    font-weight: 800;
}

.logo-icon {
    background: var(--teal);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
}

.logo-highlight {
    color: var(--teal);
}

.header nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header nav a {
    font-size: 13px;
    color: var(--muted);
    transition: 0.3s;
}

.header nav a:hover {
    color: var(--teal);
}

.header-label {
    background: var(--soft-teal);
    color: var(--teal-dark);
    padding: 7px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
}

/* Hero */

.hero {
    min-height: 490px;
    padding: 75px 9%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    background: linear-gradient(120deg, #102a43, #164e63);
    color: white;
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    left: -100px;
    top: -150px;
}

.hero-content {
    max-width: 580px;
    position: relative;
    z-index: 2;
}

.hero-tag,
.section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--cyan);
    margin-bottom: 17px;
}

.hero h1 {
    font-size: 39px;
    line-height: 1.6;
    font-weight: 800;
    margin-bottom: 15px;
}

.hero h1 span {
    display: block;
    color: #55d6c4;
}

.hero-content > p {
    color: #d1e0e8;
    font-size: 14px;
    line-height: 2.1;
    margin-bottom: 28px;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--teal);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: 0.3s;
}

.hero-button:hover {
    background: #20b5a6;
    transform: translateY(-3px);
}

/* Hero Visual */

.hero-visual {
    width: 290px;
    height: 290px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.medical-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(12px);
    border-radius: 22px;
    width: 220px;
    padding: 28px 23px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.medical-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    background: var(--teal);
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    font-weight: 800;
}

.medical-card h3 {
    font-size: 17px;
    margin-bottom: 3px;
}

.medical-card p {
    font-size: 10px;
    color: #c9e1e8;
}

.visual-line {
    height: 6px;
    background: rgba(255,255,255,0.18);
    border-radius: 10px;
    margin-top: 13px;
}

.visual-line.short {
    width: 60%;
}

.visual-line.medium {
    width: 80%;
}

.floating-icon {
    position: absolute;
    top: 12px;
    right: 0;
    width: 55px;
    height: 55px;
    background: white;
    color: var(--teal);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.floating-icon.second {
    top: auto;
    right: auto;
    bottom: 15px;
    left: 0;
}

/* General Sections */

.analyzer-section,
.results-section,
.features-section,
.about-section {
    padding: 75px 9%;
}

.section-heading {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 38px;
}

.section-heading .section-tag {
    color: var(--teal);
}

.section-heading h2 {
    color: var(--navy);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-heading p {
    color: var(--muted);
    font-size: 13px;
}

/* Analyzer */

.analyzer-card {
    max-width: 780px;
    margin: auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 35px;
    box-shadow: 0 12px 35px rgba(16,42,67,0.06);
}

.upload-area {
    border: 2px dashed #b8d9d8;
    border-radius: 18px;
    padding: 42px 20px;
    text-align: center;
    background: #f8fcfc;
    transition: 0.3s;
}

.upload-area:hover {
    border-color: var(--teal);
    background: #f0fbf9;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-area h3 {
    color: var(--navy);
    font-size: 18px;
    margin-bottom: 5px;
}

.upload-area p {
    color: var(--muted);
    font-size: 12px;
}

.upload-button {
    display: inline-block;
    margin-top: 18px;
    background: var(--teal);
    color: white;
    padding: 11px 23px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.upload-button:hover {
    background: var(--teal-dark);
}

.upload-area .file-note {
    margin-top: 13px;
    font-size: 10px;
}

/* File Details */

.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--soft-teal);
    padding: 17px;
    border-radius: 13px;
    margin-top: 20px;
}

.file-details[hidden],
.results-section[hidden] {
    display: none !important;
}

.file-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 23px;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-info h4 {
    font-size: 13px;
    color: var(--navy);
    overflow-wrap: anywhere;
}

.file-info p {
    color: var(--muted);
    font-size: 11px;
}

.remove-button {
    background: #fff0f0;
    color: #dc5555;
    padding: 7px 13px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Analysis Options */

.analysis-options {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.analysis-options label {
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
}

.analysis-options select {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text);
    border-radius: 10px;
    outline: none;
    font-size: 13px;
}

.analysis-options select:focus {
    border-color: var(--teal);
}

/* Analyze Button */

.analyze-button {
    width: 100%;
    margin-top: 23px;
    background: linear-gradient(120deg, var(--teal), #20b5a6);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.analyze-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(17,155,145,0.2);
}

.analyze-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status-message {
    text-align: center;
    margin-top: 15px;
    color: var(--muted);
    font-size: 12px;
}

/* Results */

.results-section {
    padding-top: 10px;
}

.results-card {
    max-width: 900px;
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(16,42,67,0.05);
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--border);
}

.result-header h3 {
    color: var(--navy);
    font-size: 17px;
}

.copy-button {
    background: var(--soft-teal);
    color: var(--teal-dark);
    border: none;
    padding: 9px 15px;
    border-radius: 9px;
    font-size: 11px;
    cursor: pointer;
}

.results-content {
    color: var(--text);
    font-size: 13px;
    line-height: 2.1;
    padding-top: 20px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Features */

.features-section {
    background: #edf5f7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.feature-card {
    background: white;
    padding: 28px 23px;
    border-radius: 17px;
    border: 1px solid var(--border);
    text-align: center;
    transition: 0.3s;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(16,42,67,0.07);
}

.feature-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: var(--soft-teal);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 29px;
    margin: 0 auto 16px;
}

.feature-card h3 {
    color: var(--navy);
    font-size: 16px;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--muted);
    font-size: 12px;
    line-height: 2;
}

/* About */

.about-section {
    text-align: center;
    background: white;
}

.about-section > p {
    max-width: 780px;
    margin: 0 auto 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 2.2;
}

.about-section .disclaimer {
    background: #fff8e8;
    color: #98732b;
    padding: 17px 22px;
    border-radius: 12px;
    font-size: 12px;
    border-right: 4px solid #e8bd59;
}

/* Footer */

footer {
    background: var(--navy);
    color: #b9cad5;
    text-align: center;
    padding: 25px 15px;
    font-size: 12px;
}

footer p + p {
    margin-top: 5px;
    color: #7f9aaa;
}

/* Responsive */

@media (max-width: 900px) {
    .hero {
        padding: 65px 6%;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-visual {
        transform: scale(0.85);
    }

    .analyzer-section,
    .results-section,
    .features-section,
    .about-section {
        padding-left: 6%;
        padding-right: 6%;
    }
}

@media (max-width: 650px) {
    .header {
        padding: 13px 5%;
        flex-wrap: wrap;
    }

    .logo {
        font-size: 20px;
    }

    .header nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 20px;
    }

    .header nav a {
        font-size: 12px;
    }

    .header-label {
        font-size: 9px;
    }

    .hero {
        min-height: auto;
        flex-direction: column;
        text-align: center;
        padding: 55px 7% 45px;
        gap: 25px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero-content > p {
        font-size: 12px;
    }

    .hero-visual {
        width: 240px;
        height: 230px;
        transform: scale(0.85);
        margin-top: -10px;
    }

    .analyzer-section,
    .results-section,
    .features-section,
    .about-section {
        padding: 55px 5%;
    }

    .section-heading {
        margin-bottom: 28px;
    }

    .section-heading h2 {
        font-size: 23px;
    }

    .analyzer-card {
        padding: 20px;
    }

    .upload-area {
        padding: 30px 12px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .results-card {
        padding: 20px;
    }
}

@media (max-width: 380px) {
    .header nav {
        gap: 12px;
    }

    .header nav a {
        font-size: 11px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .file-details {
        flex-wrap: wrap;
    }
}