/* ChatMeet - Dark Glassmorphism Theme */

:root {
    --bg: hsl(250, 20%, 7%);
    --fg: hsl(250, 15%, 95%);
    --card: hsl(250, 20%, 12%);
    --primary: hsl(262, 83%, 58%);
    --secondary: hsl(210, 100%, 56%);
    --accent: hsl(330, 80%, 60%);
    --muted: hsl(250, 15%, 20%);
    --muted-fg: hsl(250, 10%, 65%);
    --border: hsl(250, 15%, 25%);
    --online: hsl(142, 71%, 45%);
    --destructive: hsl(0, 84%, 60%);
    
    --gradient-primary: linear-gradient(135deg, hsl(262,83%,58%), hsl(210,100%,56%));
    --gradient-accent: linear-gradient(135deg, hsl(330,80%,60%), hsl(262,83%,58%));
    --gradient-hero: linear-gradient(135deg, hsl(262,83%,25%), hsl(210,100%,30%));
    
    --chat-user-bg: hsl(210, 100%, 56%);
    --chat-bot-bg: hsl(262, 83%, 58%);
    --chat-user-fg: white;
    --chat-bot-fg: white;
    
    --shadow-card: 0 4px 20px -4px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 30px hsla(262, 83%, 58%, 0.3);
    
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --radius: 1rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--bg); color: var(--fg); line-height: 1.6; min-height: 100vh; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(20, 15, 35, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1280px; margin: 0 auto; padding: 1rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
}
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--fg); text-decoration: none; }
.logo:hover { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.main-nav { display: flex; gap: 1.5rem; }
.main-nav a { color: var(--muted-fg); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.main-nav a:hover { color: var(--primary); }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--fg); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--card); flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--border); }
    body.menu-open .main-nav { display: flex; }
    .mobile-menu-btn { display: block; }
}

/* Announcement */
.announcement-bar { background: var(--gradient-primary); text-align: center; padding: 0.5rem; font-size: 0.9rem; }

/* Filter Bar */
.filter-bar {
    position: sticky; top: 60px; z-index: 90;
    background: rgba(20, 15, 35, 0.9);
    backdrop-filter: blur(12px);
    padding: 1rem 1.5rem;
    display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
    border-bottom: 1px solid var(--border);
}
.filter-bar input, .filter-bar select {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--fg);
    font-family: inherit;
}
.filter-bar input { flex: 1; min-width: 120px; }
.filter-bar select { min-width: 120px; }
.btn-shuffle { padding: 0.5rem 1rem; background: var(--gradient-primary); color: white; border: none; border-radius: var(--radius); font-weight: 600; cursor: pointer; font-family: inherit; }

/* Main content */
main { max-width: 1280px; margin: 0 auto; padding: 1.5rem; min-height: 60vh; }
.page-title { font-family: var(--font-display); margin-bottom: 1rem; font-size: 2rem; }
.page-subtitle { color: var(--muted-fg); margin-bottom: 2rem; }

/* Hero */
.hero { text-align: center; padding: 3rem 1rem; }
.hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 0.5rem; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { color: var(--muted-fg); font-size: 1.2rem; margin-bottom: 1.5rem; }
.btn-primary { display: inline-block; padding: 0.75rem 1.5rem; background: var(--gradient-primary); color: white; text-decoration: none; border-radius: var(--radius); font-weight: 600; border: none; cursor: pointer; font-family: inherit; transition: transform 0.2s, box-shadow 0.2s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }

/* Profile Grid */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
@media (min-width: 640px) { .profiles-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .profiles-grid { grid-template-columns: repeat(5, 1fr); } }

.profile-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}
.profile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.card-image-wrapper { position: relative; aspect-ratio: 3/4; overflow: hidden; }
.card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.online-dot {
    position: absolute; top: 8px; right: 8px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--online);
    box-shadow: 0 0 8px var(--online);
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.country-flag { position: absolute; bottom: 8px; left: 8px; width: 32px; height: 22px; border-radius: 4px; object-fit: cover; }
.gender-badge { position: absolute; top: 8px; left: 8px; font-size: 1.2rem; }
.card-body { padding: 1rem; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.card-body p { font-size: 0.85rem; color: var(--muted-fg); margin-bottom: 0.75rem; }
.chat-btn {
    width: 100%;
    padding: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.chat-btn:hover { opacity: 0.9; }

/* Profile Page */
.profile-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.profile-avatar { width: 180px; height: 240px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; }
.profile-info h1 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 0.5rem; }
.profile-meta { color: var(--muted-fg); margin-bottom: 1rem; }
.profile-bio { line-height: 1.8; }
.profile-bio h2 { font-size: 1.25rem; margin: 1.5rem 0 0.5rem; }
.suggested-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; margin-top: 1rem; }

/* Ad units */
.ad-unit { text-align: center; padding: 1rem; margin: 1rem 0; min-height: 90px; background: var(--muted); border-radius: var(--radius); }

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.blog-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
}
.blog-card:hover { box-shadow: var(--shadow-glow); }
.blog-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.blog-card-body { padding: 1rem; }
.blog-card .category { font-size: 0.75rem; color: var(--primary); font-weight: 600; margin-bottom: 0.25rem; }
.blog-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.blog-card p { font-size: 0.9rem; color: var(--muted-fg); }
.blog-post-header { margin-bottom: 2rem; }
.blog-post-header .category { color: var(--primary); font-weight: 600; }
.blog-post-content { line-height: 1.9; }
.blog-post-content img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* Footer */
.site-footer { margin-top: 4rem; padding: 2rem 1.5rem; background: var(--card); border-top: 1px solid var(--border); }
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand h3 { font-family: var(--font-display); margin-bottom: 0.5rem; }
.footer-brand p, .footer-links p, .footer-legal p { color: var(--muted-fg); font-size: 0.9rem; }
.footer-links h4, .footer-legal h4 { margin-bottom: 0.75rem; font-size: 0.9rem; }
.footer-links a, .footer-legal a { display: block; color: var(--muted-fg); text-decoration: none; margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-links a:hover, .footer-legal a:hover { color: var(--primary); }
.footer-bottom { padding-top: 1rem; border-top: 1px solid var(--border); text-align: center; color: var(--muted-fg); font-size: 0.85rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    color: var(--fg);
    font-family: inherit;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.alert { padding: 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-success { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid #22c55e; }
.alert-error { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid #ef4444; }
.alert-info { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid #3b82f6; }

/* Online counter */
.online-counter { text-align: center; padding: 1rem; color: var(--muted-fg); font-size: 0.95rem; }

/* Chat Window */
.chat-container { position: fixed; bottom: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.chat-window {
    width: 320px; max-width: calc(100vw - 40px);
    height: 420px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}
.chat-window.minimized { height: 50px; }
.chat-window.minimized .chat-messages, .chat-window.minimized .chat-input { display: none; }
.chat-header {
    padding: 0.75rem 1rem;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.chat-name { flex: 1; font-weight: 600; font-size: 0.95rem; }
.online-indicator { font-size: 0.75rem; opacity: 0.9; }
.chat-header button { background: rgba(255,255,255,0.3); border: none; color: white; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 1rem; }
.chat-header button:hover { background: rgba(255,255,255,0.5); }
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.chat-empty { text-align: center; padding: 2rem; color: var(--muted-fg); }
.chat-empty img { width: 60px; height: 60px; border-radius: 50%; margin-bottom: 0.5rem; }
.msg { display: flex; gap: 0.5rem; align-items: flex-end; }
.msg-user { justify-content: flex-end; }
.msg-user .msg-bubble { background: var(--chat-user-bg); color: var(--chat-user-fg); margin-left: auto; }
.msg-bot .msg-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.msg-bubble { max-width: 80%; padding: 0.6rem 1rem; border-radius: 1rem; font-size: 0.95rem; }
.bot-bubble { background: var(--chat-bot-bg); color: var(--chat-bot-fg); }
.typing-indicator { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; }
.typing-indicator img { width: 28px; height: 28px; border-radius: 50%; }
.typing-dots { display: flex; gap: 4px; }
.typing-dots span { width: 8px; height: 8px; background: var(--muted-fg); border-radius: 50%; animation: typing 1.4s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }
.chat-input { padding: 0.75rem; display: flex; gap: 0.5rem; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; padding: 0.6rem 1rem; border: 1px solid var(--border); border-radius: 2rem; background: var(--muted); color: var(--fg); font-family: inherit; }
.chat-input input:focus { outline: none; border-color: var(--primary); }
.chat-input button { padding: 0.6rem 1rem; background: var(--gradient-primary); color: white; border: none; border-radius: 2rem; cursor: pointer; font-size: 1rem; }
