/* ============================================================
   Rock-i Community — Dark Glassmorphism Theme
   Complete standalone CSS
   ============================================================ */

/* --- CSS VARIABLES --- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a28;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-tertiary: rgba(255, 255, 255, 0.4);
    --cyan: #E8431E;
    --cyan-glow: rgba(232, 67, 30, 0.18);
    --blue: #F26A3E;
    --red: #ff4757;
    --green: #4CAF50;
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
    --orange: #E8431E;
    --nav-height: 60px;
    --sidebar-left-width: 280px;
    --sidebar-right-width: 320px;
    --bottom-nav-height: 56px;
    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;
    --transition: all 0.2s ease;
}

/* Logo theme switching — white logo for dark, black logo for light */
.logo-dark { display: inline-block; }
.logo-light { display: none; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: inline-block; }

/* ============================================================
   LIGHT MODE THEME
   ============================================================ */

/* Light Mode Variables */
[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e4e6eb;
    --glass-bg: rgba(0, 0, 0, 0.04);
    --glass-bg-hover: rgba(0, 0, 0, 0.08);
    --glass-border: rgba(0, 0, 0, 0.12);
    --glass-border-hover: rgba(0, 0, 0, 0.2);
    --text-primary: #1c1e21;
    --text-secondary: #606770;
    --text-tertiary: #8a8d91;
    --cyan: #D63A15;
    --cyan-glow: rgba(214, 58, 21, 0.12);
    --blue: #E85A30;
    --red: #e4405f;
    --green: #42b72a;
}

/* Theme Toggle Button */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* Light mode specific overrides */
[data-theme="light"] body {
    color-scheme: light;
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #b0b3b8;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #8a8d91;
}

[data-theme="light"] .login-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .top-nav {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nav-search-input {
    color: var(--text-primary);
}
[data-theme="light"] .nav-search-input::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .sidebar-left {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    border-top-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nav-search-input {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="light"] .nav-search-input::placeholder {
    color: var(--text-tertiary);
}

[data-theme="light"] .sidebar-icon,
[data-theme="light"] .nav-icon-img,
[data-theme="light"] .bottom-nav-icon,
[data-theme="light"] .menu-icon,
[data-theme="light"] .widget-icon,
[data-theme="light"] .empty-icon {
    filter: brightness(0) invert(0.3);
}

[data-theme="light"] .sidebar-nav-item.active .sidebar-icon,
[data-theme="light"] .bottom-nav-item.active .bottom-nav-icon {
    filter: brightness(0) saturate(100%) invert(22%) sepia(98%) saturate(3200%) hue-rotate(12deg) brightness(92%) contrast(95%);
}

[data-theme="light"] .nav-user-menu {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .community-modal {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .community-modal-overlay {
    background: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .community-post-menu {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .toast {
    background: #1c1e21;
    color: #ffffff;
}

[data-theme="light"] .modal-container {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .community-create-textarea {
    color: var(--text-primary);
}

[data-theme="light"] .community-create-textarea::placeholder {
    color: var(--text-tertiary);
}

[data-theme="light"] .community-comment-input {
    color: var(--text-primary);
}

[data-theme="light"] .mobile-search-input {
    color: var(--text-primary);
}

[data-theme="light"] .mobile-search-input::placeholder {
    color: var(--text-tertiary);
}

[data-theme="light"] ::selection {
    background: rgba(0, 149, 204, 0.25);
    color: inherit;
}


/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--cyan);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--cyan) var(--bg-primary);
}

::selection {
    background: var(--cyan);
    color: #000;
}


/* ============================================================
   LOGIN SCREEN
   ============================================================ */

.login-screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-image:
        radial-gradient(ellipse at 50% 60%, rgba(0, 212, 255, 0.06) 0%, transparent 60%),
        linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.login-card {
    max-width: 420px;
    width: calc(100% - 32px);
    padding: 48px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    text-align: center;
    backdrop-filter: blur(20px);
}

.login-logo {
    width: 80px;
    margin-bottom: 24px;
}

.login-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
}

.login-google-btn {
    width: 100%;
    height: 48px;
    background: #ffffff;
    color: #1a1a2e;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.login-google-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.login-google-btn img {
    width: 20px;
    height: 20px;
}

.login-back-link {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-top: 24px;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    font-family: var(--font-body);
}

.login-back-link:hover {
    color: var(--cyan);
}


/* ============================================================
   TOP NAVBAR
   ============================================================ */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    height: 32px;
}

.nav-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.nav-search {
    position: relative;
    width: 280px;
    flex-shrink: 1;
    min-width: 160px;
}

.nav-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    opacity: 0.4;
    filter: brightness(0) invert(1);
    pointer-events: none;
}

[data-theme="light"] .nav-search-icon {
    filter: brightness(0);
    opacity: 0.5;
}

.nav-search-input {
    width: 100%;
    height: 40px;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #ffffff;
    padding-left: 42px;
    padding-right: 16px;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.nav-search-input:focus {
    border-color: var(--cyan);
    background: var(--glass-bg-hover);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.nav-icon-btn:hover {
    background: var(--glass-bg-hover);
}

.nav-icon-img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.nav-icon-btn:hover .nav-icon-img {
    opacity: 1;
}

.nav-notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--red);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* User Menu Dropdown */
.nav-user-menu {
    position: absolute;
    top: calc(var(--nav-height) - 4px);
    right: 16px;
    min-width: 260px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.nav-user-menu button,
.nav-user-menu .menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-body);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
}

.nav-user-menu button:hover,
.nav-user-menu .menu-link:hover {
    background: var(--glass-bg-hover);
}

.menu-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    opacity: 0.6;
}

.menu-danger {
    color: var(--red) !important;
}

.nav-user-info {
    padding: 12px 14px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 4px;
}


/* ============================================================
   APP LAYOUT
   ============================================================ */

.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-left-width) 1fr var(--sidebar-right-width);
    min-height: calc(100vh - var(--nav-height));
    padding-top: var(--nav-height);
}


/* ============================================================
   LEFT SIDEBAR
   ============================================================ */

.sidebar-left {
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    padding: 16px 12px;
    border-right: 1px solid var(--glass-border);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    width: 100%;
    text-align: left;
}

.sidebar-nav-item:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.sidebar-nav-item.active {
    background: var(--cyan-glow);
    color: var(--cyan);
}

.sidebar-icon {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(0.7);
    transition: var(--transition);
}

.sidebar-nav-item.active .sidebar-icon {
    filter: brightness(0) saturate(100%) invert(28%) sepia(96%) saturate(2676%) hue-rotate(11deg) brightness(97%) contrast(92%);
}

.sidebar-nav-item:hover .sidebar-icon {
    filter: brightness(0) invert(1);
}

.sidebar-badge {
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--red);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0 6px;
}

.sidebar-divider {
    border: none;
    height: 1px;
    background: var(--glass-border);
    margin: 12px 0;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 14px;
    color: var(--text-tertiary);
    font-size: 12px;
}


/* ============================================================
   RIGHT SIDEBAR
   ============================================================ */

.sidebar-right {
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    padding: 16px 12px;
}

.widget {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}

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

.widget-header h3 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.widget-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    opacity: 0.6;
}

.widget-header .text-btn {
    color: var(--cyan);
    font-size: 13px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.widget-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.widget-app {
    text-align: center;
    padding: 20px;
}

.widget-app-logo {
    width: 48px;
    margin-bottom: 10px;
}

.widget-app p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.widget-app-btn {
    display: inline-block;
    padding: 8px 24px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.widget-app-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--cyan-glow);
}


/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main-content {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 16px;
}

.content-panel {
    animation: fadeIn 0.2s ease;
}

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


/* ============================================================
   CREATE POST PROMPT
   ============================================================ */

.create-post-prompt {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 16px;
}

.create-post-prompt:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.prompt-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.prompt-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prompt-text {
    flex: 1;
    color: var(--text-tertiary);
    font-size: 15px;
}

.prompt-icon {
    width: 22px;
    opacity: 0.4;
    filter: brightness(0) invert(1);
}


/* ============================================================
   FILTER BAR
   ============================================================ */

.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: 8px 18px;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-chip:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--cyan-glow);
    border-color: var(--cyan);
    color: var(--cyan);
}

.chip-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(0.7);
}

.filter-chip.active .chip-icon {
    filter: brightness(0) saturate(100%) invert(73%) sepia(93%) saturate(1352%) hue-rotate(152deg) brightness(101%) contrast(101%);
}


/* ============================================================
   FEED LIST & POST CARDS
   ============================================================ */

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    animation: postCardIn 0.3s ease backwards;
}

.post-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-1px);
}

/* Staggered animation delays */
.post-card:nth-child(1) { animation-delay: calc(1 * 0.05s); }
.post-card:nth-child(2) { animation-delay: calc(2 * 0.05s); }
.post-card:nth-child(3) { animation-delay: calc(3 * 0.05s); }
.post-card:nth-child(4) { animation-delay: calc(4 * 0.05s); }
.post-card:nth-child(5) { animation-delay: calc(5 * 0.05s); }
.post-card:nth-child(6) { animation-delay: calc(6 * 0.05s); }
.post-card:nth-child(7) { animation-delay: calc(7 * 0.05s); }
.post-card:nth-child(8) { animation-delay: calc(8 * 0.05s); }
.post-card:nth-child(9) { animation-delay: calc(9 * 0.05s); }
.post-card:nth-child(10) { animation-delay: calc(10 * 0.05s); }


/* --- Post Header --- */

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 0;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
}

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-avatar-fallback {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.post-author-info {
    display: flex;
    flex-direction: column;
}

.post-author-name {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-time {
    font-size: 13px;
    color: var(--text-tertiary);
}

.post-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.follow-btn-inline {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.follow-btn-inline:not(.following):not(.pending) {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    border: none;
}

.follow-btn-inline.following {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.follow-btn-inline.pending {
    background: transparent;
    border: 1px solid var(--orange);
    color: var(--orange);
}

.more-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.more-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}


/* --- Post Content --- */

.post-content {
    padding: 10px 18px 14px;
    font-size: 15px;
    line-height: 1.65;
    word-break: break-word;
}

.post-hashtag {
    color: var(--cyan);
    cursor: pointer;
    font-weight: 500;
}

.post-hashtag:hover {
    text-decoration: underline;
}

.post-mention {
    color: var(--blue);
    cursor: pointer;
    font-weight: 500;
}


/* --- Post Media Grid --- */

.post-media-grid {
    padding: 0 18px 10px;
}

.post-media-grid.single img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.post-media-grid.double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.post-media-grid.triple {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
}

.post-media-grid.triple > *:first-child {
    grid-row: span 2;
}

.post-media-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
}


/* --- Ride Embed --- */

.ride-embed {
    margin: 0 18px 10px;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ride-stat {
    text-align: center;
}

.ride-val {
    display: block;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--cyan);
}

.ride-unit {
    font-size: 12px;
    color: var(--text-tertiary);
}


/* --- Post Tags --- */

.post-tags {
    padding: 4px 18px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-chip {
    padding: 2px 10px;
    border-radius: 12px;
    background: var(--glass-bg);
    font-size: 12px;
    color: var(--text-secondary);
}


/* --- Post Actions --- */

.post-actions {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding: 0;
}

.post-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.post-action-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.post-action-btn.liked {
    color: var(--red);
}

.post-action-btn .action-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(0.6);
}

.post-action-btn:hover .action-icon {
    filter: brightness(0) invert(1);
}

.post-action-btn.liked .action-icon {
    filter: brightness(0) saturate(100%) invert(42%) sepia(78%) saturate(6000%) hue-rotate(338deg) brightness(100%) contrast(103%);
}

.post-view-count {
    color: var(--text-tertiary);
    font-size: 13px;
    padding-right: 18px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-view-icon {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(0.3);
}


/* ============================================================
   POST MENU (Dropdown)
   ============================================================ */

.post-menu {
    position: absolute;
    right: 0;
    top: 36px;
    min-width: 180px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.post-menu button {
    display: flex;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    gap: 8px;
}

.post-menu button:hover {
    background: var(--glass-bg-hover);
}

.post-menu .danger {
    color: var(--red);
}


/* ============================================================
   MODAL SYSTEM
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    max-width: 560px;
    width: calc(100% - 32px);
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.open .modal-container {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.modal-header h2 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--glass-bg-hover);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}


/* ============================================================
   CREATE POST MODAL
   ============================================================ */

.create-post-textarea {
    width: 100%;
    min-height: 120px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.create-post-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.post-type-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.post-type-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.post-type-btn.active {
    background: var(--cyan-glow);
    border-color: var(--cyan);
    color: var(--cyan);
}

.media-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0;
}

.media-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.media-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.tag-chip-editable {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    background: var(--cyan-glow);
    color: var(--cyan);
    font-size: 13px;
}

.tag-chip-remove {
    background: none;
    border: none;
    color: var(--cyan);
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
    font-family: var(--font-body);
}

.tag-chip-remove:hover {
    opacity: 1;
}

.tag-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    min-width: 80px;
    flex: 1;
}

.create-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

.create-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 13px;
    transition: var(--transition);
}

.create-action-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.create-action-icon {
    width: 18px;
    filter: brightness(0) invert(0.6);
}

.submit-post-btn {
    margin-left: auto;
    padding: 10px 28px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.submit-post-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px var(--cyan-glow);
}

.submit-post-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}


/* ============================================================
   COMMENTS
   ============================================================ */

.comment-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    display: flex;
    gap: 10px;
}

.comment-item.reply {
    margin-left: 52px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
    background: var(--glass-bg);
    padding: 8px 14px;
    border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
}

.comment-author {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.comment-text {
    font-size: 14px;
    line-height: 1.5;
}

.comment-meta {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.comment-meta button {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 12px;
}

.comment-meta button:hover {
    color: var(--cyan);
}

.comment-input-area {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    align-items: center;
}

.comment-input {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.comment-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.comment-input:focus {
    border-color: var(--cyan);
}

.comment-send-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.comment-send-icon {
    width: 16px;
    filter: brightness(0) invert(1);
}

.reply-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--cyan-glow);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--cyan);
}

.reply-indicator button {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    margin-left: auto;
    font-family: var(--font-body);
}


/* ============================================================
   USER PROFILE (Modal + Panel)
   ============================================================ */

.profile-header {
    text-align: center;
    padding: 20px 0;
}

.profile-avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    margin: 0 auto 16px;
    overflow: hidden;
    border: 3px solid var(--cyan);
}

.profile-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 16px 0;
}

.profile-stat {
    text-align: center;
    cursor: pointer;
}

.profile-stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
}

.profile-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.profile-follow-btn {
    padding: 10px 32px;
    border-radius: 24px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.profile-follow-btn.follow {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    border: none;
}

.profile-follow-btn.following {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: var(--text-secondary);
}

.profile-follow-btn.pending {
    background: transparent;
    border: 2px solid var(--orange);
    color: var(--orange);
}

.profile-private-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--text-tertiary);
}


/* ============================================================
   OWN PROFILE
   ============================================================ */

.own-profile-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
}

.own-profile-avatar .avatar-upload-overlay {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    cursor: pointer;
}

.own-profile-avatar:hover .avatar-upload-overlay {
    opacity: 1;
}

.privacy-section {
    margin-top: 24px;
}

.privacy-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}

.privacy-toggle span {
    font-size: 14px;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-switch.active {
    background: var(--cyan);
    border-color: var(--cyan);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #ffffff;
    top: 1px;
    left: 1px;
    transition: var(--transition);
}

.toggle-switch.active::after {
    left: calc(100% - 19px);
}


/* ============================================================
   LEADERBOARD
   ============================================================ */

.leaderboard-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 24px;
    padding: 20px 0;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.podium-item:nth-child(1) {
    order: 2;
}

.podium-item:nth-child(2) {
    order: 1;
}

.podium-item:nth-child(3) {
    order: 3;
}

.podium-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    border: 3px solid var(--gold);
    overflow: hidden;
    margin-bottom: 8px;
}

.podium-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.podium-item:nth-child(2) .podium-avatar {
    border-color: var(--silver);
    width: 48px;
    height: 48px;
}

.podium-item:nth-child(3) .podium-avatar {
    border-color: var(--bronze);
    width: 48px;
    height: 48px;
}

.podium-rank {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
}

.podium-name {
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
}

.podium-distance {
    font-size: 12px;
    color: var(--text-tertiary);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.leaderboard-item:hover {
    background: var(--glass-bg-hover);
}

.leaderboard-rank {
    width: 28px;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-tertiary);
}

.leaderboard-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.leaderboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leaderboard-name {
    flex: 1;
    font-weight: 500;
}

.leaderboard-distance {
    color: var(--cyan);
    font-weight: 600;
}


/* ============================================================
   NOTIFICATIONS
   ============================================================ */

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.notif-item:hover {
    background: var(--glass-bg-hover);
}

.notif-item.unread {
    border-left: 3px solid var(--cyan);
}

.notif-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(0.7);
}

.notif-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.notif-time {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.notif-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.notif-action-btn {
    padding: 4px 14px;
    border-radius: 16px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.notif-action-btn.approve {
    background: var(--cyan-glow);
    color: var(--cyan);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.notif-action-btn.decline {
    background: var(--glass-bg);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}


/* ============================================================
   FOLLOW LIST
   ============================================================ */

.follow-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.follow-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.follow-item-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.follow-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.follow-item-name {
    flex: 1;
    font-weight: 500;
}

.follow-item-btn {
    padding: 6px 18px;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}


/* ============================================================
   SEARCH RESULTS
   ============================================================ */

.search-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.search-user-item:hover {
    background: var(--glass-bg-hover);
}

.search-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.search-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-user-info {
    flex: 1;
}

.search-user-name {
    font-weight: 600;
    font-size: 15px;
}

.search-user-meta {
    font-size: 13px;
    color: var(--text-tertiary);
}


/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}


/* ============================================================
   EMPTY STATES
   ============================================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    width: 56px;
    height: 56px;
    filter: brightness(0) invert(0.15);
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-tertiary);
    font-size: 15px;
}


/* ============================================================
   SHIMMER LOADING
   ============================================================ */

.shimmer-card {
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 16px;
}

.shimmer {
    background: linear-gradient(90deg, var(--glass-bg) 25%, var(--glass-bg-hover) 50%, var(--glass-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.shimmer-circle {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
}

.shimmer-line {
    height: 12px;
    border-radius: 6px;
    margin-top: 8px;
}

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

.shimmer-lines {
    flex: 1;
}


/* ============================================================
   TOAST
   ============================================================ */

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 5000;
    opacity: 0;
    transition: all 0.3s;
    font-size: 14px;
    font-family: var(--font-body);
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ============================================================
   BADGE / VERIFICATION
   ============================================================ */

.badge-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.badge-gold {
    color: var(--gold);
}

.badge-staff {
    color: var(--cyan);
}


/* ============================================================
   TEXT BUTTON
   ============================================================ */

.text-btn {
    background: none;
    border: none;
    color: var(--cyan);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
}

.text-btn:hover {
    text-decoration: underline;
}


/* ============================================================
   PANEL HEADER
   ============================================================ */

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 10;
}

.panel-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
}

.panel-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.panel-back-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.panel-back-btn svg {
    flex-shrink: 0;
}

/* ============================================================
   USER PROFILE PANEL
   ============================================================ */

#panelUserProfile .community-profile-header {
    text-align: center;
    padding: 24px 16px;
}

#panelUserProfile .community-profile-avatar {
    margin: 0 auto 16px;
}

#panelUserProfile .community-profile-stats {
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 0;
    margin: 0 0 16px;
}

#panelUserProfile .community-profile-posts {
    padding: 0 8px;
}

#panelUserProfile .community-profile-posts h4 {
    margin: 16px 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-profile-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    margin-bottom: 20px;
}

.user-profile-cover {
    height: 120px;
    background: linear-gradient(135deg, #E8431E 0%, #F26A3E 50%, #FF8A50 100%);
}

.user-profile-main {
    text-align: center;
    padding: 0 24px 24px;
    margin-top: -50px;
}

.user-profile-avatar-wrap {
    display: inline-block;
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    overflow: hidden;
}

.user-profile-avatar-wrap .community-avatar {
    width: 100px;
    height: 100px;
    font-size: 36px;
}

.user-profile-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin: 12px 0 4px;
    color: var(--text-primary);
}

.profile-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin: 12px 0;
    background: var(--cyan);
    color: #000;
}

.profile-action-btn:hover {
    filter: brightness(1.15);
}

.profile-action-btn.following {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.profile-action-btn.requested {
    background: var(--glass-bg);
    color: var(--text-tertiary);
    border: 1px solid var(--glass-border);
}

.user-profile-stats-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 16px 0 0;
}

.user-stat {
    text-align: center;
    cursor: pointer;
}

.user-stat-val {
    display: block;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.user-stat-lbl {
    font-size: 12px;
    color: var(--text-tertiary);
}

.user-profile-posts-section {
    padding: 0;
}

.user-posts-title {
    font-size: 16px;
    font-weight: 600;
    padding: 16px 0 12px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 16px;
}

[data-theme="light"] .user-profile-avatar-wrap {
    border-color: #fff;
}

/* ============================================================
   POST DETAIL PANEL
   ============================================================ */

#panelPostDetail .community-post-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
}

#panelPostDetail .community-comment-section {
    padding: 16px 0;
}

/* Full-width mode for post detail and user profile panels */
.main-content.main-content--full {
    max-width: none;
    padding: 20px 24px;
}

/* Grid adjusts when right sidebar is hidden */
.app-layout.app-layout--no-right {
    grid-template-columns: var(--sidebar-left-width) 1fr;
}

.detail-back-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: var(--transition);
}
.detail-back-icon:hover {
    background: var(--cyan);
    color: #fff;
    border-color: var(--cyan);
}
.detail-split-layout {
    display: flex;
    gap: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    min-height: calc(100vh - 200px);
}

.detail-split-post {
    flex: 1;
    min-width: 0;
    border-right: 1px solid var(--glass-border);
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    padding-bottom: 20px;
}

.detail-split-engagement {
    width: 420px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
}

.detail-split-engagement .community-comments-section {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.detail-split-engagement .comments-thread {
    padding-bottom: 16px;
}

.detail-split-engagement .community-comment-input {
    border-top: 1px solid var(--glass-border);
    padding: 12px 16px;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: var(--bg-primary);
}

@media (max-width: 900px) {
    .detail-split-layout {
        flex-direction: column;
        min-height: auto;
    }
    .detail-split-post {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        max-height: none;
    }
    .detail-split-engagement {
        width: 100%;
        max-height: none;
    }
}


/* ============================================================
   LOAD MORE
   ============================================================ */

.load-more {
    text-align: center;
    padding: 20px 0;
}

.load-more-btn {
    padding: 10px 32px;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}


/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes postCardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}


/* ============================================================
   BOTTOM NAV (hidden on desktop)
   ============================================================ */

.bottom-nav {
    display: none;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 10px;
    padding: 6px 0;
    transition: var(--transition);
}

.bottom-nav-item.active {
    color: var(--cyan);
}

.bottom-nav-icon {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(0.5);
    transition: var(--transition);
}

.bottom-nav-item.active .bottom-nav-icon {
    filter: brightness(0) saturate(100%) invert(28%) sepia(96%) saturate(2676%) hue-rotate(11deg) brightness(97%) contrast(92%);
}

.bottom-nav-create {
    position: relative;
}

.create-icon {
    width: 28px !important;
    height: 28px !important;
}

.bottom-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 16px);
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--red);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}


/* ============================================================
   MOBILE SEARCH (hidden on desktop)
   ============================================================ */

.mobile-search {
    display: none;
}

.search-icon-sm {
    width: 18px;
    filter: brightness(0) invert(0.5);
}

.mobile-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
}

.mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}


/* ============================================================
   RESPONSIVE — Tablet (max-width: 1200px)
   ============================================================ */

@media (max-width: 1200px) {
    .app-layout {
        grid-template-columns: var(--sidebar-left-width) 1fr;
    }

    .sidebar-right {
        display: none;
    }
}


/* ============================================================
   RESPONSIVE — Tablet Small (max-width: 1024px)
   ============================================================ */

@media (max-width: 1024px) {
    .sidebar-left {
        width: 72px;
        padding: 8px;
    }

    .sidebar-nav-item span {
        display: none;
    }

    .sidebar-nav-item {
        justify-content: center;
        padding: 10px;
    }

    .sidebar-icon {
        width: 24px;
        height: 24px;
    }

    .sidebar-footer {
        display: none;
    }

    .sidebar-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        margin-left: 0;
    }

    .app-layout {
        grid-template-columns: 72px 1fr;
    }
}


/* ============================================================
   RESPONSIVE — Mobile (max-width: 768px)
   ============================================================ */
/* Menu theme toggle button */
.menu-theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.menu-theme-toggle:hover {
    background: var(--glass-bg-hover);
}
.menu-theme-toggle .theme-icon-for-menu {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    filter: none;
}

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 0 12px;
    }

    .nav-center {
        display: none;
    }

    .sidebar-left {
        display: none;
    }

    .sidebar-right {
        display: none;
    }

    .app-layout {
        grid-template-columns: 1fr;
        padding-top: var(--nav-height);
    }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--bottom-nav-height);
        background: rgba(10, 10, 15, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--glass-border);
        align-items: center;
        justify-content: space-around;
        z-index: 1000;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .main-content {
        padding: 12px 12px calc(var(--bottom-nav-height) + 12px);
    }

    .mobile-search {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 16px;
        padding: 10px 14px;
        background: var(--glass-bg);
        border-radius: 20px;
        border: 1px solid var(--glass-border);
    }

    .modal-container {
        max-width: 100%;
        width: 100%;
        max-height: 100vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        margin-top: auto;
    }

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

    .leaderboard-podium {
        gap: 4px;
    }

    .profile-stats {
        gap: 20px;
    }
}


/* ============================================================
   RTL SUPPORT (direction: rtl)
   ============================================================ */

[dir="rtl"] .comment-item.reply {
    margin-left: 0;
    margin-right: 52px;
}

[dir="rtl"] .notif-item.unread {
    border-left: none;
    border-right: 3px solid var(--cyan);
}

[dir="rtl"] .nav-search-icon {
    left: auto;
    right: 14px;
}

[dir="rtl"] .nav-search-input {
    padding-left: 16px;
    padding-right: 42px;
}

[dir="rtl"] .sidebar-badge {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .post-view-count {
    padding-right: 0;
    padding-left: 18px;
}

[dir="rtl"] .submit-post-btn {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .reply-indicator button {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .nav-notif-badge {
    right: auto;
    left: -2px;
}

[dir="rtl"] .post-menu {
    right: auto;
    left: 0;
}

[dir="rtl"] .nav-user-menu {
    right: auto;
    left: 16px;
}

[dir="rtl"] .media-preview-remove {
    right: auto;
    left: 4px;
}

[dir="rtl"] .lightbox-close {
    right: auto;
    left: 20px;
}


/* ============================================================
   RIDE MAP EMBED
   ============================================================ */

.ride-stats-row {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    flex-wrap: wrap;
}

.ride-map-container {
    width: 100%;
    height: 200px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    z-index: 1;
}

.community-ride-embed {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

[data-theme="light"] .ride-map-container {
    border-top: 1px solid var(--glass-border);
}

/* ============================================================
   SEARCH DROPDOWN PANEL
   ============================================================ */

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

[data-theme="light"] .search-dropdown {
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.search-dropdown-section {
    padding: 8px 0;
    border-bottom: 1px solid var(--glass-border);
}

.search-dropdown-section:last-of-type {
    border-bottom: none;
}

.search-dropdown-section h4 {
    padding: 4px 16px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition);
}

.search-dropdown-item:hover {
    background: var(--glass-bg-hover);
}

.search-dropdown-item span {
    font-size: 14px;
    color: var(--text-primary);
}

.search-dropdown-item small {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: auto;
}

.search-excerpt {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-dropdown-loading,
.search-dropdown-empty {
    padding: 20px 16px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 14px;
}

.search-dropdown-expand {
    display: block;
    padding: 12px 16px;
    text-align: center;
    color: var(--cyan);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border-top: 1px solid var(--glass-border);
    transition: var(--transition);
}

.search-dropdown-expand:hover {
    background: var(--cyan-glow);
}

.nav-search {
    position: relative;
}

/* ============================================================
   LEADERBOARD PANEL (Tab view)
   ============================================================ */

#panelLeaderboard .community-leaderboard-list {
    padding: 0;
}

#panelLeaderboard .community-leaderboard-row {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
}

/* ============================================================
   FRIENDS PANEL
   ============================================================ */

.profile-subtabs {
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--glass-border);
}

.profile-subtab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.profile-subtab:hover {
    background: var(--glass-bg-hover);
}

.profile-subtab.active {
    background: var(--cyan-glow);
    color: var(--cyan);
}

#friendsContent .widget-list-item {
    padding: 12px 16px;
}

.widget-follow-btn.decline {
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red);
    padding: 4px 10px;
    margin-left: 4px;
}

/* ============================================================
   SHIMMER LOADING
   ============================================================ */

.shimmer-list {
    padding: 16px;
}

.shimmer-row {
    height: 48px;
    background: linear-gradient(90deg, var(--glass-bg) 25%, var(--glass-bg-hover) 50%, var(--glass-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* ============================================================
   COMPATIBILITY ALIASES — community- prefixed classes
   Used by JS template strings in community.js
   ============================================================ */

/* Modal overlay */
.community-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.community-modal-overlay.open { opacity: 1; pointer-events: auto; }
.community-modal { background: var(--bg-secondary); border: 1px solid var(--glass-border); border-radius: var(--radius-xl); max-width: 560px; width: calc(100% - 32px); max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; transform: translateY(20px); transition: transform 0.3s; }
.community-modal-overlay.open .community-modal { transform: translateY(0); }
.community-modal-body { flex: 1; overflow-y: auto; padding: 20px; }
.community-modal-header { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--glass-border); flex-shrink: 0; }
.community-modal-header h2 { font-family: var(--font-display); font-size: 18px; font-weight: 600; flex: 1; }
.community-modal-close { width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--glass-bg); border: none; color: var(--text-primary); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.community-modal-close:hover { background: var(--glass-bg-hover); }

/* Post cards */
.community-post-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 0; overflow: hidden; transition: var(--transition); cursor: pointer; animation: postCardIn 0.3s ease backwards; }
.community-post-card:hover { border-color: var(--glass-border-hover); transform: translateY(-1px); }
.community-post-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 0; }
.community-post-author { display: flex; align-items: center; gap: 12px; cursor: pointer; flex: 1; }
.community-avatar { width: 42px; height: 42px; border-radius: var(--radius-full); overflow: hidden; flex-shrink: 0; }
.community-avatar img { width: 100%; height: 100%; object-fit: cover; }
.community-avatar-fallback { width: 42px; height: 42px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--cyan), var(--blue)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 16px; flex-shrink: 0; }
.community-author-info { display: flex; flex-direction: column; }
.community-author-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 4px; }
.community-post-time { font-size: 13px; color: var(--text-tertiary); }
.community-post-header-actions { display: flex; align-items: center; gap: 6px; }
.community-follow-btn-inline { padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); background: linear-gradient(135deg, var(--cyan), var(--blue)); color: #fff; border: none; }
.community-follow-btn-inline.following { background: transparent; border: 1px solid var(--glass-border); color: var(--text-secondary); }
.community-follow-btn-inline.pending { background: transparent; border: 1px solid var(--orange); color: var(--orange); }
.community-more-btn { width: 32px; height: 32px; border-radius: var(--radius-full); background: transparent; border: none; color: var(--text-tertiary); cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; position: relative; }
.community-more-btn:hover { background: var(--glass-bg-hover); color: var(--text-primary); }
.community-post-content { padding: 10px 18px 14px; font-size: 15px; line-height: 1.65; word-break: break-word; text-align: start; }
.community-post-content[dir="rtl"] { text-align: right; }
.community-comment-body[dir="rtl"] { text-align: right; }
.community-hashtag { color: var(--cyan); cursor: pointer; font-weight: 500; }
.community-hashtag:hover { text-decoration: underline; }
.community-mention { color: var(--blue); cursor: pointer; font-weight: 500; }
.community-media-grid { padding: 0 18px 10px; }
.community-media-grid.single img { width: 100%; max-height: 600px; object-fit: contain; border-radius: var(--radius-md); background: var(--bg-secondary); }
.community-media-grid.double { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.community-media-grid.triple { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; }
.community-media-grid.triple .community-media-item:first-child { grid-row: span 2; }
.community-media-grid img, .community-media-item img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; }
.community-media-item { position: relative; overflow: hidden; border-radius: var(--radius-sm); }
.community-media-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 18px; border-radius: var(--radius-sm); }
.community-ride-embed { margin: 0 18px 10px; padding: 14px; background: var(--bg-secondary); border-radius: var(--radius-md); display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.community-stat { text-align: center; }
.community-stat-value { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--cyan); }
.community-stat-label { font-size: 12px; color: var(--text-tertiary); }
.community-post-tags { padding: 4px 18px 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.community-tag-chip { padding: 2px 10px; border-radius: 12px; background: var(--glass-bg); font-size: 12px; color: var(--text-secondary); }
.community-post-actions { display: flex; align-items: center; border-top: 1px solid var(--glass-border); padding: 0; }
.community-action-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 0; background: transparent; border: none; color: var(--text-secondary); font-family: var(--font-body); font-size: 14px; cursor: pointer; transition: var(--transition); }
.community-action-btn:hover { background: var(--glass-bg-hover); color: var(--text-primary); }
.community-action-btn.liked { color: var(--red); }
.community-action-btn-sm { padding: 8px 0; font-size: 13px; }
.community-view-count { color: var(--text-tertiary); font-size: 13px; padding-right: 18px; display: flex; align-items: center; gap: 4px; }
.community-like-count { font-weight: 600; }
.community-post-menu { position: absolute; right: 0; top: 36px; min-width: 180px; background: var(--bg-secondary); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 100; }
.community-post-menu button { display: flex; width: 100%; padding: 8px 12px; border: none; background: transparent; color: var(--text-primary); font-family: var(--font-body); font-size: 14px; border-radius: var(--radius-sm); cursor: pointer; align-items: center; gap: 8px; }
.community-post-menu button:hover { background: var(--glass-bg-hover); }
.community-post-menu .danger { color: var(--red); }

/* Badges */
.community-badge { width: 14px; height: 14px; vertical-align: middle; }

/* Shimmer */
.community-shimmer-card { background: var(--glass-bg); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 16px; }
.community-shimmer { background: linear-gradient(90deg, var(--glass-bg) 25%, var(--glass-bg-hover) 50%, var(--glass-bg) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.community-shimmer-circle { width: 42px; height: 42px; border-radius: var(--radius-full); }
.community-shimmer-line { height: 12px; border-radius: 6px; margin-top: 8px; }
.community-shimmer-header { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.community-shimmer-lines { flex: 1; }

/* Create Post modal classes */
.community-create-body { padding: 20px; }
.community-create-author { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.community-create-textarea { width: 100%; min-height: 120px; background: transparent; border: none; color: var(--text-primary); font-family: var(--font-body); font-size: 16px; line-height: 1.6; resize: vertical; outline: none; }
.community-create-textarea::placeholder { color: rgba(255,255,255,0.3); }
.community-post-type-selector { display: flex; gap: 8px; margin-bottom: 16px; }
.community-type-btn { padding: 8px 16px; border-radius: 20px; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-secondary); font-family: var(--font-body); font-size: 13px; cursor: pointer; transition: var(--transition); }
.community-type-btn.active { background: var(--cyan-glow); border-color: var(--cyan); color: var(--cyan); }
.community-media-previews, .community-media-preview { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 12px 0; }
.community-media-preview .community-media-item { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; }
.community-media-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: var(--radius-full); background: rgba(0,0,0,0.7); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.community-tag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.community-tags-input { background: transparent; border: none; color: var(--text-primary); font-size: 14px; outline: none; min-width: 80px; flex: 1; }
.community-create-options { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--glass-border); }
.community-media-upload-btn { display: flex; align-items: center; gap: 6px; background: var(--glass-bg); border: 1px solid var(--glass-border); padding: 8px 14px; border-radius: var(--radius-md); color: var(--text-secondary); cursor: pointer; font-family: var(--font-body); font-size: 13px; transition: var(--transition); }
.community-media-upload-btn:hover { background: var(--glass-bg-hover); color: var(--text-primary); }
.community-submit-btn { margin-left: auto; padding: 10px 28px; border-radius: 20px; background: linear-gradient(135deg, var(--cyan), var(--blue)); color: #fff; font-family: var(--font-body); font-size: 15px; font-weight: 600; border: none; cursor: pointer; transition: var(--transition); }
.community-submit-btn:hover { transform: scale(1.02); box-shadow: 0 4px 15px var(--cyan-glow); }
.community-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Comments */
.community-comments-section { padding: 0 18px 14px; }
.community-comments-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.community-comment { margin-bottom: 16px; }
.community-comment.community-comment-reply { border-left: 2px solid var(--glass-border); padding-left: 8px; }
.comment-row { display: flex; gap: 10px; align-items: flex-start; }
.comment-avatar { flex-shrink: 0; cursor: pointer; }
.comment-content-wrap { flex: 1; min-width: 0; }
.comment-bubble { background: var(--glass-bg); padding: 10px 14px; border-radius: 4px 18px 18px 18px; }
[data-theme="light"] .comment-bubble { background: #f0f2f5; }
.community-comment-author { font-weight: 600; font-size: 13px; color: var(--text-primary); cursor: pointer; display: block; margin-bottom: 2px; }
.community-comment-author:hover { text-decoration: underline; }
.community-comment-body { font-size: 14px; line-height: 1.4; color: var(--text-primary); word-break: break-word; }
.community-comment-time { font-size: 11px; color: var(--text-tertiary); }
.community-comment-actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; padding-left: 4px; font-size: 12px; color: var(--text-tertiary); }
.community-comment-actions button { background: none; border: none; color: var(--text-tertiary); cursor: pointer; font-family: var(--font-body); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.community-comment-actions button:hover { color: var(--cyan); }
.community-comment-actions button.liked { color: #ff4757; }
.community-comment-input-row { display: flex; gap: 10px; padding: 12px 0; align-items: center; }
.community-comment-input { flex: 1; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 10px 16px; color: var(--text-primary); font-family: var(--font-body); font-size: 14px; outline: none; }
.community-comment-input:focus { border-color: var(--cyan); }
.community-send-btn { width: 36px; height: 36px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--cyan), var(--blue)); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; }
.community-reply-indicator { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--cyan-glow); border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 13px; color: var(--cyan); }
.community-reply-indicator button { background: none; border: none; color: var(--text-tertiary); cursor: pointer; margin-left: auto; }
.community-empty-comments { text-align: center; padding: 20px; color: var(--text-tertiary); font-size: 14px; }

/* Profile */
.community-profile-header { text-align: center; padding: 20px 0; }
.community-profile-avatar { width: 100px; height: 100px; border-radius: var(--radius-full); margin: 0 auto 16px; overflow: hidden; border: 3px solid var(--cyan); }
.community-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.community-profile-name { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.community-profile-bio { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.community-profile-model { font-size: 13px; color: var(--text-tertiary); margin-bottom: 16px; }
.community-profile-stats { display: flex; justify-content: center; gap: 32px; margin: 16px 0; }
.community-profile-info { text-align: center; cursor: pointer; }
.community-follow-btn { padding: 10px 32px; border-radius: 24px; font-family: var(--font-body); font-size: 15px; font-weight: 600; cursor: pointer; transition: var(--transition); background: linear-gradient(135deg, var(--cyan), var(--blue)); color: #fff; border: none; margin: 12px auto; display: block; }
.community-follow-btn.following { background: transparent; border: 2px solid var(--glass-border); color: var(--text-secondary); }
.community-follow-btn.pending { background: transparent; border: 2px solid var(--orange); color: var(--orange); }
.community-profile-posts { margin-top: 24px; }

/* Own profile */
.community-own-profile-header { text-align: center; padding: 20px 0; }
.community-own-avatar { position: relative; width: 100px; height: 100px; margin: 0 auto 16px; }
.community-own-avatar img { width: 100%; height: 100%; border-radius: var(--radius-full); object-fit: cover; border: 3px solid var(--cyan); }
.community-avatar-change { position: absolute; inset: 0; border-radius: var(--radius-full); background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; cursor: pointer; }
.community-own-avatar:hover .community-avatar-change { opacity: 1; }
.community-own-email { font-size: 14px; color: var(--text-secondary); }
.community-privacy-section { margin-top: 24px; }
.community-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--glass-border); }
.community-toggle-row span { font-size: 14px; }
.community-toggle-slider { width: 44px; height: 24px; border-radius: 12px; background: var(--glass-bg); border: 2px solid var(--glass-border); position: relative; cursor: pointer; transition: var(--transition); }
.community-toggle-slider.active { background: var(--cyan); border-color: var(--cyan); }
.community-toggle-slider::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 9px; background: #fff; top: 1px; left: 1px; transition: var(--transition); }
.community-toggle-slider.active::after { left: calc(100% - 19px); }

/* Leaderboard modal */
.community-leaderboard-list { display: flex; flex-direction: column; gap: 4px; }
.community-leaderboard-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-md); transition: var(--transition); }
.community-leaderboard-row:hover { background: var(--glass-bg-hover); }
.community-rank { width: 28px; font-family: var(--font-display); font-weight: 700; color: var(--text-tertiary); text-align: center; }
.community-medal { font-size: 20px; width: 28px; text-align: center; }
.community-lb-name { flex: 1; font-weight: 500; }
.community-lb-distance { color: var(--cyan); font-weight: 600; }

/* Follow list modal */
.community-follow-list { display: flex; flex-direction: column; gap: 8px; }
.community-follow-list-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.community-follow-list-user { flex: 1; font-weight: 500; cursor: pointer; }

/* Notification item */
.community-notif-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--radius-md); cursor: pointer; transition: var(--transition); }
.community-notif-item:hover { background: var(--glass-bg-hover); }
.community-notif-item.unread { border-left: 3px solid var(--cyan); }
.community-notif-icon { width: 40px; height: 40px; border-radius: var(--radius-full); overflow: hidden; flex-shrink: 0; }
.community-notif-content { flex: 1; }
.community-notif-text { font-size: 14px; line-height: 1.4; }
.community-notif-time { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.community-clear-notifs-btn { color: var(--cyan); font-size: 14px; cursor: pointer; background: none; border: none; font-family: var(--font-body); }
.community-clear-notifs-btn:hover { text-decoration: underline; }

/* Search */
.community-search-user-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-md); cursor: pointer; transition: var(--transition); }
.community-search-user-card:hover { background: var(--glass-bg-hover); }
.community-search-user-info { flex: 1; }
.community-search-user-name { font-weight: 600; font-size: 15px; }
.community-search-user-model { font-size: 13px; color: var(--text-tertiary); }
.community-search-tab { padding: 8px 18px; border-radius: 20px; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-secondary); font-family: var(--font-body); font-size: 14px; cursor: pointer; transition: var(--transition); }
.community-search-tab.active { background: var(--cyan-glow); border-color: var(--cyan); color: var(--cyan); }

/* Lightbox */
.community-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 3000; display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.community-lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: var(--radius-sm); }
.community-lightbox-close { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; border-radius: var(--radius-full); background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.community-lightbox-close:hover { background: rgba(255,255,255,0.2); }

/* Empty state + hints */
.community-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; }
.community-empty-state p, .community-empty-hint { color: var(--text-tertiary); font-size: 15px; }

/* Load more */
.community-load-more, .community-load-more-btn { display: block; width: 100%; padding: 12px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-md); color: var(--text-secondary); font-family: var(--font-body); font-size: 14px; cursor: pointer; transition: var(--transition); text-align: center; margin-top: 16px; }
.community-load-more:hover, .community-load-more-btn:hover { background: var(--glass-bg-hover); color: var(--text-primary); }

/* Detail loading */
.community-detail-loading { display: flex; align-items: center; justify-content: center; padding: 40px; }
.community-detail-post { padding: 0; }

/* Widget list items */
.widget-list-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.widget-list-item:hover { opacity: 0.85; }
.widget-rank { font-size: 16px; width: 28px; text-align: center; }
.widget-name { flex: 1; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget-value { font-size: 13px; color: var(--cyan); font-weight: 600; white-space: nowrap; }
.widget-follow-btn { padding: 4px 14px; border-radius: 16px; background: var(--cyan-glow); color: var(--cyan); border: 1px solid rgba(0,212,255,0.3); font-family: var(--font-body); font-size: 12px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.widget-follow-btn:hover { background: rgba(0,212,255,0.25); }

/* Mobile compatibility */
@media (max-width: 768px) {
    .community-modal { max-width: 100%; width: 100%; max-height: 100vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; margin-top: auto; }
    .community-ride-embed { grid-template-columns: repeat(2,1fr); }
}

