/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #64748b;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-lighter: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-lighter);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== HEADER & NAVIGATION ==================== */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-text h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 400;
    margin: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.about-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    border: 2px solid rgba(79, 70, 229, 0.2);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.about-toggle:hover {
    background: rgba(79, 70, 229, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.about-toggle svg {
    width: 20px;
    height: 20px;
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 34px;
    transition: 0.4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.toggle-icon {
    font-size: 16px;
    transition: opacity 0.3s;
    z-index: 1;
}

.toggle-icon.sun {
    opacity: 1;
}

.toggle-icon.moon {
    opacity: 0.3;
}

.theme-toggle input:checked + .toggle-slider .sun {
    opacity: 0.3;
}

.theme-toggle input:checked + .toggle-slider .moon {
    opacity: 1;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle input:checked + .toggle-slider::before {
    transform: translateX(28px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 40px 24px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #94a3b8;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

.modal-body {
    padding: 40px;
}

.model-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.info-card {
    background: linear-gradient(to bottom right, #f8fafc, #f1f5f9);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.3);
}

.info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.info-card p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.model-description h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.model-description p {
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.disclaimer-box {
    background: rgba(251, 191, 36, 0.1);
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 24px;
}

.disclaimer-box strong {
    color: #f59e0b;
    font-size: 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    background: linear-gradient(to bottom right, #f8fafc, #f1f5f9);
    padding: 28px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.3);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Steps Container */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.step-item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.step-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.step-content p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

/* Documentation Sections */
.doc-section {
    margin-bottom: 32px;
}

.doc-section h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.doc-section ul {
    list-style: none;
    padding-left: 0;
}

.doc-section ul li {
    padding: 8px 0 8px 28px;
    position: relative;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.doc-section ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.doc-section code {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9375rem;
}

/* Support Sections */
.support-section {
    margin-bottom: 32px;
}

.support-section h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.support-section ul {
    list-style: none;
    padding-left: 0;
}

.support-section ul li {
    padding: 8px 0;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.support-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.support-section a:hover {
    text-decoration: underline;
}

.faq-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary-color);
}

.faq-item strong {
    display: block;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 8px;
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
}

/* Dark Theme */
body.dark-theme {
    --bg-color: #0f172a;
    --text-dark: #e2e8f0;
    --text-muted: #94a3b8;
    --card-bg: #1e293b;
}

body.dark-theme {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

body.dark-theme .header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

body.dark-theme .card {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.2);
}

body.dark-theme .form-section {
    background: linear-gradient(to bottom right, #1e293b, #0f172a);
    border-color: rgba(148, 163, 184, 0.2);
}

body.dark-theme .input-group input {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

body.dark-theme .tabs {
    background: #1e293b;
}

body.dark-theme .modal-content {
    background: #1e293b;
}

body.dark-theme .modal-header {
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

body.dark-theme .info-card {
    background: linear-gradient(to bottom right, #0f172a, #1e293b);
    border-color: rgba(148, 163, 184, 0.2);
}

body.dark-theme .feature-card {
    background: linear-gradient(to bottom right, #0f172a, #1e293b);
    border-color: rgba(148, 163, 184, 0.2);
}

body.dark-theme .faq-item {
    background: #0f172a;
    border-left-color: var(--primary-color);
}

body.dark-theme .doc-section code {
    background: rgba(79, 70, 229, 0.2);
}

.nav-link {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.cta-button {
    background: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 24px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.8;
    font-weight: 400;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.hero-stat {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.hero-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.hero-stat-label {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ==================== MAIN CONTAINER ==================== */
.main-container {
    padding: 60px 0;
}

/* ==================== TABS ==================== */
.tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-button {
    flex: 1;
    padding: 16px 32px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 40%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.tab-button:hover {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.tab-button.active {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.1);
}

.tab-button.active::after {
    transform: translateX(-50%) scaleX(1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== CARD ==================== */
.card {
    background: white;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card h2 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 1.875rem;
    font-weight: 700;
}

.form-description {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.0625rem;
    line-height: 1.6;
}


/* ==================== FORM SECTIONS ==================== */
.form-sections {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-section {
    background: linear-gradient(to bottom right, #f8fafc, #f1f5f9);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
}

.form-section h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    margin-bottom: 24px;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 2px;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.input-group:focus-within label {
    color: var(--primary-color);
}

.input-group input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.input-group input:hover {
    border-color: #cbd5e1;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-group input::placeholder {
    color: #94a3b8;
}

/* ==================== BUTTONS ==================== */
.button-group {
    display: flex;
    gap: 16px;
    margin-top: 40px;
}

.btn {
    flex: 1;
    padding: 16px 32px;
    border: none;
    border-radius: 10px;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: #334155;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* ==================== LOADING SPINNER ==================== */
.loading {
    text-align: center;
    padding: 60px;
}

.spinner {
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
}

/* ==================== RESULT DISPLAY ==================== */
.result {
    margin-top: 40px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-benign {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid var(--secondary-color);
}

.result-malignant {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid var(--danger-color);
}

.result-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid var(--danger-color);
}

.result h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-diagnosis, .result-confidence {
    font-size: 1.125rem;
    margin: 20px 0;
    font-weight: 500;
}

.probability-bars {
    margin: 32px 0;
}

.probability-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.probability-item > span:first-child {
    font-weight: 600;
    min-width: 120px;
    font-size: 1rem;
}

.progress-bar {
    flex: 1;
    height: 32px;
    background: #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-fill {
    height: 100%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.progress-fill.benign {
    background: linear-gradient(90deg, var(--secondary-color) 0%, #34d399 100%);
}

.progress-fill.malignant {
    background: linear-gradient(90deg, var(--danger-color) 0%, #f87171 100%);
}

.risk-level {
    margin-top: 28px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    font-size: 1.0625rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.result-footer {
    margin-top: 28px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9375rem;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ==================== UPLOAD SECTION ==================== */
.upload-section {
    margin-top: 32px;
}

.upload-area {
    border: 3px dashed #cbd5e1;
    border-radius: 16px;
    padding: 80px 40px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.upload-area:hover, .upload-area.drag-over {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.15);
}

.upload-icon {
    font-size: 4.5rem;
    margin-bottom: 24px;
    color: var(--primary-color);
}

.upload-area h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.upload-area p {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 1rem;
}

.file-info {
    margin: 24px 0;
    padding: 24px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#uploadBtn {
    margin-top: 24px;
    width: 100%;
}

/* ==================== BATCH RESULTS ==================== */
.batch-result {
    margin-top: 40px;
}

.batch-summary {
    background: white;
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.batch-summary h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 28px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.summary-item {
    padding: 20px;
    background: linear-gradient(to bottom right, #f8fafc, #f1f5f9);
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.summary-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.summary-item.benign-bg {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: var(--secondary-color);
}

.summary-item.malignant-bg {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: var(--danger-color);
}

.summary-label {
    display: block;
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.summary-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.results-table-container {
    overflow-x: auto;
    margin: 32px 0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.results-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    color: white;
}

.results-table th, .results-table td {
    padding: 18px 20px;
    text-align: left;
}

.results-table th {
    font-weight: 600;
    font-size: 0.9375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-table td {
    font-size: 1rem;
}

.results-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s ease;
}

.results-table tbody tr:last-child {
    border-bottom: none;
}

.results-table tbody tr:hover {
    background: #f8fafc;
}

.row-benign {
    background: rgba(209, 250, 229, 0.3);
}

.row-benign:hover {
    background: rgba(209, 250, 229, 0.5) !important;
}

.row-malignant {
    background: rgba(254, 226, 226, 0.3);
}

.row-malignant:hover {
    background: rgba(254, 226, 226, 0.5) !important;
}

.batch-footer {
    text-align: center;
    margin-top: 28px;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* ==================== FOOTER ==================== */
.footer {
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    color: #cbd5e1;
    padding: 60px 0 24px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 60px;
    margin-bottom: 48px;
    align-items: start;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo span {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.footer-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #94a3b8;
}

.footer-links-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
}

.footer-disclaimer {
    display: flex;
    gap: 12px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.footer-disclaimer svg {
    flex-shrink: 0;
    color: #fbbf24;
    margin-top: 2px;
}

.footer-disclaimer p {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.footer-copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copyright p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.footer-tech {
    display: flex;
    align-items: center;
    gap: 4px;
}

.heart {
    color: #ef4444;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20% { transform: scale(0.9); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 16px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .card {
        padding: 24px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-links-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-copyright {
        flex-direction: column;
        text-align: center;
    }
}


/* ==================== QUICK TEST SECTION ==================== */
.quick-options {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.sample-section {
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.sample-section h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.info-text {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.sample-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.sample-card {
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.sample-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.sample-card.warning {
    border-color: #fed7aa;
    background: #fffbeb;
}

.sample-card.warning:hover {
    border-color: var(--warning-color);
}

.sample-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.sample-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.sample-desc {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 8px;
}

.sample-confidence {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 5px;
}

.quick-form-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 30px;
    border-radius: 12px;
    border: 3px solid var(--warning-color);
}

.quick-form-section h3 {
    color: #92400e;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.quick-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.input-group.highlight {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #fbbf24;
}

.input-group.highlight label {
    color: #92400e;
    font-size: 0.95rem;
}

.required {
    color: var(--danger-color);
    font-weight: 700;
    margin-right: 3px;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    margin-left: 5px;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    background-color: #334155;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -110px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    font-weight: 400;
    box-shadow: var(--shadow-lg);
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #334155 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.info-box {
    background: #dbeafe;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #1e40af;
    font-size: 0.95rem;
}

.info-box strong {
    color: #1e3a8a;
}

/* ==================== RESPONSIVE FOR QUICK TEST ==================== */
@media (max-width: 768px) {
    .sample-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-input-grid {
        grid-template-columns: 1fr;
    }
    
    .tooltip .tooltiptext {
        width: 180px;
        margin-left: -90px;
    }
}

/* ==================== PATIENT SEARCH SECTION ==================== */
.patient-search-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 25px;
}

.patient-search-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.patient-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.patient-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-search {
    padding: 15px 35px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.4);
}

/* Demo Patient IDs */
.demo-ids {
    margin-top: 15px;
}

.demo-ids p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 600;
}

.demo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.demo-chip {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.demo-chip:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.5);
}

/* Divider */
.divider {
    text-align: center;
    margin: 35px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #cbd5e1, transparent);
}

.divider span {
    background: #f8fafc;
    padding: 0 25px;
    color: #94a3b8;
    font-weight: 700;
    font-size: 14px;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

/* File Upload Section */
.file-upload-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 25px;
}

.file-upload-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-zone {
    border: 3px dashed #a5b4fc;
    border-radius: 15px;
    padding: 50px 40px;
    text-align: center;
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.03) 0%, rgba(37, 117, 252, 0.03) 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.08) 0%, rgba(37, 117, 252, 0.08) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
}

.upload-zone input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-zone .upload-icon {
    font-size: 56px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.upload-zone p {
    margin: 8px 0;
    font-size: 16px;
    color: #475569;
}

.upload-zone p:first-of-type {
    font-weight: 600;
    font-size: 18px;
    color: var(--primary-color);
}

.file-info-box {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 12px;
    border: 2px solid #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.file-info-box p {
    margin: 8px 0;
    color: #1e40af;
    font-weight: 500;
}

.file-info-box strong {
    color: #1e3a8a;
}

/* Template Section */
.template-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.template-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.template-section p {
    color: #64748b;
    margin-bottom: 25px;
    font-size: 15px;
}

.btn-outline {
    padding: 14px 35px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

/* Patient Info Display */
.patient-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.patient-info h3 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 1.3rem;
    font-weight: 700;
}

.patient-info p {
    margin: 10px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.patient-info strong {
    min-width: 80px;
    display: inline-block;
}

/* Loading and Results for Upload Tab */
#uploadLoading, #uploadResult {
    margin-top: 30px;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }
    
    .btn-search {
        width: 100%;
    }
    
    .demo-chips {
        justify-content: center;
    }
    
    .patient-search-section,
    .file-upload-section,
    .template-section {
        padding: 20px;
    }
    
    .upload-zone {
        padding: 35px 25px;
    }
}

