/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3691c1;
    --primary-color-end: #80c68c;
    --primary-gradient: linear-gradient(135deg, #3691c1, #80c68c);
    --primary-dark: #09a6a8;
    --secondary-color: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --white: #ffffff;
    --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);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    
    /* Background colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --card-bg: #ffffff;
    
    /* Chat specific colors */
    --chat-bg: #f8fafc;
    --message-bg: #ffffff;
}

/* Dark mode variables */
[data-theme="dark"] {
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --white: #1e293b;
    --secondary-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    
    /* Background colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --card-bg: #1e293b;
    
    /* Chat specific colors */
    --chat-bg: #1e293b;
    --message-bg: #334155;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    background: var(--bg-primary);
    border-bottom: 2px solid transparent;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-gradient) border-box;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.nav-logo {
    height: 46px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Dark Mode Toggle */
.theme-toggle {
    background: none;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-gradient) border-box;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 4rem 0;
    transition: background 0.3s ease;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-features {
    display: flex;
    gap: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.feature-item i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Card */
.form-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid transparent;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-gradient) border-box;
    transition: background-color 0.3s ease;
}

.form-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-gradient) border-box;
    font-size: 1rem;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.input-group input:focus {
    outline: none;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-gradient) border-box;
    box-shadow: 0 0 0 3px rgba(54, 145, 193, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2b7ca3, #6bb87a);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-primary);
    border: 1px solid transparent;
    background: linear-gradient(var(--secondary-color), var(--secondary-color)) padding-box, var(--primary-gradient) border-box;
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* ICD Results */
.icd-results {
    display: grid;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.icd-card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.icd-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: calc(var(--radius-lg) + 2px);
    z-index: -1;
}

.icd-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.icd-card.selected {
    background: var(--primary-gradient);
    box-shadow: var(--shadow-md);
    border: none;
}

.icd-card.selected .icd-name {
    color: var(--white);
}

.icd-card.selected .icd-description {
    color: var(--white);
    opacity: 0.9;
}

.icd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.icd-code {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.icd-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.icd-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Zip Form */
.zip-form-container {
    max-width: 400px;
    margin: 0 auto;
}

.validation-message {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.validation-message.success {
    color: var(--success-color);
}

.validation-message.error {
    color: var(--error-color);
}

/* Cost Results */
.cost-results {
    max-width: 900px;
    margin: 0 auto;
}

.selected-diagnosis {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    transition: background-color 0.3s ease;
    position: relative;
}

.selected-diagnosis::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: calc(var(--radius-lg) + 2px);
    z-index: -1;
}

.diagnosis-code {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.cost-categories {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.category-card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: background-color 0.3s ease;
    position: relative;
}

.category-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: calc(var(--radius-lg) + 2px);
    z-index: -1;
}

.category-header {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    position: relative;
}

.cost-row:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--primary-gradient);
}

.cost-row:last-child {
    border-bottom: none;
}

.cost-label {
    font-weight: 500;
}

.cost-value {
    font-weight: 600;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cost-summary {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.summary-item h4 {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.summary-item .amount {
    font-size: 1.25rem;
    font-weight: 700;
}

/* About Section */
.about-section {
    background: var(--secondary-color);
    padding: 4rem 0;
}

.about-content {
    text-align: center;
}

.about-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 3rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: var(--primary-gradient);
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--primary-gradient);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

/* Chatbot Styles */
.chatbot-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid transparent;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-gradient) border-box;
    transition: background-color 0.3s ease;
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 2rem;
    background: var(--chat-bg);
    transition: background-color 0.3s ease;
}

.welcome-message {
    margin-bottom: 1rem;
}

.bot-message, .user-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.125rem;
}

.bot-message .message-avatar {
    background: var(--primary-gradient);
    color: var(--white);
}

.user-message .message-avatar {
    background: var(--text-secondary);
    color: var(--white);
}

.message-content {
    flex: 1;
    background: var(--message-bg);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.user-message .message-content {
    background: var(--primary-gradient);
    color: var(--white);
}

.message-content p {
    margin: 0;
    line-height: 1.4;
    font-size: 0.875rem;
}

.message-content div {
    margin: 0;
    line-height: 1.4;
    font-size: 0.875rem;
}

/* Markdown formatting in chatbot messages */
.message-content strong {
    font-weight: 600;
    color: inherit;
}

.message-content em {
    font-style: italic;
    color: inherit;
}

.message-content code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

[data-theme="dark"] .message-content code {
    background: rgba(255, 255, 255, 0.1);
}

.message-content ul {
    margin: 0.5rem 0;
    padding-left: 1rem;
}

.message-content li {
    margin: 0.25rem 0;
    list-style-type: disc;
}

/* Chatbot typing indicator */
.chatbot-loading {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.typing-indicator {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    padding: 0.5rem 0;
}

.typing-indicator span {
    height: 0.5rem;
    width: 0.5rem;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    30% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.message-time {
    display: block;
    margin-top: 0.5rem;
    opacity: 0.7;
    font-size: 0.625rem;
}

.chat-input-container {
    padding: 1.5rem 2rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chat-input-wrapper input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-gradient) border-box;
    font-size: 1rem;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.chat-input-wrapper input:focus {
    outline: none;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-gradient) border-box;
    box-shadow: 0 0 0 3px rgba(54, 145, 193, 0.1);
}

.chat-input-wrapper button {
    padding: 0.75rem 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.disclaimer {
    padding: 0.75rem 1.5rem;
    background: var(--primary-gradient);
    border-top: 1px solid transparent;
    font-size: 0.625rem;
    color: var(--white);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.disclaimer strong {
    color: var(--white);
}

/* Floating Doctor+ Chat Window */
.doctor-plus-chat {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 400px;
    height: 600px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateY(100vh);
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid transparent;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-gradient) border-box;
}

.doctor-plus-chat.active {
    transform: translateY(0);
}

.doctor-plus-chat.active ~ .floating-doctor-plus {
    display: none;
}

.doctor-plus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--primary-gradient);
    color: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    cursor: move;
}

.doctor-plus-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.125rem;
}

.doctor-plus-title i {
    font-size: 1.25rem;
}

.doctor-plus-controls {
    display: flex;
    gap: 0.5rem;
}

.doctor-plus-btn {
    background: none;
    border: none;
    color: var(--white);
    padding: 0.25rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.doctor-plus-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.doctor-plus-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.doctor-plus-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    background: var(--chat-bg);
    max-height: 400px;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.doctor-plus-input-container {
    padding: 1rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.doctor-plus-form {
    margin: 0;
}

.doctor-plus-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.doctor-plus-input-wrapper input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-gradient) border-box;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.doctor-plus-input-wrapper input:focus {
    outline: none;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-gradient) border-box;
    box-shadow: 0 0 0 3px rgba(54, 145, 193, 0.1);
}

.doctor-plus-input-wrapper button {
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.875rem;
}

/* Floating Doctor+ Button */
.floating-doctor-plus {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.doctor-plus-toggle-btn {
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doctor-plus-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(54, 145, 193, 0.3);
}

.doctor-plus-toggle-btn i {
    font-size: 1.125rem;
}

/* Floating Feedback Button */
.floating-feedback {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.feedback-btn {
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(54, 145, 193, 0.3);
}

.feedback-btn i {
    font-size: 1.125rem;
}

@media (max-width: 768px) {
    .floating-feedback {
        bottom: 1rem;
        right: 1rem;
    }
    
    .feedback-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.75rem;
    }
    
    .feedback-btn span {
        display: none;
    }
    
    .feedback-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        justify-content: center;
    }
    
    .doctor-plus-chat {
        width: calc(100vw - 2rem);
        height: calc(100vh - 4rem);
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .floating-doctor-plus {
        bottom: 1rem;
        right: 1rem;
    }
    
    .doctor-plus-toggle-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.75rem;
    }
    
    .doctor-plus-toggle-btn span {
        display: none;
    }
    
    .doctor-plus-toggle-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        justify-content: center;
    }
}

/* Loading Overlay */
@keyframes gradient-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: background-color 0.3s ease;
}

.loading-spinner i {
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: gradient-spin 1s linear infinite;
    display: inline-block;
}

.medical-fact {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-gradient);
    max-width: 400px;
    transition: background-color 0.3s ease;
}

.medical-fact p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
}

@keyframes fact-fade-in {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.medical-fact.updating {
    animation: fact-fade-in 0.5s ease-out;
}

/* Utility Classes */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    /* Chatbot mobile styles */
    .chat-messages {
        height: 400px;
        padding: 1rem;
    }
    
    .chat-input-container {
        padding: 1rem;
    }
    
    .disclaimer {
        padding: 0.75rem 1rem;
    }
    
    .bot-message, .user-message {
        gap: 0.75rem;
    }
    
    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* Confirmation Modal */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.confirmation-modal.show {
    opacity: 1;
    visibility: visible;
}

.confirmation-modal-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.confirmation-modal.show .confirmation-modal-content {
    transform: scale(1);
}

.confirmation-modal-icon {
    font-size: 3rem;
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.confirmation-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.confirmation-modal-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.confirmation-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirmation-modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.confirmation-modal-btn-cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.confirmation-modal-btn-cancel:hover {
    background: var(--bg-tertiary);
}

.confirmation-modal-btn-confirm {
    background: var(--error-color);
    color: white;
}

.confirmation-modal-btn-confirm:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .confirmation-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .confirmation-modal-buttons {
        flex-direction: column;
    }
    
    .confirmation-modal-btn {
        width: 100%;
    }
}
