/* ═══════════════════════════════════════════
   YourOwnBigWorld - Main Stylesheet
   Cosmic Neon Theme - Inspired by logo
   ═══════════════════════════════════════════ */

:root {
    --primary: #00d4ff;
    --primary-dark: #00a8cc;
    --primary-light: #5ce1ff;
    --primary-glow: rgba(0, 212, 255, 0.3);
    --accent: #ff2d78;
    --accent-dark: #d91e63;
    --accent-glow: rgba(255, 45, 120, 0.3);
    --gold: #f0c040;
    --gold-dark: #d4a830;
    --gold-glow: rgba(240, 192, 64, 0.25);
    --neon-purple: #b44dff;
    --neon-purple-glow: rgba(180, 77, 255, 0.3);
    --bg-dark: #050510;
    --bg-body: #08081a;
    --bg-card: rgba(12, 12, 35, 0.85);
    --bg-card-solid: #0c0c23;
    --bg-card-hover: #111133;
    --bg-input: #0a0a20;
    --text-primary: #e8e8f0;
    --text-secondary: #9898b8;
    --text-muted: #5a5a7a;
    --border: rgba(0, 212, 255, 0.12);
    --border-strong: rgba(0, 212, 255, 0.25);
    --success: #00e676;
    --error: #ff4757;
    --warning: #ffa502;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-full: 50px;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.08);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
    --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(180, 77, 255, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(255, 45, 120, 0.02) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

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

img { max-width: 100%; height: auto; }

/* ─── Layout ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-grid {
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    gap: 24px;
    padding: 24px 0;
}

.page-grid.no-sidebar-right { grid-template-columns: 260px 1fr; }
.page-grid.single-column { grid-template-columns: 1fr; max-width: 680px; margin: 0 auto; }

/* ─── Header ─── */
.main-header {
    background: rgba(5, 5, 16, 0.92);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 20px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 212, 255, 0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo-icon {
    font-size: 28px;
    display: none;
}

.logo-img {
    height: 44px;
    width: auto;
    border-radius: 8px;
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-bar { flex: 1; max-width: 480px; }
.search-bar form { position: relative; }

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-bar input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-glow);
    background: rgba(12, 12, 35, 0.9);
}

.search-bar input::placeholder { color: var(--text-muted); }

.main-nav { display: flex; gap: 2px; }

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 16px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: 11px;
    position: relative;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.nav-link i { font-size: 20px; }

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.08);
    text-shadow: 0 0 12px var(--primary-glow);
}

.nav-link .badge { position: absolute; top: 2px; right: 6px; }

.user-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all var(--transition);
    position: relative;
}

.nav-icon-btn:hover {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
    text-shadow: 0 0 10px var(--primary-glow);
}

.badge {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.3;
    box-shadow: 0 0 8px var(--accent-glow);
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.user-menu-btn:hover { background: rgba(0, 212, 255, 0.08); }

.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-strong);
    transition: border-color var(--transition);
}

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

.user-name { font-size: 14px; font-weight: 500; }

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* ─── Dropdowns ─── */
.dropdown { position: relative; }

.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow), 0 0 40px rgba(0, 0, 0, 0.5);
    min-width: 220px;
    z-index: 1001;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.dropdown.open .dropdown-content { display: block; }

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    transition: all var(--transition);
    font-size: 14px;
}

.dropdown-content a:hover {
    background: rgba(0, 212, 255, 0.08);
    color: var(--primary);
}

.dropdown-content hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

.dropdown-header {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-empty { padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 14px; }

.notifications-panel { width: 380px; max-height: 420px; overflow-y: auto; }

.notification-item { flex-direction: column !important; align-items: flex-start !important; gap: 4px !important; }
.notification-item strong { font-size: 13px; }
.notification-item p { font-size: 12px; color: var(--text-secondary); }
.notification-item small { font-size: 11px; color: var(--text-muted); }

/* ─── Alerts ─── */
.alert { padding: 14px 0; font-size: 14px; position: relative; }
.alert .container { display: flex; align-items: center; justify-content: space-between; }

.alert-success { background: rgba(0, 230, 118, 0.1); color: var(--success); border-bottom: 1px solid rgba(0, 230, 118, 0.2); }
.alert-error { background: rgba(255, 71, 87, 0.1); color: var(--error); border-bottom: 1px solid rgba(255, 71, 87, 0.2); }
.alert-warning { background: rgba(255, 165, 2, 0.1); color: var(--warning); border-bottom: 1px solid rgba(255, 165, 2, 0.2); }
.alert-info { background: rgba(0, 212, 255, 0.1); color: var(--primary); border-bottom: 1px solid rgba(0, 212, 255, 0.2); }

.alert-close { background: none; border: none; color: inherit; font-size: 20px; cursor: pointer; padding: 0 4px; opacity: 0.7; }
.alert-close:hover { opacity: 1; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #050510;
    box-shadow: 0 2px 12px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #050510;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--primary-glow);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-accent:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #050510;
    box-shadow: 0 2px 12px var(--gold-glow);
}

.btn-gold:hover {
    color: #050510;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--gold-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 212, 255, 0.06);
    box-shadow: 0 0 12px var(--primary-glow);
}

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 8px 20px;
}

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

.btn-danger { background: var(--error); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Cards ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(12px);
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-glow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 { font-size: 16px; font-weight: 600; }
.card-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; }

/* ─── Forms ─── */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a5a7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--error); margin-top: 4px; }

/* ─── Post Card ─── */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 16px;
    backdrop-filter: blur(12px);
    transition: all var(--transition);
}

.post-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-glow);
}

.post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-strong);
    transition: border-color var(--transition);
}

.post-avatar:hover { border-color: var(--primary); }

.post-meta { flex: 1; }
.post-author { font-weight: 600; font-size: 15px; color: var(--text-primary); }
.post-author:hover { color: var(--primary); }
.post-time { font-size: 12px; color: var(--text-muted); }

.post-content {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 14px;
    word-wrap: break-word;
}

.post-image {
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    max-height: 500px;
    width: 100%;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid var(--border);
}

.post-actions {
    display: flex;
    gap: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition);
    flex: 1;
    justify-content: center;
}

.post-action-btn:hover {
    background: rgba(0, 212, 255, 0.08);
    color: var(--primary);
}

.post-action-btn.liked { color: var(--accent); }
.post-action-btn.liked:hover { background: rgba(255, 45, 120, 0.08); }

/* ─── Post Composer ─── */
.post-composer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
}

.composer-input { display: flex; gap: 12px; margin-bottom: 12px; }

.composer-input textarea {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    resize: none;
    min-height: 80px;
    transition: all var(--transition);
}

.composer-input textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.composer-input textarea::placeholder { color: var(--text-muted); }
.composer-actions { display: flex; align-items: center; justify-content: space-between; }
.composer-tools { display: flex; gap: 4px; }

.composer-tool-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.composer-tool-btn:hover {
    color: var(--gold);
    background: rgba(240, 192, 64, 0.08);
}

/* ─── Comments ─── */
.comments-section { padding-top: 12px; display: none; }
.comments-section.open { display: block; }

.comment { display: flex; gap: 10px; padding: 10px 0; }

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-body {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    flex: 1;
    border: 1px solid var(--border);
}

.comment-author { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.comment-text { font-size: 14px; margin-top: 2px; }
.comment-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.comment-form { display: flex; gap: 10px; margin-top: 10px; }

.comment-form input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 13px;
}

.comment-form input:focus { outline: none; border-color: var(--primary); }

.comment-form button {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #050510;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all var(--transition);
}

.comment-form button:hover {
    background: var(--primary-light);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* ─── Profile Page ─── */
.profile-cover {
    height: 300px;
    background: linear-gradient(135deg, #0a0a2e 0%, #1a0a30 30%, #0a1a3e 60%, #0a0a2e 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}

.profile-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--bg-body), transparent);
}

.profile-info {
    max-width: 1200px;
    margin: -60px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.profile-header { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.profile-avatar-wrapper { position: relative; }

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-body);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.15), var(--shadow);
}

.profile-details { flex: 1; padding-bottom: 8px; }

.profile-display-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-username { color: var(--text-muted); font-size: 16px; margin-bottom: 8px; }
.profile-bio { font-size: 15px; color: var(--text-secondary); max-width: 600px; }
.profile-stats { display: flex; gap: 28px; margin-top: 14px; }
.profile-stat { text-align: center; }

.profile-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.profile-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-actions { display: flex; gap: 8px; padding-bottom: 8px; }

/* ─── Sidebar Widgets ─── */
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    backdrop-filter: blur(12px);
}

.sidebar-widget h3 {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.widget-friend { display: flex; align-items: center; gap: 10px; padding: 8px 0; }

.widget-friend img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.widget-friend-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.widget-friend-status { font-size: 11px; color: var(--text-muted); }

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
    margin-right: 4px;
    box-shadow: 0 0 6px rgba(0, 230, 118, 0.5);
}

/* ─── Messages / Chat ─── */
.chat-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: calc(100vh - 64px);
    max-height: calc(100vh - 64px);
}

.chat-sidebar {
    border-right: 1px solid var(--border);
    overflow-y: auto;
    background: var(--bg-card-solid);
}

.chat-sidebar-header {
    padding: 18px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-sidebar-header h2 { font-size: 18px; }

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

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all var(--transition);
    border-bottom: 1px solid var(--border);
}

.conversation-item:hover, .conversation-item.active {
    background: rgba(0, 212, 255, 0.06);
}

.conversation-item.unread { background: rgba(0, 212, 255, 0.03); }
.conversation-item.unread .conversation-name { font-weight: 700; color: var(--primary-light); }

.conversation-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.conversation-info { flex: 1; min-width: 0; }
.conversation-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }

.conversation-preview {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }

.chat-main { display: flex; flex-direction: column; height: 100%; }

.chat-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card-solid);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(5, 5, 16, 0.5);
}

.message { display: flex; gap: 8px; max-width: 70%; }
.message.sent { margin-left: auto; flex-direction: row-reverse; }

.message-bubble {
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 100%;
    word-wrap: break-word;
}

.message.received .message-bubble {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.message.sent .message-bubble {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #050510;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

.message-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; padding: 0 4px; }
.message.sent .message-time { text-align: right; }

.chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-card-solid);
}

.chat-input-form { display: flex; gap: 10px; align-items: center; }

.chat-input-form input {
    flex: 1;
    padding: 12px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 14px;
}

.chat-input-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.chat-send-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #050510;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition);
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: var(--primary-light);
    box-shadow: 0 0 16px var(--primary-glow);
}

.chat-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 16px;
    flex-direction: column;
    gap: 12px;
}

.chat-empty i { font-size: 48px; opacity: 0.2; color: var(--primary); }

/* ─── Friends Page ─── */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.friend-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all var(--transition);
    backdrop-filter: blur(12px);
}

.friend-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.1);
}

.friend-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid var(--border-strong);
    transition: border-color var(--transition);
}

.friend-card:hover img { border-color: var(--primary); }
.friend-card h4 { font-size: 16px; margin-bottom: 4px; }
.friend-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.friend-card .btn-group { display: flex; gap: 8px; justify-content: center; }

/* ─── Members/Search ─── */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.member-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    backdrop-filter: blur(12px);
}

.member-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.1);
    color: var(--text-primary);
}

.member-card img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 2px solid var(--border-strong);
    transition: all var(--transition);
}

.member-card:hover img {
    border-color: var(--primary);
    box-shadow: 0 0 16px var(--primary-glow);
}

.member-card h4 { font-size: 15px; margin-bottom: 2px; }
.member-card p { font-size: 12px; color: var(--text-muted); }

/* ─── Groups ─── */
.group-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}

.group-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.1);
}

.group-card-cover {
    height: 120px;
    background: linear-gradient(135deg, #0a1a3e, #1a0a30, #0a2a3e);
    background-size: cover;
    background-position: center;
    position: relative;
}

.group-card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(180, 77, 255, 0.1));
}

.group-card-body { padding: 16px; }
.group-card-body h4 { font-size: 16px; margin-bottom: 4px; }
.group-card-body p { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.group-card-meta { font-size: 12px; color: var(--text-muted); }

/* ─── Settings ─── */
.settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    padding: 24px 0;
}

.settings-nav { list-style: none; }

.settings-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.settings-nav a:hover, .settings-nav a.active {
    background: rgba(0, 212, 255, 0.08);
    color: var(--primary);
}

.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    backdrop-filter: blur(12px);
}

.settings-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

/* Color Picker */
.color-picker-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.color-picker-item { display: flex; align-items: center; gap: 12px; }

.color-picker-item input[type="color"] {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: none;
    padding: 3px;
}

.color-picker-item label { font-size: 14px; color: var(--text-secondary); }

/* ─── Auth Pages ─── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px);
    padding: 40px 20px;
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.06), transparent 70%);
    pointer-events: none;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow), 0 0 60px rgba(0, 212, 255, 0.05);
    backdrop-filter: blur(20px);
    position: relative;
}

.auth-card h1 {
    font-size: 28px;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 32px; font-size: 14px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ─── Footer ─── */
.main-footer {
    background: rgba(5, 5, 16, 0.9);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: 60px;
    backdrop-filter: blur(12px);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 12px; }

.footer-links h4 {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    padding: 4px 0;
    transition: color var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ─── Utilities ─── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.page-header { margin-bottom: 24px; }

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p { color: var(--text-muted); font-size: 15px; margin-top: 4px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { font-size: 48px; opacity: 0.2; margin-bottom: 16px; color: var(--primary); }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-secondary); }

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 20px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    letter-spacing: 0.3px;
    text-decoration: none;
}

.tab:hover, .tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.tab a { color: inherit; text-decoration: none; }

.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 24px; }

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition);
}

.pagination a {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.pagination .current {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #050510;
    font-weight: 600;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .page-grid { grid-template-columns: 1fr; }
    .page-grid > *:first-child, .page-grid > *:last-child { display: none; }
    .page-grid > *:nth-child(2) { display: block; }
    .settings-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }

    .search-bar {
        order: 3;
        max-width: 100%;
        flex-basis: 100%;
        margin-top: 8px;
        display: none;
    }

    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-card-solid);
        border-bottom: 1px solid var(--border);
        padding: 16px;
        display: none;
        flex-direction: column;
        z-index: 999;
    }

    .main-nav.open { display: flex; }

    .nav-link {
        flex-direction: row;
        justify-content: flex-start;
        padding: 12px 16px;
        font-size: 14px;
    }

    .mobile-menu-toggle { display: block; }
    .user-name { display: none; }

    .profile-header { flex-direction: column; align-items: center; text-align: center; }
    .profile-avatar { width: 100px; height: 100px; }
    .profile-cover { height: 200px; }

    .chat-container { grid-template-columns: 1fr; }
    .chat-sidebar { display: none; }

    .chat-sidebar.open {
        display: block;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
    }

    .friends-grid { grid-template-columns: 1fr; }
    .members-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .auth-card { padding: 24px; }
    .notifications-panel { width: calc(100vw - 20px); right: -60px; }
}

@media (max-width: 480px) {
    .members-grid { grid-template-columns: 1fr; }
    .post-actions { flex-wrap: wrap; }
    .composer-actions { flex-direction: column; gap: 10px; }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.4); }

/* ─── Loading ─── */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

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

.fade-in { animation: fadeIn 0.3s ease; }

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 5px var(--primary-glow); }
    50% { box-shadow: 0 0 20px var(--primary-glow); }
}
