/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --fg: hsl(215, 25%, 17%);
  --primary: hsl(213, 60%, 45%);
  --primary-fg: #ffffff;
  --secondary: hsl(210, 30%, 95%);
  --secondary-fg: hsl(215, 25%, 27%);
  --muted: hsl(210, 20%, 96%);
  --muted-fg: hsl(215, 15%, 50%);
  --accent: hsl(213, 50%, 92%);
  --accent-fg: hsl(213, 60%, 35%);
  --border: hsl(214, 20%, 90%);
  --input: hsl(214, 20%, 90%);
  --ring: hsl(213, 60%, 45%);
  --radius: 0.5rem;
   --border-radius: 8px;







    --primary-dark: #235a9e;
    --primary-light: #3576c7;
    --primary-color: #2e6cb8;
    --primary-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(226, 232, 240, 0.5);
    --glass-hover: rgba(248, 250, 252, 0.8);
    --input-bg: #ffffff;
    --input-border: #e2e8f0;
    --gradient-primary: linear-gradient(135deg, #2e6cb8, #235a9e);
    --gradient-hero: linear-gradient(135deg, #2e6cb8 0%, #235a9e 50%, #2673d2 100%);
    --shadow-elegant: 0 10px 25px -5px rgba(139, 92, 246, 0.1), 0 8px 10px -6px rgba(139, 92, 246, 0.1);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);



}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

h1, h2, h3 { letter-spacing: -0.035em; font-weight: 800; color: var(--fg); }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select { font: inherit; }

/* ===== Page Wrapper ===== */
.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }

/* ===== Navbar ===== */
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; background: var(--bg); border-bottom: 1px solid var(--border); }
.logo { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.btn-text { font-size: 0.875rem; color: var(--muted-fg); transition: color 0.2s; }
.btn-text:hover { color: var(--primary); }
.btn-primary-sm { font-size: 0.875rem; padding: 0.5rem 1rem; background: var(--primary); color: var(--primary-fg); border-radius: 0.5rem; transition: opacity 0.2s; }
.btn-primary-sm:hover { opacity: 0.9; }

/* ===== Hero ===== */
.hero { position: relative; padding: 6rem 1.5rem; text-align: center; color: var(--primary-fg); overflow: hidden; background: var(--primary); }
.hero-inner { max-width: 48rem; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 { font-size: 2.5rem; margin-bottom: 1.5rem; line-height: 1.15; color: var(--primary-fg); }
.hero-sub { font-size: 1.125rem; color: rgba(255,255,255,0.9); margin-bottom: 2rem; max-width: 40rem; margin-left: auto; margin-right: auto; }
.btn-hero { display: inline-flex; align-items: center;     width: 100%;
    justify-content: center;
    margin: auto; gap: 0.5rem; padding: 0.75rem 2rem; background: #2563eb; color: var(--primary-fg); border-radius: 0.5rem; font-size: 1rem; font-weight: 500; transition: background 0.2s; border: 1px solid rgba(255,255,255,0.3); }
.btn-hero:hover { background: #135dff; }
.hero-badges { display: flex; justify-content: center; gap: 3rem; margin-top: 3rem; font-size: 0.875rem; color: rgba(255,255,255,0.8); }
.badge-item { display: flex; align-items: center; gap: 0.5rem; }
.badge-icon { width: 1.25rem; height: 1.25rem; }
.badge-icon-sm { width: 1rem; height: 1rem; }

/* ===== Features ===== */
.features-section { padding: 5rem 1.5rem; background: var(--secondary); }
.features-header { max-width: 40rem; margin: 0 auto 3.5rem; text-align: center; }
.features-header h2 { font-size: 1.875rem; margin-bottom: 1rem; }
.text-primary { color: var(--primary); }
.features-sub { color: var(--muted-fg); max-width: 32rem; margin: 0 auto; }
.features-grid { max-width: 64rem; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature-card { background: var(--bg); border-radius: 0.75rem; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); border: 1px solid var(--border); transition: box-shadow 0.2s; }
.feature-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.feature-icon-wrap { width: 3rem; height: 3rem; background: var(--accent); border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.feature-icon-wrap svg { width: 2rem; height: 2rem; color: var(--primary); }
.feature-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.875rem; color: var(--muted-fg); line-height: 1.6; }

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

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

.footer-brand .brand-text {
    color: white;
    margin-bottom: 1rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    max-width: 20rem;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-social a:hover {
    color: white;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}
/* ===== Modal ===== */
.modal-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); animation: fadeIn 0.2s ease-out; }
.modal-box { background: var(--bg); border-radius: 1rem; box-shadow: 0 25px 50px rgba(0,0,0,0.2); width: 90vw; max-width: 28rem; padding: 2rem; position: relative; max-height: 90vh; overflow-y: auto; border: 1px solid var(--border); }
.modal-close { position: absolute; top: 1rem; right: 1rem; width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--muted-fg); font-size: 1.25rem; transition: all 0.2s; }
.modal-close:hover { color: var(--fg); background: var(--muted); }
.modal-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 1.5rem; }

/* Form */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.form-group input, .form-group select { width: 100%; padding: 0.625rem 1rem; border-radius: 0.5rem; border: 1px solid var(--input); background: var(--bg); font-size: 0.875rem; color: var(--fg); outline: none; transition: box-shadow 0.2s, border-color 0.2s; }
.form-group input:focus, .form-group select:focus { box-shadow: 0 0 0 2px var(--ring); border-color: transparent; }
.btn-submit { width: 100%; padding: 0.75rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; background: var(--primary); color: var(--primary-fg); transition: opacity 0.2s; margin-top: 0.5rem; }
.btn-submit:hover { opacity: 0.9; }
.auth-switch { font-size: 0.875rem; color: var(--muted-fg); text-align: center; margin-top: 1rem; }
.link-primary { color: var(--primary); font-weight: 500; margin-left: 0.25rem; }
.link-primary:hover { text-decoration: underline; }

/* Interests */
.interests-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
.interest-btn { padding: 0.375rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; background: var(--muted); color: var(--muted-fg); transition: all 0.2s; }
.interest-btn.selected { background: var(--primary); color: var(--primary-fg); }
.interest-btn:hover:not(.selected) { background: var(--accent); }
.interests-count { font-size: 0.75rem; color: var(--muted-fg); margin-top: 0.25rem; }
.terms-check { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 0.5rem; }
.terms-check input { margin-top: 0.125rem; accent-color: var(--primary); }

/* Loading Phases */
.loading-phase { padding: 2rem 0; text-align: center; }
.phase-content { display: flex; flex-direction: column; align-items: center; }
.phase-content h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.25rem; }
.phase-sub { font-size: 0.875rem; color: var(--muted-fg); }
.phase-sub-sm { font-size: 0.75rem; color: var(--muted-fg); margin-bottom: 1.25rem; }
.font-bold { font-weight: 700; }
.spinner { width: 3rem; height: 3rem; border: 4px solid var(--primary); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 1.25rem; }
.found-icon { width: 3.5rem; height: 3.5rem; color: var(--primary); margin-bottom: 1rem; }
.found-icon svg { width: 100%; height: 100%; }
.progress-bar { width: 100%; height: 0.375rem; background: var(--muted); border-radius: 9999px; overflow: hidden; }
.progress-fill { height: 100%; width: 80%; background: var(--primary); border-radius: 9999px; animation: pulse 1.5s ease-in-out infinite; }

/* ===== Discovery Feed ===== */
#discovery-feed { min-height: 100vh; background: var(--secondary); display: flex; flex-direction: column; }
.feed-nav { position: sticky; top: 0; z-index: 40; }
.user-avatar { width: 2rem; height: 2rem; border-radius: 50%; background: rgba(var(--primary), 0.1); background: hsl(213, 60%, 45%, 0.1); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 0.875rem; font-weight: 700; }
.feed-topbar { background: var(--bg); border-bottom: 1px solid var(--border); padding: 0.75rem 1.5rem; }
.feed-topbar-inner { max-width: 40rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.feed-title { font-size: 1.125rem; font-weight: 600; }
.feed-subtitle { font-size: 0.75rem; color: var(--muted-fg); }
.feed-location { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--muted-fg); }
.feed-grid-wrapper { flex: 1; padding: 1.5rem 1rem; }
.feed-grid { max-width: 40rem; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.profile-card { background: var(--bg); border-radius: 0.75rem; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); border: 1px solid var(--border); text-align: left; width: 100%; transition: all 0.2s; cursor: pointer; opacity: 0; animation: fadeSlideIn 0.3s ease-out forwards; }
.profile-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: hsl(213, 60%, 45%, 0.3); }
.profile-top { display: flex; align-items: flex-start; gap: 0.75rem; }
.profile-avatar { position: relative; flex-shrink: 0; }
.profile-avatar-circle { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.125rem; }
.online-dot { position: absolute; bottom: -2px; right: -2px; width: 1rem; height: 1rem; background: #10b981; border-radius: 50%; border: 2px solid var(--bg); }
.profile-info { flex: 1; min-width: 0; }
.profile-name-row { display: flex; align-items: center; justify-content: space-between; }
.profile-name { font-weight: 600; font-size: 0.9375rem; }
.profile-distance { font-size: 0.75rem; color: var(--muted-fg); }
.profile-bio { font-size: 0.8125rem; color: var(--muted-fg); margin-top: 0.125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-tags { display: flex; gap: 0.375rem; margin-top: 0.5rem; flex-wrap: wrap; }
.profile-tag { font-size: 0.625rem; padding: 0.125rem 0.5rem; background: var(--accent); color: var(--accent-fg); border-radius: 9999px; }

/* Redirect overlay */
.redirect-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(255,255,255,0.8); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; animation: fadeIn 0.2s ease-out; }
.redirect-inner { text-align: center; }

/* ===== Animations ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.75rem; }
  .hero-badges { flex-direction: column; align-items: center; gap: 0.75rem; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .feed-grid { grid-template-columns: 1fr; }
  .features-header h2 { font-size: 1.5rem; }
}







/* Modal */
.modal-overlay1 {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay1.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 28rem;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-overlay1.active .modal-content {
    transform: scale(1);
}

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

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #64748b;
    transition: var(--transition);
}

.modal-close:hover {
    color: #334155;
}

.login-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

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

.input-group i {
    position: absolute;
    left: 0.75rem;
    color: #9ca3af;
    width: 1rem;
    height: 1rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition);
        margin-left: 10px;
}



.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    transition: var(--transition);
}

.password-toggle:hover {
    color: #374151;
}

/* Interests selection */
.interests-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.interest-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    background: white;
    font-size: 0.875rem;
    font-weight: 500;
}

.interest-option:hover {
    border-color: var(--primary-light);
    background: #f8fafc;
}

.interest-option.selected {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
}

.interest-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.interest-option.disabled:hover {
    border-color: #e2e8f0;
    background: white;
}

.interest-option i {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.interests-counter {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

@media (min-width: 640px) {
    .interests-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.form-separator {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.form-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.form-separator span {
    background: white;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.form-footer {
    text-align: center;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.form-footer span {
    color: #9ca3af;
}

.form-footer button {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* App Interface Styles */
.app-section {
    padding: 6rem 0 4rem;
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc, white);
}

.app-header {
    text-align: center;
    margin-bottom: 4rem;
}

.app-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.app-description {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 36rem;
    margin: 0 auto;
}

.people-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.person-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.person-card:hover {
    box-shadow: var(--shadow-elegant);
    transform: translateY(-4px);
}

.person-avatar {
    text-align: center;
    margin-bottom: 1.5rem;
}

.avatar-placeholder {
    width: 4rem;
    height: 4rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.avatar-placeholder1 {
    width: 4rem;
    height: 4rem;
    background: url('./img/pfp-woman-4.jpg');
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    background-size: cover;
}

.avatar-placeholder2 {
    width: 4rem;
    height: 4rem;
    background: url('./img/pfp-woman-3.jpg');
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
        background-size: cover;
}


.avatar-placeholder3 {
    width: 4rem;
    height: 4rem;
    background: url('./img/pfp-woman-5.jpg');
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
        background-size: cover;
}


.avatar-placeholder4 {
    width: 4rem;
    height: 4rem;
    background: url('./img/pfp-woman-1.jpg');
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
        background-size: cover;
}


.avatar-placeholder5 {
    width: 4rem;
    height: 4rem;
    background: url('./img/pfp-woman-6.jpg');
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
        background-size: cover;
}

.avatar-placeholder6 {
    width: 4rem;
    height: 4rem;
    background: url('./img/pfp-woman-2.jpg');
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
        background-size: cover;
}

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

.person-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.person-bio {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.person-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.interest-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
}

.person-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.person-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-greeting {
    color: #64748b;
    font-weight: 500;
}

#appContent {
    display: none;
}

/* Chat Interface Styles */
#chatInterface {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: var(--primary-bg);
}

.chat-container {
    height: 85vh;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    background: var(--primary-bg);
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 10;
    justify-content: space-between;
}

.chat-back-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 1rem;
    transition: var(--transition-smooth);
}

.chat-back-btn:hover {
    background: var(--glass-hover);
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}


.chat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background-size: cover !important;
    background-position: center;
    background: var(--gradient-primary); /* fallback for letters */
}

.chat-user-details {
    flex: 1;
}

.chat-user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.chat-user-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
        display: block;
    justify-items: end;
    margin-bottom: 0.5rem;
}

.chat-message.sent {
    justify-content: flex-end;
}

.chat-message.received {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 1.5rem;
    position: relative;
}

.chat-message.sent .message-bubble {
    background: var(--gradient-primary);
    color: white;
    border-bottom-right-radius: 0.5rem;
}

.chat-message.received .message-bubble {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 0.5rem;
}

/* System message styles */
.chat-message.system {
    justify-items: center;
}

.chat-message.system .message-bubble {
    background: rgba(139, 92, 246, 0.1);
    color: #2e6cb8;
    text-align: center;
    font-style: italic;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 1rem;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
}

.message-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

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

.chat-message.sent .message-time {
    text-align: right;
}

/* Message status styles - positioned directly under the bubble */
.message-status {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
    margin-top: 4px;
    margin-bottom: 8px;
}

.chat-message.sent .message-status {
    text-align: right;
    color: #9ca3af;
    margin-right: 0;
}

.chat-message.received .message-status {
    text-align: left;
    color: #9ca3af;
    margin-left: 0;
}

/* Messages tab styles */
.messages-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.messages-tab i {
    width: 16px;
    height: 16px;
}

/* Messages interface styles */
.messages-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.messages-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--card);
}

.messages-back-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.messages-back-btn:hover {
    background: var(--muted);
}

.messages-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.conversation-item:hover {
    background: var(--muted);
}

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

.conversation-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2e6cb8, #235a9e);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.conversation-preview {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
}

.conversation-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.conversation-count {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

.no-messages {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.no-messages i {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-messages h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.no-messages p {
    margin: 0;
    max-width: 300px;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 0;
}

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

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

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

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-input-container {
    padding: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    transition: var(--transition-smooth);
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

#chatInput {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.5rem 0;
}

#chatInput::placeholder {
    color: var(--text-secondary);
}

.chat-send-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-left: 0.5rem;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-elegant);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* Responsive chat design */
@media (max-width: 768px) {
    .chat-container {
        max-width: 100%;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .chat-header {
        padding: 0.75rem;
    }
    
    .chat-messages {
        padding: 0.75rem;
    }
    
    .chat-input-container {
        padding: 0.75rem;
    }
}

@media (min-width: 640px) {
    .people-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .person-actions {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    .people-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .app-title {
        font-size: 3rem;
    }
}

/* Form Select Styles */
.input-group select {
    width: 100%;
    padding: 12px 40px 12px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    margin-left: 10px;
}

.input-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-group select[multiple] {
    height: 120px;
    background-image: none;
    padding: 8px 40px 8px 40px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.checkbox-group label {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.terms-link {
    color: #3b82f6;
    text-decoration: underline;
}

.terms-link:hover {
    color: #2563eb;
}









/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2100;
    background: rgb(255, 255, 255);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
        width: 100%;
}

/* Mobile navigation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #64748b;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: #334155;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid #e2e8f0;
    z-index: 2000;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-content {
    padding: 1rem;
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-menu-actions .btn {
    width: 100%;
    justify-content: center;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #223658;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    transition: right 0.3s ease;
    z-index: 999;
}

.mobile-menu.active {
    right: 0;
}



.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 998;
  height: 100vh;
}
.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
    padding: 30px 20px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Session mobile menu items */
.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    padding: 12px 16px;
    width: 100%;
    text-align: left;
}

.mobile-menu-item i {
    width: 20px;
    height: 20px;
}

@media (max-width: 767px) {
    .nav-container {
        justify-content: space-between;
        position: relative;
    }
    
    .nav-actions.desktop-nav {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: block !important;
    }
    
    /* When user is logged in on mobile */
    .nav-container.logged-in {
        justify-content: space-between;
    }
    
    .nav-container.logged-in .brand-text {
        flex: 1;
        text-align: center;
    }
    
    .nav-container.logged-in .mobile-menu-btn {
        order: 3;
    }
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    
    color: #ffffff;
}


.logged-in .brand-text{
  color: #2e6cb8
}

.logged-in img{
  src: url('./logo.png');
}

.nav-links {
    display: none;
    gap: 2rem;
}

.nav-links a {
    color: #64748b;
    text-decoration: none;
    transition: var(--transition);
}

.nav-links a:hover {
    color: #334155;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
        width: fit-content;
}

.nav-actions .btn .desktop-only {
    display: none;
}

@media (min-width: 1024px) {
    .nav-actions .btn .desktop-only {
        display: inline;
    }
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}
