/* RXID.ai - Drug Identification Platform */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #3b82f6;
    --accent: #10b981;
    --bg: #ffffff;
    --bg-gray: #f9fafb;
    --bg-blue: #eff6ff;
    --text: #111827;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo-ai {
    color: var(--text-light);
    font-weight: 400;
}

.nav {
    display: flex;
    gap: 2rem;
}

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

.nav a:hover {
    color: var(--primary);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 4rem 0;
    color: white;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.trust-line {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.trust-item {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9375rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Search Section */
.search-section {
    padding: 3rem 0;
    background: var(--bg-gray);
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    padding: 1rem 2rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    border-color: var(--primary);
    background: var(--bg-blue);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.search-panel {
    display: none;
}

.search-panel.active {
    display: block;
}

.search-box-main {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.search-box-main input {
    flex: 1;
    border: none;
    font-size: 1.125rem;
    padding: 0.75rem;
    outline: none;
}

.search-btn-main {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.search-btn-main:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Upload Area */
.upload-area {
    background: white;
    border: 3px dashed var(--border);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--bg-blue);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.upload-area p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.upload-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-btn:hover {
    background: var(--primary-dark);
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 1rem;
}

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

.preview-area img {
    max-width: 400px;
    width: 100%;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 2px solid var(--border);
}

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

.hidden {
    display: none !important;
}

/* Results Section */
.results-section {
    padding: 3rem 0;
}

.results-section .container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.drug-info-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Pill Image Section */
.pill-image-section {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid #3b82f6;
}

.pill-image-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    text-align: center;
}

.pill-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.pill-image-container {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pill-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.pill-image-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pill-details {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pill-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
}

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

.detail-label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9375rem;
}

.detail-value {
    font-weight: 700;
    color: var(--text);
    font-size: 1rem;
}

.image-source {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.image-source p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

.image-source strong {
    color: var(--primary);
}

.drug-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
}

.drug-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.drug-generic {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.drug-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.meta-badge {
    background: var(--bg-gray);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
}

.price-btn {
    background: linear-gradient(135deg, var(--accent), #059669);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.price-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.price-hint {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Inline Ad */
.inline-ad {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid var(--warning);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.ad-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.ad-content-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.ad-text strong {
    font-size: 1.125rem;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text);
}

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

.ad-btn-inline {
    background: var(--text);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
}

.ad-btn-inline:hover {
    background: var(--primary);
}

/* Info Tabs */
.info-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.info-tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}

.info-tab:hover {
    color: var(--primary);
}

.info-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.info-panel {
    display: none;
}

.info-panel.active {
    display: block;
}

.info-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.info-panel p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-item {
    background: var(--bg-gray);
    padding: 1.5rem;
    border-radius: 12px;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
}

.info-list {
    list-style: none;
    margin: 1.5rem 0;
}

.info-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.info-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 900;
}

.info-list.warning li::before {
    color: var(--danger);
}

.warning-box {
    background: #fef2f2;
    border-left: 4px solid var(--danger);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.side-effects-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.side-effects-col h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text);
}

/* Interaction Checker */
.interaction-checker {
    background: var(--bg-blue);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.interaction-checker h4 {
    margin-bottom: 1rem;
}

.checker-input {
    display: flex;
    gap: 1rem;
}

.checker-input input {
    flex: 1;
    padding: 0.875rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

.btn-check {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.common-interactions {
    margin-top: 2rem;
}

.common-interactions h4 {
    margin-bottom: 1rem;
}

.interaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 4px solid;
}

.interaction-item.severe {
    border-left-color: var(--danger);
}

.interaction-item.moderate {
    border-left-color: var(--warning);
}

.interaction-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.severe .interaction-badge {
    background: #fef2f2;
    color: var(--danger);
}

.moderate .interaction-badge {
    background: #fef3c7;
    color: var(--warning);
}

.interaction-drug {
    font-weight: 600;
}

.source-badge {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-gray);
    border-radius: 8px;
    text-align: center;
}

.source-badge span {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9375rem;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--accent), #059669);
    padding: 2.5rem;
    border-radius: 16px;
    color: white;
    text-align: center;
    margin-top: 3rem;
}

.cta-box h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.cta-box p {
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.cta-btn {
    display: inline-block;
    background: white;
    color: var(--accent);
    padding: 1rem 2.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.2s;
}

.cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Sidebar Ads */
.sidebar-ads {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ad-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid var(--border);
}

.ad-card .ad-label {
    padding: 0.5rem 1rem;
    background: var(--bg-gray);
}

.ad-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.ad-card h4 {
    padding: 1rem 1rem 0.5rem;
    font-size: 1.125rem;
}

.ad-card p {
    padding: 0 1rem 1rem;
    color: var(--text-light);
    font-size: 0.9375rem;
}

.ad-link {
    display: block;
    padding: 1rem;
    background: var(--bg-gray);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
}

.ad-link:hover {
    background: var(--primary);
    color: white;
}

.info-card {
    background: var(--bg-blue);
    border-radius: 12px;
    padding: 1.5rem;
}

.info-card h4 {
    margin-bottom: 1rem;
}

.resource-list {
    list-style: none;
}

.resource-list li {
    padding: 0.5rem 0;
}

.resource-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.resource-list a:hover {
    text-decoration: underline;
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background: var(--bg-gray);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.source-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.source-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.source-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.source-card p {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.sponsor-section {
    text-align: center;
    padding: 3rem 0;
}

.sponsor-text {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.sponsor-logos {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.sponsor-logos span {
    font-weight: 600;
    color: var(--text-light);
    font-size: 1.125rem;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-column p {
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
}

.footer-column h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    padding: 0.375rem 0;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

/* Legal Disclaimers */
.legal-disclaimers {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.disclaimer-section {
    margin-bottom: 1.5rem;
    text-align: left;
}

.disclaimer-section h5 {
    font-size: 1rem;
    font-weight: 700;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    text-align: center;
}

.disclaimer {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.75rem;
}

.disclaimer strong {
    color: white;
    font-weight: 600;
}

.legal-links {
    text-align: center;
    margin: 2rem 0 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.legal-links a {
    color: #60a5fa;
    text-decoration: none;
    margin: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.legal-links a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.final-disclaimer {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Responsive */
@media (max-width: 968px) {
    .results-section .container {
        grid-template-columns: 1fr;
    }

    .pill-display {
        grid-template-columns: 1fr;
    }

    .sidebar-ads {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sources-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .side-effects-columns {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .nav {
        display: none;
    }
}
