/* =========================
   VARIABLES & FONTS
   ========================= */
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/ibmx-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/ibmx-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/ibmx-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/ibmx-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

:root {
    /* Core Palette 244*/
    --primary-h: 244;
    --primary-s: 83%;
    --primary-l: 61%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-hover: hsl(var(--primary-h), var(--primary-s), 55%);
    --primary-light: hsl(var(--primary-h), var(--primary-s), 95%);

    --bg: #f8fafc;
    --surface: #ffffff;
    --sidebar-bg: rgba(255, 255, 255, 0.8);

    /* Text Colors */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-on-primary: #ffffff;

    /* Borders & Dividers */
    --border-color: rgba(0, 0, 0, 0.06);
    --border: 1px solid var(--border-color);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);

    /* Radius */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-blur: blur(12px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);

    /* Semantic Colors */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================
   GLOBAL RESET
   ========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

html,
body {
    overflow-x: hidden;
}

body {
    font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
}

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

[data-lucide],
svg[data-lucide],
.lucide {
    width: 28px !important;
    height: 28px !important;
    display: inline-block;
    vertical-align: middle;
}

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

/* =========================
   COMPONENT: Layout System
   ========================= */
.app-layout {
    display: grid;
    grid-template-columns: 280px 1fr 350px;
    max-width: 1300px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
}

.main-content {
    min-width: 0;
    width: 100%;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

/* =========================
   COMPONENT: Buttons
   ========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    min-height: 38px;
    /* Tap target */
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    gap: 8px;
    font-size: 14px;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

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

.btn-outline:hover {
    background: var(--sidebar-bg);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.btn-round {
    border-radius: 99px;
}

.btn-post {
    padding: 6px 24px !important;
    border-radius: var(--radius-full) !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    box-shadow: var(--shadow-sm);
}

.btn-post:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* =========================
   COMPONENT: Cards & Inputs
   ========================= */
.card {
    background: #fff;
    border: var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition);
}

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

.input {
    width: 100%;
    padding: 12px 16px;
    min-height: 44px;
    background: var(--sidebar-bg);
    border: var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.input:focus {
    border-color: var(--primary);
    background: #fff;
}

/* =========================
   COMPONENT: Sidebar (Left)
   ========================= */
.sidebar-left {
    width: 280px;
    padding: 12px 16px;
    border-left: var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    background: #fff;
    z-index: 100;
    overflow-y: auto;
    scrollbar-width: none;
    align-self: start;
}

.sidebar-left::-webkit-scrollbar {
    display: none;
}

/* --------------------------------------------
   SIDEBAR LEFT (X-Inspired)
--------------------------------------------- */
.sidebar-left {
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
    height: 100vh;
    position: sticky;
    top: 0;
    align-self: start;
    /* Critical for sticky in grid */
}

.sidebar-brand {
    padding: 12px;
    margin-bottom: 4px;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    transition: background 0.2s ease;
    color: var(--primary);
}

.brand-logo:hover {
    background: var(--primary-light);
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;

}

.nav-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 16px;
    border-radius: 99px;
    text-decoration: none;
    color: #536471;
    /* Twitter/X-style muted gray */
    font-size: 20px;
    font-weight: 500;
    transition: background 0.2s ease;
    width: fit-content;
    max-width: 100%;
}

.nav-item:hover {
    background: rgba(15, 20, 25, 0.1);
    color: var(--text-main);
}

.nav-item.active {
    font-weight: 800;
    color: var(--text-main);
}

.nav-item i,
.nav-item svg {
    width: 26px;
    height: 26px;
}

.nav-label {
    margin-right: 4px;
}

/* Post Button (X-Style) */
.sidebar-post-btn {
    margin: 16px 0;
    padding: 16px;
    width: 90%;
    border-radius: 99px;
    font-weight: 800;
    font-size: 17px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

/* Sidebar Footer / User Card */
.sidebar-footer {
    margin-top: auto;
    padding: 12px 0;
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 99px;
    transition: background 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
}

.sidebar-user-card:hover {
    background: rgba(15, 20, 25, 0.1);
}

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

.sidebar-user-info div:first-child {
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info div:last-child {
    font-size: 14px;
    color: var(--text-muted);
}

/* =========================
   COMPONENT: Sidebar (Right)
   ========================= */
.sidebar-right {
    width: 350px;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    background: #fff;
    border-right: var(--border);
    overflow-y: auto;
    scrollbar-width: none;
    align-self: start;
}

.sidebar-right::-webkit-scrollbar {
    display: none;
}

.sidebar-pod {
    background: #f7f9f9;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 4px;
}

.sidebar-pod-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.sidebar-pod-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.sidebar-pod-see-all {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.sidebar-pod-see-all:hover {
    text-decoration: underline;
}

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

.sidebar-person-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sidebar-person-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
    flex: 1;
}

.sidebar-person-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-person-info {
    min-width: 0;
}

.sidebar-person-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-person-username {
    font-size: 13px;
    color: var(--text-muted);
}

.sidebar-footer-links {
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}

.sidebar-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.sidebar-footer-links a:hover {
    text-decoration: underline;
}

.sidebar-copyright {
    padding: 0 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* =========================
   COMPONENT: Feed & Posts
   ========================= */
.feed-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 12px 16px;
    border-bottom: var(--border);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 15px;
}

.feed-header h2 {
    font-size: 18px;
    font-weight: 800;
}

.post-card {
    background: #fff;
    border-bottom: var(--border);
    padding: 16px;
    transition: var(--transition);
}

/* Styles moved to social.css for better responsive control */

.p-header-info {
    display: flex;
    flex-direction: column;
}

.p-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
}

.p-time {
    color: var(--text-muted);
    font-size: 12px;
}

.p-text {
    font-size: 15px;
    line-height: 1.5;
    margin: 8px 0;
}

.p-image-wrap {
    margin-top: 10px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: var(--border);
}

.p-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

.p-footer {
    display: flex;
    justify-content: flex-start;
    border-top: var(--border);
    padding-top: 12px;
    margin-top: 8px;
}

.p-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px 12px;
    min-height: 40px;
    border-radius: 20px;
}

.p-action:hover {
    background: rgba(84, 72, 238, 0.1);
    color: var(--primary);
}

.p-action i,
.p-action svg {
    width: 20px;
    height: 20px;
}

.heart-icon.is-liked {
    color: #f91880 !important;
    fill: #f91880 !important;
}

.dislike-icon.is-disliked {
    color: var(--primary) !important;
    fill: var(--primary) !important;
}

/* =========================
   COMPONENT: Video Player
   ========================= */
.video-player-container {
    position: relative;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    border: var(--border);
}

.p-video {
    width: 100%;
    display: block;
    cursor: pointer;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: var(--transition);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    direction: ltr !important;
    z-index: 50;
}

.video-player-container:hover .video-controls {
    opacity: 1;
}

.progress-bar-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    z-index: 600;
}

.progress-bar-inner {
    height: 100%;
    background: var(--primary);
    width: 0%;
    border-radius: 3px;
    position: absolute;
    top: 0;
    left: 0;
}

.vid-actions {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 15px;
}

.vid-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =========================
   COMPONENT: Reels System
   ========================= */
.reels-page .sidebar-left,
.reels-page .bottom-nav {
    display: none !important;
}

.reels-page .app-layout {
    display: block;
}

.reels-page .main-content {
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000;
    overflow: hidden;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.reels-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    background: #000;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.5);
}

.reels-container::-webkit-scrollbar {
    display: none;
}

.reel-slide {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.reel-content-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    max-height: 100vh;
    max-width: calc(100vh * 9 / 16);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
}

.reel-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.reel-meta-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

.reel-info {
    position: absolute;
    bottom: 60px;
    left: 20px;
    right: 80px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: auto;
    color: #fff;
    z-index: 11;
}

.reel-user-row {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reel-pfp-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    object-fit: cover;
}

.reel-username-text {
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.reel-actions-vertical {
    position: absolute;
    bottom: 60px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    pointer-events: auto;
    z-index: 11;
}

.action-btn-v {
    background: none;
    border: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.action-btn-v i,
.action-btn-v svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.reel-bottom-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    pointer-events: none;
    z-index: 5;
}

/* =========================
   COMPONENT: Modals
   ========================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;

}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.premium-comments-modal,
.premium-notif-modal {
    max-width: 550px;
    height: 600px;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

/* =========================
   COMPONENT: Messaging (Private Chat)
   ========================= */
.chat-layout-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #fff;
    z-index: 1001;
}

.chat-header {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1010;
    height: 64px;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
}

.msg-feed,
.chat-feed {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 20px 16px;
    overflow-y: auto;
}

.bubble,
.msg-bubble {
    position: relative;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.1);
    max-width: 85%;
}

.msg-row.me .msg-bubble {
    background: #dcf8c6;
}

.msg-row.other .msg-bubble {
    background: #fff;
}

/* =========================
   COMPONENT: Auth Pages
   ========================= */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    text-decoration: none;
}

.auth-logo .brand-name {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.auth-form-box {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 0;
    /* Remove fixed padding to allow steps to handle it */
    box-shadow: var(--shadow-lg);
    margin: 0 auto;
    width: 100%;
    overflow: visible;
}

.auth-step {
    display: none;
    padding: 40px 32px 48px;
    /* Added more bottom padding */
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: none;
}

.auth-form-box h1 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    text-align: center;
    color: var(--text-main);
}

.auth-form-box p.text-muted {
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.auth-foot {
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

.auth-foot a {
    color: var(--primary);
    font-weight: 700;
}

.field-error {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
    display: none;
}

.auth-error-msg {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
    display: none;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-step.exiting {
    display: block;
    animation: fadeOut 0.2s ease forwards;
}

.auth-modal-content {
    max-width: 440px;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    position: relative;
    display: block;
    /* Override flex if parent centers it */
}

.modal-close-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b !important;
    cursor: pointer;
    transition: var(--transition);
    z-index: 110;
}

.modal-close-circle svg,
.modal-close-circle svg * {
    stroke: #64748b !important;
    fill: none !important;
}

.modal-close-circle:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}


.modal-close-circle:hover svg,
.modal-close-circle:hover svg * {
    stroke: #fff;
}

/* Fix password toggle icons and modal ghost buttons */
#authModal button[onclick*="toggleAuthPassword"],
#authModal button[onclick*="toggleAuthRegPassword"],
.modal-overlay .btn-ghost {
    color: #64748b !important;
}

#authModal button[onclick*="toggleAuthPassword"] svg,
#authModal button[onclick*="toggleAuthPassword"] svg *,
#authModal button[onclick*="toggleAuthRegPassword"] svg,
#authModal button[onclick*="toggleAuthRegPassword"] svg *,
.modal-overlay .btn-ghost svg {
    stroke: #64748b !important;
    fill: none !important;
}


@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.modal-close-circle:hover {
    background: #e9ecef;
    color: var(--text-main);
    transform: rotate(90deg);
}

/* Input Groups */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    right: 16px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 16px;
}

.input-with-prefix {
    padding-right: 36px !important;
}

.username-status {
    font-size: 12px;
    margin-top: 6px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.username-status.available {
    color: var(--success);
}

.username-status.taken {
    color: var(--danger);
}

.username-status.checking {
    color: var(--primary);
}

.username-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.username-suggestion-chip {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.username-suggestion-chip:hover {
    background: var(--primary);
    color: #fff;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

.file-upload-label:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* =========================
   COMPONENT: Utilities
   ========================= */
.hidden {
    display: none !important;
}

.block {
    display: block;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.p-1 {
    padding: 8px;
}

.p-2 {
    padding: 16px;
}

.bottom-nav {
    display: none;
    /* Desktop hidden */
}

/* =========================
   COMPONENT: Video Player
   ========================= */
.video-player-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 12px 0;
    cursor: pointer;
    user-select: none;
}

.custom-video {
    width: 100%;
    display: block;
    max-height: 500px;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-player-wrapper:hover .video-controls,
.video-player-wrapper.is-paused .video-controls {
    opacity: 1;
}

.video-progress-wrap {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.seek-bar {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    margin: 0;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    position: relative;
    border-radius: 2px;
}

.video-controls-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.play-toggle,
.mute-toggle,
.fullscreen-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.play-toggle:hover,
.mute-toggle:hover,
.fullscreen-toggle:hover {
    transform: scale(1.1);
}

.play-toggle .icon-pause {
    display: none;
}

.video-player-wrapper.is-playing .play-toggle .icon-play {
    display: none;
}

.video-player-wrapper.is-playing .play-toggle .icon-pause {
    display: block;
}

.video-time {
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 0;
    opacity: 0;
    transition: width 0.3s, opacity 0.3s;
    height: 4px;
    cursor: pointer;
}

.volume-control:hover .volume-slider {
    width: 60px;
    opacity: 1;
}

.big-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    background: rgba(84, 72, 238, 0.8);
    color: #fff;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
    z-index: 5;
}

.video-player-wrapper.is-paused .big-play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* =========================
   RESPONSIVE: Tablet
   ========================= */
@media (max-width: 1024px) {

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

    .sidebar-left {
        width: 88px;
    }

    .nav-label,
    .brand-name,
    .sidebar-footer .sidebar-user-info {
        display: none !important;
    }

    .sidebar-brand,
    .sidebar-footer {
        display: flex;
        justify-content: center;
        padding: 20px 0;
    }

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

    .nav-item svg {
        margin: 0;
    }
}

/* =========================
   RESPONSIVE: Mobile Large
   ========================= */
@media (max-width: 768px) {

    .app-layout {
        display: block;
    }

    .sidebar-left {
        display: none;
    }

    .main-content {
        width: 100% !important;
        margin: 0 !important;
        padding-bottom: 70px;
    }

    .container {
        padding: 0 10px;
    }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        border-top: 1px solid var(--border-color);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding: 0 5px;
    }

    .bottom-nav-item,
    .b-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        flex: 1;
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 700;
        min-height: 50px;
    }

    .bottom-nav-item.active,
    .b-nav-item.active {
        color: var(--primary);
    }

    .feed-filter-bar {
        width: 100%;
        margin: 0 0 15px 0;
        border-radius: 0;
    }

    .filter-tab span {
        display: none;
    }

    .modal-content,
    .premium-comments-modal,
    .premium-notif-modal {
        max-width: 380px;
        width: calc(100% - 32px);
        height: auto;
        max-height: 85vh;
        border-radius: 24px !important;
        position: relative;
        bottom: auto;
        margin: auto;
        animation: authModalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes authModalPop {
        from {
            transform: scale(0.9);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }


    .comment-dropdown-menu {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        padding-bottom: 30px !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2) !important;
        animation: slideUp 0.3s ease-out !important;
        display: flex !important;
    }

    .comment-dropdown-menu button {
        padding: 16px;
        font-size: 16px;
        justify-content: center;
        border-bottom: 1px solid #f0f0f0;
    }

    .pwa-floating-banner {
        bottom: 75px;
        left: 10px;
        right: 10px;
    }
}

/* =========================
   RESPONSIVE: Mobile Small
   ========================= */
@media (max-width: 480px) {


    .feed-header h2 {
        font-size: 16px;
    }

    .p-name {
        font-size: 14px;
    }

    .p-text {
        font-size: 14px;
    }

    .btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .pc-input {
        font-size: 16px;
    }

    .create-post-textarea {
        font-size: 16px;
    }

    .p-avatar {
        width: 38px;
        height: 38px;
    }

    .user-pfp-large {
        width: 44px;
        height: 44px;
    }
}

/* =========================
   RESPONSIVE: Extra Small
   ========================= */
@media (max-width: 360px) {
    .container {
        padding: 0 5px;
    }

    .p-action {
        padding: 6px 8px;
        gap: 4px;
    }

    .p-action span {
        font-size: 11px;
    }

    .bottom-nav-item span {
        font-size: 9px;
    }

    .reel-info {
        left: 10px;
        bottom: 70px;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* =========================
   COMPONENT: Follow List Modal
   ========================= */
.follow-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 12px;
}

.follow-user-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

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

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

.follow-user-name {
    font-weight: 800;
    font-size: 15px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-user-meta {
    font-size: 14px;
    color: var(--text-muted);
}

.follow-user-row .follow-btn {
    flex-shrink: 0;
}

/* Inline City Style */
.profile-handle-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.profile-city-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 14px;
}

.profile-city-inline .profile-city-icon {
    width: 13px !important;
    height: 13px !important;
}

.profile-city-inline a {
    color: inherit;
    text-decoration: none;
}

.profile-city-inline a:hover {
    text-decoration: underline;
}

.p-dot {
    margin: 0 4px;
    opacity: 0.6;
}