:root {
    /* Professional Medical Palette */
    --primary: #db2777;      /* Deep Pink */
    --primary-hover: #be185d;
    --secondary: #fce7f3;    /* Light Pink */
    --accent: #831843;       /* Dark Text */
    --success: #10b981;      /* Green for high confidence */
    --bg-gradient: linear-gradient(135deg, #fdf2f8 0%, #fbcfe8 100%);
    --surface: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 10px 30px -10px rgba(219, 39, 119, 0.2);
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-gradient);
    color: #1f2937;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 850px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px); /* Glass effect */
}

/* HEADER */
h1 {
    margin: 0;
    color: var(--accent);
    font-size: 2rem;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #6b7280;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* TABS NAVIGATION */
.tabs {
    display: flex;
    background: #f3f4f6;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 2rem;
    gap: 5px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* FORM LAYOUT */
.form-section {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 650px) {
    .form-grid { grid-template-columns: 1fr; }
}

.input-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
}

/* INPUT FIELDS */
input[type="number"], select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background-color: #f9fafb;
    transition: all 0.2s;
    box-sizing: border-box;
}

input[type="number"]:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 3px var(--secondary);
}

/* CUSTOM FILE UPLOAD */
input[type="file"] {
    width: 100%;
    padding: 10px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.preview-area {
    width: 100%;
    height: 220px;
    background-color: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: border-color 0.2s;
}

.preview-area:hover {
    border-color: var(--primary);
    background-color: #fff1f2;
}

.preview-area img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.preview-area span {
    color: #9ca3af;
    font-size: 0.9rem;
    pointer-events: none;
}

/* ACTION BUTTON */
button[type="submit"] {
    background: linear-gradient(135deg, var(--primary) 0%, #9d174d 100%);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(219, 39, 119, 0.3);
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(219, 39, 119, 0.4);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* RESULTS BOX */
#result {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    display: none;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.success {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #064e3b;
}

.error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.success h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #065f46;
}

/* PROGRESS BAR */
.confidence-bar {
    height: 10px;
    background: rgba(0,0,0,0.1);
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: #10b981; /* Green for success */
    width: 0%;
    border-radius: 5px;
    transition: width 1s ease-in-out;
}
