:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary: #06b6d4;
    --background: #f8fafc;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Section */
.header {
    position: relative;
    background: linear-gradient(135deg, #e0f2fe 0%, var(--white) 100%);
    padding: 60px 0 100px;
    overflow: hidden;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 600px;
    z-index: 2;
    position: relative;
}

.logo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.devanagari {
    font-weight: 500;
    margin-right: 2px;
}

.tagline {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.3;
}

.cta-button {
    background: var(--gradient);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.15);
}

.hero-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    max-width: 600px;
    z-index: 1;
}

.hero-img {
    width: 100%;
    height: auto;
}

.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.wave-fill {
    fill: var(--white);
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text-dark);
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.features-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.feature-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex: 1 1 300px;
    max-width: 350px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.feature-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    font-size: 1rem;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
    background-color: var(--background);
    position: relative;
    overflow: hidden;
}

.how-it-works:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%232563eb' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    z-index: 1;
    position: relative;
}

.step {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex: 1 1 250px;
    max-width: 280px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
}

.step-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.step h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.step p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--primary);
    margin: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: var(--gradient);
    position: relative;
    overflow: hidden;
}

.cta-section:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.cta-content {
    text-align: center;
    color: var(--white);
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .cta-button {
    background: var(--white);
    color: var(--primary);
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
}

.cta-section .cta-button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
}

/* App Section */
.app-section {
    padding: 80px 0;
    background-color: #f9f9fe;
}

.app-container {
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(31, 41, 55, 0.1);
    overflow: hidden;
}

.upload-container {
    padding: 30px;
}

.upload-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

.upload-area {
    border: 2px dashed #6366f1;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

.upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-prompt i {
    font-size: 48px;
    color: #6366f1;
}

.upload-prompt p {
    margin: 0;
    color: #4b5563;
}

.small-text {
    font-size: 14px;
    color: #9ca3af;
}

.preview-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
}

#previewImage {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    object-fit: contain;
}

.remove-button {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.remove-button:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

.upload-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 15px;
}

.upload-button {
    background-color: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-button:hover {
    background-color: #4f46e5;
    transform: translateY(-2px);
}

.upload-button:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    border-top: 4px solid #6366f1;
    animation: spin 1s linear infinite;
}

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

.results-container {
    padding: 30px;
    border-top: 1px solid #e5e7eb;
}

.results-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

.results-summary {
    padding: 15px;
    background-color: #f8fafc;
    border-radius: 8px;
    margin-bottom: 20px;
}

.medications-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.medication-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.medication-header {
    padding: 15px;
    background-color: #6366f1;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.medication-header h4 {
    margin: 0;
    font-size: 18px;
}

.confidence-badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.medication-body {
    padding: 20px;
}

.medication-detail {
    margin-bottom: 15px;
}

.medication-detail h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #4b5563;
}

.medication-detail p {
    margin: 0;
    color: #6b7280;
}

.medication-detail ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    color: #6b7280;
}

.reset-button {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.reset-button:hover {
    background-color: #e5e7eb;
}

.error-message {
    background-color: #fee2e2;
    color: #b91c1c;
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message i {
    color: #ef4444;
}

/* Footer */
.footer {
    padding: 60px 0;
    background-color: #0f172a;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.footer-text {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.neural-network-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
    z-index: 0;
}

/* Animation Styles */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.pulse {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.cta-button.clicked {
    transform: scale(0.95);
}

body.loaded .header-content {
    animation: slideIn 1s ease-out forwards;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Ensure we have a staggered animation effect for feature cards */
.feature-card:nth-child(1) {
    transition-delay: 0.1s;
}

.feature-card:nth-child(2) {
    transition-delay: 0.2s;
}

.feature-card:nth-child(3) {
    transition-delay: 0.3s;
}

/* Step animation for how it works section */
.step {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Neural network background animation in footer */
.neural-network-bg {
    animation: pulse-slow 8s infinite alternate;
}

@keyframes pulse-slow {
    0% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.7;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-image {
        width: 45%;
    }
    
    .feature-card {
        flex: 1 1 250px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 40px 0 80px;
    }
    
    .header-content {
        max-width: 100%;
        text-align: center;
        align-items: center;
    }
    
    .hero-image {
        position: relative;
        width: 80%;
        margin: 40px auto 0;
        top: unset;
        right: unset;
        transform: none;
    }
    
    .features-container {
        flex-direction: column;
        align-items: center;
    }
    
    .feature-card {
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    .steps-container {
        flex-direction: column;
        gap: 50px;
    }
    
    .step {
        max-width: 100%;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        margin: 0;
    }
    
    .wave-divider svg {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.4rem;
    }
    
    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .app-container {
        width: 95%;
    }
    
    .upload-area {
        padding: 20px;
    }
}

/* Additional styles for new medication cards and dosage information */

.medication-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.medication-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.medication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.medication-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 10px;
}

.medication-card-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
}

.medication-category {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.medication-description {
    color: #616161;
    margin-bottom: 15px;
    line-height: 1.4;
}

.dosage-section {
    background-color: #f5f9ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #4caf50;
}

.dosage-section h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2e7d32;
    font-size: 1rem;
}

.dosage-details {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.dosage-details li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.dosage-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.dosage-tag {
    background-color: #e0f2f1;
    color: #00796b;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
}

.side-effects-section {
    margin-bottom: 15px;
}

.side-effects-section h5 {
    color: #c62828;
    margin-bottom: 10px;
    font-size: 1rem;
}

.side-effects-list {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0;
}

.side-effects-list li {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.warnings-section, .interactions-section {
    margin-bottom: 15px;
}

.warnings-toggle, .interactions-toggle {
    width: 100%;
    text-align: left;
    background-color: #fff8e1;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ff8f00;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.interactions-toggle {
    background-color: #f3e5f5;
    color: #8e24aa;
}

.warnings-list, .interactions-list {
    list-style-type: disc;
    padding-left: 20px;
    margin: 10px 0 0;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.warnings-list.collapsed, .interactions-list.collapsed {
    max-height: 0;
    margin-top: 0;
}

.aliases-section {
    margin-top: 15px;
    border-top: 1px dashed #e0e0e0;
    padding-top: 10px;
}

.aliases-header small {
    color: #757575;
    font-size: 0.85rem;
}

.aliases-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.alias-tag {
    background-color: #f5f5f5;
    color: #757575;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.no-medications-message {
    background-color: #fff3e0;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.no-medications-message i {
    font-size: 2rem;
    color: #ff9800;
    margin-right: 15px;
}

.no-medications-message p {
    margin: 0;
    color: #e65100;
    font-size: 1rem;
}

.ocr-section {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.ocr-section h3 {
    margin-top: 0;
    color: #455a64;
    margin-bottom: 15px;
}

.ocr-content {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #90a4ae;
}

.ocr-content p {
    margin: 0 0 10px;
    color: #37474f;
    font-family: monospace;
    font-size: 0.95rem;
    line-height: 1.5;
}

.analysis-info {
    text-align: right;
    margin-top: 20px;
    color: #757575;
    font-size: 0.85rem;
}