/* ======= 2025 Modern Design Reset ======= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Medical Color Palette 2025 */
    --primary-gradient: linear-gradient(135deg, #4a90e2 0%, #7b68ee 100%);
    --secondary-gradient: linear-gradient(135deg, #56c596 0%, #6dd5ed 100%);
    --accent-gradient: linear-gradient(135deg, #64b5f6 0%, #42a5f5 100%);
    --medical-gradient: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    --dark-gradient: linear-gradient(135deg, #2c5282 0%, #2d3748 100%);
    
    /* Medical Colors */
    --medical-blue: #4a90e2;
    --medical-green: #56c596;
    --medical-light-blue: #e3f2fd;
    --medical-light-green: #e8f5e8;
    --medical-white: #fdfdfd;
    --medical-gray: #f8fafc;
    
    /* Text Colors */
    --text-primary: #1a202c;
    --text-secondary: #2d3748;
    --text-light: #1a202c;
    --text-dark: #000000;
    --text-contrast: #ffffff;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.25);
    
    /* Shadows */
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-strong: 0 30px 80px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Typography */
    --font-family: 'BPG Mrgvlovani', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
}

body {
    font-family: var(--font-family);
    background: var(--medical-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ======= Main Container ======= */
.main-container {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ======= Background Elements ======= */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
}

.bg-circle-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -5%;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: -5%;
    animation-delay: 2s;
}

.bg-circle-3 {
    width: 150px;
    height: 150px;
    top: 30%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* ======= Navigation ======= */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--space-4) 0;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-6);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-light);
}

.logo i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: var(--font-size-2xl);
}

.nav-badge {
    background: var(--accent-gradient);
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
    box-shadow: var(--shadow-soft);
}

/* ======= Main Content ======= */
.main-content {
    flex: 1;
    padding-top: 100px;
    padding-bottom: var(--space-20);
}

/* ======= Hero Section ======= */
.hero-section {
    text-align: center;
    padding: var(--space-20) var(--space-6);
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    margin-bottom: var(--space-6);
    line-height: 1.2;
}

.title-gradient {
    display: block;
    font-size: var(--font-size-5xl);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-2);
}

.title-ai {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: 400;
    color: var(--text-dark);
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--text-dark);
    font-weight: 600;
    opacity: 0.9;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.hero-description i {
    color: #f39c12;
    font-size: var(--font-size-xl);
}

/* ======= Systems Section ======= */
.systems-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section-title {
    text-align: center;
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--space-12);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.section-title i {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-16);
}

/* ======= System Cards ======= */
.system-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.system-card:hover::before {
    opacity: 0.1;
}

.system-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(255, 255, 255, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    color: white;
}

.card-primary .card-icon {
    background: var(--primary-gradient);
}

.card-secondary .card-icon {
    background: var(--secondary-gradient);
}

.card-badge {
    background: rgba(26, 32, 44, 0.8);
    color: var(--text-contrast);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.card-content h3 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--space-4);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.card-description {
    font-size: var(--font-size-base);
    color: var(--text-dark);
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: var(--space-6);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.card-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.feature {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-sm);
    color: var(--text-dark);
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.feature i {
    color: #f39c12;
    width: 16px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.btn-text {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-dark);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.card-footer i {
    color: var(--text-dark);
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.system-card:hover .card-footer i {
    transform: translateX(4px);
    opacity: 1;
}

/* ======= Assistant Pages Styles ======= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-6);
    min-height: 100vh;
    background: var(--medical-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    margin-top: var(--space-8);
    margin-bottom: var(--space-8);
}

/* Medical Header */
.medical-header {
    text-align: center;
    padding: var(--space-12) 0 var(--space-8);
    background: var(--medical-light-blue);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-8);
    position: relative;
    overflow: hidden;
}

.medical-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0.1;
    z-index: 1;
}

.medical-header h1 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--medical-blue);
    margin-bottom: var(--space-4);
    position: relative;
    z-index: 2;
}

.medical-header .description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--medical-green);
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-top: var(--space-4);
    box-shadow: var(--shadow-soft);
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    background: var(--medical-light-green);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: var(--shadow-soft);
}

.nav-btn:hover {
    background: var(--medical-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.nav-btn .icon {
    font-size: var(--font-size-xl);
}

/* Record Section */
.record-section {
    text-align: center;
    padding: var(--space-8);
    background: var(--medical-gray);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-8);
    border: 2px dashed var(--medical-blue);
}

.record-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: var(--space-6) var(--space-8);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: 0 auto var(--space-4);
    box-shadow: var(--shadow-medium);
    min-width: 200px;
    justify-content: center;
}

.record-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

.record-btn.recording {
    background: var(--secondary-gradient);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) translateY(-3px); }
    50% { transform: scale(1.05) translateY(-3px); }
}

.record-btn .icon {
    font-size: var(--font-size-2xl);
}

.recording-status {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-top: var(--space-4);
    font-weight: 500;
}

/* Upload Section */
.upload-section {
    background: var(--medical-light-blue);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
    border: 2px solid rgba(74, 144, 226, 0.2);
}

.upload-section h3 {
    font-size: var(--font-size-2xl);
    color: var(--medical-blue);
    margin-bottom: var(--space-6);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}

.upload-controls {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    justify-content: center;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-btn {
    background: var(--medical-green);
    color: white;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    box-shadow: var(--shadow-soft);
}

.file-input-btn:hover {
    background: #4a9b7e;
    transform: translateY(-2px);
}

.btn {
    background: var(--medical-blue);
    color: white;
    border: none;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    box-shadow: var(--shadow-soft);
}

.btn:hover {
    background: #3a7bc8;
    transform: translateY(-2px);
}

.btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

/* File List */
.file-list {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    border-bottom: 1px solid var(--medical-gray);
    cursor: pointer;
    transition: background 0.3s ease;
}

.file-item:hover {
    background: var(--medical-light-green);
}

.file-item:last-child {
    border-bottom: none;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.file-meta {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* File Details */
.file-details {
    display: flex;
    gap: var(--space-4);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

.file-details span {
    background: var(--medical-light-blue);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.process-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: var(--font-size-sm);
    box-shadow: var(--shadow-soft);
}

.process-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.no-files {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: var(--space-6);
    background: var(--medical-light-blue);
    border-radius: var(--radius-lg);
}

/* Results Container */
.results-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.results-container.full-width {
    width: 100%;
}

.result-box h2 {
    font-size: var(--font-size-2xl);
    color: var(--medical-blue);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--medical-light-blue);
}

.text-content {
    background: var(--medical-gray);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    min-height: 150px;
    font-size: var(--font-size-base);
    line-height: 1.8;
    color: var(--text-primary);
    border: 1px solid rgba(74, 144, 226, 0.1);
}

/* Conversation Text Styles */
.conversation-text {
    background: var(--medical-white);
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.utterance {
    margin-bottom: var(--space-6);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--medical-blue);
    background: var(--medical-light-blue);
    transition: all 0.3s ease;
}

.utterance:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-soft);
}

.speaker-a {
    border-left-color: var(--medical-blue);
    background: var(--medical-light-blue);
}

.speaker-b {
    border-left-color: var(--medical-green);
    background: var(--medical-light-green);
}

.speaker-c {
    border-left-color: #f39c12;
    background: #fef9e7;
}

.speaker-same {
    margin-top: -var(--space-2);
}

.speaker-label {
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.timestamp {
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    font-weight: normal;
    margin-left: var(--space-2);
    background: rgba(255, 255, 255, 0.7);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.utterance-text {
    line-height: 1.6;
    color: var(--text-primary);
}

/* Error States */
.error {
    background: #fee;
    color: #c53030;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid #feb2b2;
    margin: var(--space-4) 0;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    color: var(--text-secondary);
    font-style: italic;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--medical-light-blue);
    border-top: 2px solid var(--medical-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design for Assistant Pages */
@media (max-width: 768px) {
    .container {
        margin: var(--space-4);
        padding: var(--space-4);
    }
    
    .medical-header {
        padding: var(--space-8) var(--space-4) var(--space-6);
    }
    
    .medical-header h1 {
        font-size: var(--font-size-3xl);
    }
    
    .nav-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .upload-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .record-btn {
        min-width: 250px;
        padding: var(--space-5) var(--space-6);
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }
    
    .utterance {
        padding: var(--space-4);
    }
}

@media (max-width: 480px) {
    .medical-header h1 {
        font-size: var(--font-size-2xl);
    }
    
    .upload-section,
    .record-section,
    .results-container {
        padding: var(--space-4);
    }
}

/* Drag and Drop Effects */
.upload-area {
    border: 2px dashed var(--medical-blue);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    transition: all 0.3s ease;
    background: var(--medical-light-blue);
}

.upload-area.dragover {
    border-color: var(--medical-green);
    background: var(--medical-light-green);
    transform: scale(1.02);
}
