/* ============================================
   PharmVR 2D Beta — Main Stylesheet
   Clinical-Modern Academic Design System
   ============================================ */

:root {
    /* Colors */
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #99f6e4;
    --primary-50: #f0fdfa;
    --accent: #6366f1;
    --accent-light: #a5b4fc;
    --bg: #fafcff;
    --bg-card: #ffffff;
    --bg-dark: #0f172a;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 10px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 50px -12px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --radius-full: 9999px;
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><circle cx="16" cy="16" r="12" fill="%230d9488" opacity="0.3"/><ellipse cx="16" cy="14" rx="6" ry="7" fill="%230d9488"/><circle cx="12" cy="12" r="1.2" fill="white"/><circle cx="20" cy="12" r="1.2" fill="white"/><ellipse cx="16" cy="17" rx="2" ry="1.5" fill="white" opacity="0.6"/><line x1="10" y1="15" x2="8" y2="14" stroke="%230d9488" stroke-width="0.6"/><line x1="10" y1="17" x2="8" y2="17" stroke="%230d9488" stroke-width="0.6"/><line x1="22" y1="15" x2="24" y2="14" stroke="%230d9488" stroke-width="0.6"/><line x1="22" y1="17" x2="24" y2="17" stroke="%230d9488" stroke-width="0.6"/><path d="M18 20 Q20 21 22 23" stroke="%230d9488" stroke-width="1" fill="none" stroke-linecap="round"/></svg>') 16 16, auto;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom rat cursor on interactive elements */
a, button, [onclick], .nav-link, .btn, input, textarea, select {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><circle cx="16" cy="16" r="12" fill="%230d9488" opacity="0.3"/><ellipse cx="16" cy="14" rx="6" ry="7" fill="%230d9488"/><circle cx="12" cy="12" r="1.2" fill="white"/><circle cx="20" cy="12" r="1.2" fill="white"/><ellipse cx="16" cy="17" rx="2" ry="1.5" fill="white" opacity="0.6"/><line x1="10" y1="15" x2="8" y2="14" stroke="%230d9488" stroke-width="0.6"/><line x1="10" y1="17" x2="8" y2="17" stroke="%230d9488" stroke-width="0.6"/><line x1="22" y1="15" x2="24" y2="14" stroke="%230d9488" stroke-width="0.6"/><line x1="22" y1="17" x2="24" y2="17" stroke="%230d9488" stroke-width="0.6"/><path d="M18 20 Q20 21 22 23" stroke="%230d9488" stroke-width="1" fill="none" stroke-linecap="round"/></svg>') 16 16, auto;
}

/* Page Router */
.page {
    display: none;
    min-height: 100vh;
}
.page.active {
    display: block;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow); }
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-50); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-action {
    background: var(--bg-card);
    color: var(--text);
    border: 1.5px solid var(--border);
    width: 100%;
    justify-content: flex-start;
    padding: 10px 14px;
}
.btn-action:hover { border-color: var(--primary); background: var(--primary-50); }
.btn-absorb { border-color: var(--warning); }
.btn-absorb:hover { background: #fffbeb; }
.btn-reset { border-color: var(--text-light); }

/* ============================================
   NAVIGATION
   ============================================ */
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 48px;
    position: relative;
    z-index: 10;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
    cursor: pointer;
    transition: transform var(--transition);
}
.nav-brand:hover {
    transform: translateY(-2px);
}
.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
    transition: all var(--transition);
    overflow: hidden;
}
.brand-icon:hover {
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.25);
    transform: scale(1.05);
}
.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.brand-text {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}
.brand-accent {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: italic;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color var(--transition);
}
.nav-link:hover { color: var(--primary); }
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg) 0%, var(--primary-50) 50%, #ede9fe 100%);
}
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px 60px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.8));
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.1);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
    backdrop-filter: blur(10px);
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
    letter-spacing: -1px;
}
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}
.hero-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.hero-actions {
    display: flex;
    gap: 16px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* Background animated elements */
.hero-bg-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.bg-molecule {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    opacity: 0.06;
}
.bg-mol-1 { background: var(--primary); top: 10%; right: 10%; animation: float 8s ease-in-out infinite; }
.bg-mol-2 { background: var(--accent); bottom: 20%; left: 5%; animation: float 10s ease-in-out infinite reverse; width: 150px; height: 150px; }
.bg-mol-3 { background: var(--primary); top: 50%; right: 30%; animation: float 12s ease-in-out infinite; width: 100px; height: 100px; }
.bg-pulse {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    opacity: 0.08;
}
.bg-pulse-1 { top: 20%; left: 20%; animation: pulse-ring 4s ease-out infinite; }
.bg-pulse-2 { bottom: 10%; right: 15%; animation: pulse-ring 5s ease-out infinite 1s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 0.1; }
    100% { transform: scale(1.4); opacity: 0; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   FEATURES
   ============================================ */
.features-section {
    padding: 80px 48px;
    background: white;
}
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.section-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 48px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.feature-card {
    padding: 28px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.feature-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}
.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   EXPERIMENTS DIRECTORY
   ============================================ */
.experiments-section {
    padding: 80px 48px;
    background: var(--bg);
}
.filter-bar {
    max-width: 1200px;
    margin: 0 auto 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    transition: border-color var(--transition);
    max-width: 400px;
}
.search-box:focus-within { border-color: var(--primary); }
.search-box svg { color: var(--text-light); flex-shrink: 0; }
.search-box input {
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    width: 100%;
    background: transparent;
}
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-tag {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: white;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}
.filter-tag:hover { border-color: var(--primary); color: var(--primary); }
.filter-tag.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.exp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}
.exp-card {
    background: white;
    border-radius: var(--radius);
    border: 1.5px solid var(--border-light);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.exp-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.exp-card.available {
    border-left: 4px solid var(--primary);
}
.exp-card.coming-soon {
    opacity: 0.6;
    cursor: default;
}
.exp-card.coming-soon:hover { transform: none; box-shadow: none; }
.exp-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.exp-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    background: var(--primary-50);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.exp-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.exp-status.live {
    background: #dcfce7;
    color: #16a34a;
}
.exp-status.soon {
    background: var(--border-light);
    color: var(--text-light);
}
.exp-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}
.exp-card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}
.exp-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.exp-tag {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--border-light);
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   ABOUT & FOOTER
   ============================================ */
.about-section {
    padding: 60px 48px;
    background: white;
}
.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.about-content h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 16px;
}
.about-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.about-note {
    font-style: italic;
    color: var(--primary) !important;
    font-size: 0.85rem !important;
}
.footer {
    padding: 32px 48px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.82rem;
    background: linear-gradient(180deg, var(--bg) 0%, rgba(13, 148, 136, 0.02) 100%);
    border-top: 2px solid var(--primary-50);
}
.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition);
}
.footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-bar { padding: 12px 20px; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-stats { gap: 16px; flex-wrap: wrap; justify-content: center; }
    .hero-actions { flex-direction: column; align-items: center; }
    .features-section, .experiments-section, .about-section { padding: 40px 20px; }
    .exp-grid { grid-template-columns: 1fr; }
    .hero-content { padding: 20px 16px 40px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* Hidden utility */
.hidden { display: none !important; }
