@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-main: #FFFFFF;
    --bg-surface: #FAFAFA;
    --bg-card: #FFFFFF;
    --border-card: #E5E7EB;
    --text-heading: #252B42;
    --text-body: #737373;
    --text-muted: #9CA3AF;
    
    /* Coral / Red-Orange Medical Recov Reference Palette */
    --accent-coral: #FF6B6B;
    --accent-coral-hover: #EE5253;
    --accent-coral-light: #FFF0F0;
    --accent-navy: #252B42;
    --accent-teal: #0D9488;
    --accent-cyan: #0284C7;
    --accent-purple: #8B5CF6;
    --accent-mint: #E8F7F2;
    --accent-lavender: #EDE9FE;
    --accent-pink: #FFE4E6;
}

.dark {
    --bg-main: #0B0F19;
    --bg-surface: #111827;
    --bg-card: #151D2E;
    --border-card: #1F2937;
    --text-heading: #F9FAFB;
    --text-body: #9CA3AF;
    --text-muted: #6B7280;
    
    --accent-coral: #FF6B6B;
    --accent-coral-hover: #FF7675;
    --accent-coral-light: rgba(255, 107, 107, 0.15);
    --accent-navy: #F9FAFB;
    --accent-mint: #064E3B;
    --accent-lavender: #3B0764;
    --accent-pink: #831843;
}

body {
    background-color: var(--bg-main);
    color: var(--text-body);
    font-family: 'Montserrat', 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-heading);
}

/* Persian Localization Typography */
.font-vazir {
    font-family: 'Vazirmatn', 'Montserrat', system-ui, sans-serif !important;
}

[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .ltr-force {
    direction: ltr !important;
    text-align: left !important;
}

/* Clean Medical Reference Cards */
.ref-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 1rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ref-card:hover {
    box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
    border-color: #D1D5DB;
}

.dark .ref-card:hover {
    border-color: #374151;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Coral Brand Buttons */
.btn-coral {
    background-color: #FF6B6B;
    color: #FFFFFF;
    font-weight: 700;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(255, 107, 107, 0.35);
}

.btn-coral:hover {
    background-color: #EE5253;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.45);
    transform: translateY(-1px);
}

.btn-outline-coral {
    background-color: transparent;
    color: #FF6B6B;
    border: 1.5px solid #FF6B6B;
    font-weight: 700;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-outline-coral:hover {
    background-color: #FF6B6B;
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(255, 107, 107, 0.3);
}

/* Icon Badges (Solid Coral Circle with White Icon) */
.icon-badge-coral {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    background-color: #FF6B6B;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    box-shadow: 0 8px 18px rgba(255, 107, 107, 0.3);
}

/* Floating Tech Stack Vertical Pill */
.floating-tech-pill {
    background: #FFFFFF;
    border-radius: 9999px;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.06);
    padding: 0.75rem 0.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    border: 1px solid rgba(229, 231, 235, 0.8);
    backdrop-filter: blur(8px);
}

.dark .floating-tech-pill {
    background: #1E293B;
    border-color: #334155;
    box-shadow: 0 15px 40px -5px rgba(0, 0, 0, 0.6);
}

/* Hero Doctor Backdrop Blob */
.hero-image-wrapper {
    position: relative;
    border-radius: 2rem;
}

.hero-mint-backdrop {
    position: absolute;
    inset: -12px -12px 10px 10px;
    background: linear-gradient(135deg, #E6FAF4 0%, #D8F3EB 60%, #C4ECE0 100%);
    border-radius: 2.25rem;
    z-index: 0;
}

.dark .hero-mint-backdrop {
    background: linear-gradient(135deg, #064E3B 0%, #042F2E 100%);
    opacity: 0.7;
}

.hero-purple-orb {
    position: absolute;
    width: 220px;
    height: 220px;
    background: linear-gradient(135deg, #8B5CF6 0%, #C084FC 100%);
    border-radius: 50%;
    top: 25%;
    left: -15%;
    z-index: 1;
    opacity: 0.85;
    filter: blur(1px);
}

.hero-ring-decoration {
    position: absolute;
    width: 48px;
    height: 48px;
    border: 3px solid #8B5CF6;
    border-radius: 50%;
    top: 15%;
    left: -5%;
    z-index: 3;
    pointer-events: none;
}

/* Modern Range Slider */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    background: #E5E7EB;
    height: 6px;
    border-radius: 9999px;
    outline: none;
    cursor: pointer;
}

.dark input[type=range] {
    background: #374151;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FF6B6B;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
    border: 2px solid #FFFFFF;
    transition: transform 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4B5563;
}

/* Radiograph Viewport Canvas & Viewer */
.radiograph-viewport {
    position: relative;
    background: #090D16;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    touch-action: none;
}

.radiograph-canvas {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transition: filter 0.2s ease;
}

/* DICOM Windowing Presets */
.lut-standard {
    filter: brightness(1) contrast(1.05) grayscale(1);
}

.lut-lung {
    filter: brightness(1.2) contrast(1.4) grayscale(1);
}

.lut-mediastinum {
    filter: brightness(0.85) contrast(1.6) grayscale(1);
}

.lut-bone {
    filter: brightness(1.15) contrast(2.2) grayscale(1);
}

.lut-invert {
    filter: invert(1) brightness(1.05) contrast(1.1) grayscale(1);
}

/* Scan Line Animation */
@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(1000%);
    }
}

.scanner-beam {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.8), rgba(255, 90, 95, 1), rgba(255, 107, 107, 0.8), transparent);
    box-shadow: 0 0 15px 3px rgba(255, 107, 107, 0.6);
    pointer-events: none;
    animation: scanline 2.8s linear infinite;
}

/* Pulse animation for emergency badges */
@keyframes emergency-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 107, 107, 0);
    }
}

.emergency-tag {
    animation: emergency-pulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Glass Pill Buttons */
.glass-pill {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.dark .glass-pill {
    background: rgba(21, 29, 46, 0.85);
    border: 1px solid rgba(31, 41, 55, 0.8);
}

/* Team Card Backdrop Colors */
.bg-team-coral {
    background-color: #FF7675;
}
.bg-team-mint {
    background-color: #55E6C1;
}
.bg-team-lavender {
    background-color: #A29BFE;
}
.bg-team-cyan {
    background-color: #74B9FF;
}

/* Print Radiology Report Formatting */
@media print {
    body {
        background: #FFFFFF !important;
        color: #000000 !important;
    }
    header, footer, .no-print, button, input, #heroSection, #teamSection {
        display: none !important;
    }
    #reportModal {
        position: static !important;
        background: transparent !important;
        padding: 0 !important;
        display: block !important;
    }
    .ref-card {
        border: 1px solid #CCCCCC !important;
        box-shadow: none !important;
    }
}
