/* Frebroo Web Styles */
/* ألوان وتصميم فريبرو */

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

:root {
    /* 🎨 Frebroo Brand Colors - VK Sky Blue Gradient */
    --primary: #4A90E2;
    --primary-dark: #2E5F8F;
    --primary-light: #7CB5EC;
    --secondary: #5B9BD5;
    --secondary-light: #9DC3E6;
    --accent: #4FC3F7;
    --accent-secondary: #0288D1;
    
    /* Gradient مميز - VK Style */
    --primary-gradient: linear-gradient(135deg, #4A90E2 0%, #5B9BD5 100%);
    --secondary-gradient: linear-gradient(135deg, #5B9BD5 0%, #0288D1 100%);
    --accent-gradient: linear-gradient(135deg, #4FC3F7 0%, #4A90E2 100%);
    
    /* Success, Warning, Error */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    
    /* Default (Dark) Theme */
    --bg-dark: #0A0A0A;
    --bg-grey: #141414;
    --bg-card: #1E1E1E;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-tertiary: #808080;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --shadow: rgba(0, 0, 0, 0.4);
    --hover-overlay: rgba(74, 144, 226, 0.08);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Dark Theme (explicit) */
[data-theme="dark"] {
    --bg-dark: #0A0A0A;
    --bg-grey: #141414;
    --bg-card: #1E1E1E;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-tertiary: #808080;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --shadow: rgba(0, 0, 0, 0.4);
    --hover-overlay: rgba(74, 144, 226, 0.08);
}

/* Light Theme */
[data-theme="light"] {
    --bg-dark: #FFFFFF;
    --bg-grey: #F9FAFB;
    --bg-card: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --border-color: #E5E7EB;
    --border-strong: #D1D5DB;
    --shadow: rgba(0, 0, 0, 0.1);
    --hover-overlay: rgba(255, 107, 157, 0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Cairo', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.98) 0%, rgba(20, 20, 30, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 144, 226, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
    transition: all 0.3s ease;
}

.navbar .container,
.navbar .nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    text-decoration: none;
}

.navbar-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(74, 144, 226, 0.4));
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-logo:hover .navbar-logo-img {
    transform: scale(1.1) rotate(-5deg);
    filter: drop-shadow(0 4px 16px rgba(74, 144, 226, 0.6));
}

.nav-logo h1 {
    font-size: 28px;
    color: var(--primary);
    margin: 0;
}

.logo-subtitle {
    display: none; /* إخفاء كلمة Frebroo */
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px 18px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background-color: rgba(74, 144, 226, 0.1);
}

.unread-badge {
    position: absolute;
    top: 5px;
    right: -8px;
    background: linear-gradient(135deg, #ff4757, #ff6348);
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(255, 71, 87, 0.6);
    }
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-upload {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 11px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-upload::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-upload:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(74, 144, 226, 0.5);
}

.btn-upload:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-signup {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s;
}

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

/* Main Content */
.main-content {
    display: flex;
    gap: 30px;
    padding: 30px 0;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-section {
    background-color: var(--bg-grey);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.sidebar-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.sidebar-hint {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.btn-login-small {
    width: 100%;
    padding: 10px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-login-small:hover {
    background-color: var(--primary-dark);
}

.hashtag-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hashtag-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.hashtag-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.hashtag-icon {
    font-size: 24px;
}

.hashtag-info {
    display: flex;
    flex-direction: column;
}

.hashtag-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.hashtag-views {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Video Feed */
.video-feed {
    flex: 1;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

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

.feed-tabs {
    display: flex;
    gap: 10px;
}

.tab-btn {
    padding: 10px 20px;
    background-color: transparent;
    color: #FFFFFF; /* أبيض */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   WORLD-CLASS VIDEO CARDS DESIGN
   Similar to Instagram Reels & TikTok
   ============================================ */

/* Video Grid */
.video-grid, .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding: 0;
}

@media (min-width: 768px) {
    .video-grid, .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

/* Video Card Container */
.video-card {
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 9/16;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 
                0 0 0 2px rgba(255, 59, 92, 0.4);
}

/* Thumbnail Image */
.video-card img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-card:hover img {
    transform: scale(1.05);
}

/* Video Placeholder */
.video-placeholder {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    font-size: 48px;
}

/* Duration Badge - Top Right */
.video-duration {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    z-index: 3;
    letter-spacing: 0.5px;
}

/* Bottom Overlay - Gradient Always Visible */
.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 14px 14px;
    background: linear-gradient(to top, 
                rgba(0, 0, 0, 0.9) 0%, 
                rgba(0, 0, 0, 0.7) 40%, 
                rgba(0, 0, 0, 0.3) 70%,
                transparent 100%);
    color: white;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.video-card:hover .video-overlay {
    padding-bottom: 18px;
}

/* User Info Section */
.video-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    z-index: 3;
}

.video-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    background: linear-gradient(135deg, #FF3B5C 0%, #FF6B85 50%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: white;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 
                0 0 0 3px rgba(0, 0, 0, 0.2);
    position: relative;
}

.video-user-avatar::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.6), rgba(168, 85, 247, 0.6));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .video-user-avatar {
    transform: scale(1.15) rotate(5deg);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 16px rgba(255, 59, 92, 0.6), 
                0 0 0 3px rgba(255, 59, 92, 0.3);
}

.video-card:hover .video-user-avatar::before {
    opacity: 1;
}

.video-user-details {
    flex: 1;
    min-width: 0;
}

/* Make text-based avatars look better */
.video-user-avatar:not(:has(img)) {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

.video-user {
    font-weight: 700;
    color: white;
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.3;
}

.video-user:hover {
    color: var(--primary);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #1DA1F2, #0d8bd9);
    border-radius: 50%;
    color: white;
    font-size: 10px;
    flex-shrink: 0;
}

/* Caption */
.video-caption,
.video-card-caption {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin: 6px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Stats Section */
.video-card-stats,
.video-stats {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin-top: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: auto;
    transition: all 0.2s ease;
}

.stat-item:hover {
    transform: scale(1.1);
}

/* Old format support */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.video-info {
    padding: 15px;
}

/* Footer */
.footer {
    background-color: var(--bg-grey);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.footer-section p,
.footer-section a {
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s;
}

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

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

/* Like Button */
.like-btn {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.like-btn:hover {
    transform: scale(1.15);
}

.like-btn.liked {
    color: #ff3b5c;
}

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

/* Play Button Overlay */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.video-card:hover .play-button {
    opacity: 0.9;
}

/* Avatar Image Support */
.user-avatar img,
.video-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #1a1a1a;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* User Text Support */
.user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.user-fullname {
    font-size: 14px;
    font-weight: 700;
}

.user-username {
    font-size: 12px;
    opacity: 0.8;
}

/* Duration Chip Alias */
.video-duration-chip {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    z-index: 3;
    letter-spacing: 0.5px;
}

/* Modals */
.auth-modal,
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    z-index: 1001;
    display: flex;
    gap: 0;
}

/* Modal Sections */
.modal-video-section {
    flex: 1;
    min-width: 0;
    background: black;
    border-radius: 16px 0 0 16px;
}

.modal-comments-section {
    width: 400px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    border-radius: 0 16px 16px 0;
}

/* Comments Header */
.comments-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.comments-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Comments List */
.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    max-height: calc(90vh - 180px);
}

.comments-loading,
.comments-empty,
.comments-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.comments-error {
    color: var(--error);
}

/* Comment Item */
.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

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

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img,
.comment-avatar .avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-avatar .avatar-placeholder {
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

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

.comment-user {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-time {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: auto;
}

.comment-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    word-wrap: break-word;
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-like-btn,
.comment-reply-btn,
.comment-delete-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    transition: var(--transition);
}

.comment-like-btn:hover,
.comment-reply-btn:hover {
    color: var(--primary);
    background: var(--hover-overlay);
}

.comment-like-btn.liked {
    color: var(--primary);
}

.comment-delete-btn:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.comment-likes-count {
    font-weight: 500;
}

/* Reply indicator */
.reply-indicator {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--hover-overlay);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.reply-indicator strong {
    color: var(--primary);
}

.reply-indicator button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.reply-indicator button:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* Replies container */
.replies-container {
    margin-top: 12px;
    padding-left: 40px;
    border-left: 2px solid var(--border-color);
}

.reply-item {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.reply-item:hover {
    background: var(--hover-overlay);
}

.view-replies-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 0;
    margin-top: 8px;
    transition: var(--transition);
}

.view-replies-btn:hover {
    opacity: 0.8;
}

.no-replies {
    padding: 12px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
    font-style: italic;
}

/* Comment Input */
.comment-input-wrapper {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-dark);
    position: relative;
}

/* Emoji Picker */
.emoji-picker-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-picker-btn:hover {
    background: var(--hover-overlay);
}

.emoji-picker-popup {
    position: absolute;
    bottom: 100%;
    left: 50px;
    width: 320px;
    max-height: 350px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    flex-direction: column;
}

.emoji-picker-popup.show {
    display: flex;
}

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

.emoji-picker-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.emoji-picker-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.emoji-picker-close:hover {
    background: var(--hover-overlay);
    color: var(--text-primary);
}

.emoji-picker-grid {
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    overflow-y: auto;
    max-height: 280px;
}

.emoji-item {
    font-size: 24px;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.emoji-item:hover {
    background: var(--hover-overlay);
    transform: scale(1.2);
}

.comment-user-avatar {
    flex-shrink: 0;
}

.comment-user-avatar img,
.comment-user-avatar .avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-user-avatar .avatar-placeholder {
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

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

.comment-input:focus {
    border-color: var(--primary);
    background: var(--bg-grey);
}

.comment-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comment-submit-btn {
    background: var(--primary-gradient);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.comment-submit-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.comment-submit-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        max-width: 95%;
        max-height: 95vh;
    }
    
    .modal-video-section {
        border-radius: 16px 16px 0 0;
    }
    
    .modal-comments-section {
        width: 100%;
        max-height: 40vh;
        border-left: none;
        border-top: 1px solid var(--border-color);
        border-radius: 0 0 16px 16px;
    }
    
    .comments-list {
        max-height: calc(40vh - 130px);
    }
}

/* Form styles */
input[type="text"],
input[type="email"],
input[type="password"] {
    font-family: inherit;
}

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

/* User Menu في الـ Navbar - تصميم احترافي */
.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 8px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.user-menu-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.user-menu-trigger:hover::before {
    left: 100%;
}

.user-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 59, 92, 0.3);
}

.user-menu-trigger:active {
    transform: translateY(0);
}

.user-avatar-small {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.user-menu-trigger:hover .user-avatar-small {
    transform: scale(1.05);
    box-shadow: 0 3px 12px rgba(255, 59, 92, 0.4);
}

.user-avatar-small img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

#navUserName {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-trigger svg {
    transition: transform 0.3s;
    opacity: 0.7;
}

.user-menu-trigger:hover svg {
    opacity: 1;
}

.user-dropdown.show + .user-menu-trigger svg {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98) 0%, rgba(30, 30, 30, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    min-width: 240px;
    padding: 12px;
    display: none;
    z-index: 1000;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 14px;
    height: 14px;
    background: rgba(20, 20, 20, 0.98);
    border-left: 1.5px solid rgba(255, 255, 255, 0.1);
    border-top: 1.5px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

.user-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    margin-bottom: 4px;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s;
}

.dropdown-item:hover::before {
    left: 100%;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
    padding-right: 20px;
}

.dropdown-item:active {
    transform: translateX(2px) scale(0.98);
}

.dropdown-item.logout {
    color: var(--primary);
    margin-bottom: 0;
}

.dropdown-item.logout:hover {
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.15) 0%, rgba(255, 59, 92, 0.25) 100%);
    box-shadow: inset 0 0 20px rgba(255, 59, 92, 0.1);
}

.dropdown-item.admin-only {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.dropdown-item.admin-only:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateX(-2px);
}

.dropdown-item.admin-only svg {
    stroke: #667eea;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 10px 0;
    position: relative;
}

.dropdown-divider::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);
}

.dropdown-item svg {
    flex-shrink: 0;
    opacity: 0.9;
    transition: all 0.3s;
}

.dropdown-item:hover svg {
    opacity: 1;
    transform: scale(1.1);
}

.dropdown-item.logout svg {
    color: var(--primary);
}

.dropdown-item span {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .nav-menu {
        display: none;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .auth-form {
        padding: 30px 20px;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* ============================================
   BUTTON STYLES (for both themes)
   ============================================ */

/* Primary Buttons */
.btn-login,
.btn-signup,
.btn-upload,
.btn-primary {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-login,
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 59, 92, 0.2);
}

.btn-login:hover,
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.3);
}

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

.btn-signup:hover {
    background: var(--hover-overlay);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-upload {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 59, 92, 0.2);
}

.btn-upload:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.3);
}

.btn-login-small {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: var(--primary);
    color: white;
    transition: all 0.3s ease;
}

.btn-login-small:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Light Theme Button Enhancements */
[data-theme="light"] .btn-login,
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-upload {
    box-shadow: 0 2px 8px rgba(255, 59, 92, 0.15);
}

[data-theme="light"] .btn-login:hover,
[data-theme="light"] .btn-primary:hover,
[data-theme="light"] .btn-upload:hover {
    box-shadow: 0 4px 16px rgba(255, 59, 92, 0.25);
}

[data-theme="light"] .btn-signup {
    border-color: var(--border-strong);
    background: var(--bg-card);
}

[data-theme="light"] .btn-signup:hover {
    background: var(--bg-grey);
    border-color: var(--primary);
}

/* ============================================
   LIGHT THEME ENHANCEMENTS
   ============================================ */

/* Cards and Containers */
[data-theme="light"] .sidebar,
[data-theme="light"] .video-feed,
[data-theme="light"] .sidebar-section,
[data-theme="light"] .feed-header {
    background: var(--bg-card);
    box-shadow: 0 1px 3px var(--shadow);
}

/* Navigation */
[data-theme="light"] .navbar {
    background: var(--bg-card);
    box-shadow: 0 2px 8px var(--shadow);
}

/* Dropdown Menu */
[data-theme="light"] .user-dropdown {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow);
}

[data-theme="light"] .dropdown-item:hover {
    background: var(--bg-grey);
}

/* Sidebar */
[data-theme="light"] .hashtag-item {
    background: var(--bg-grey);
}

[data-theme="light"] .hashtag-item:hover {
    background: var(--bg-dark);
    border-color: var(--primary);
}

/* Tabs */
[data-theme="light"] .tab-btn {
    color: var(--text-secondary);
}

[data-theme="light"] .tab-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

[data-theme="light"] .tab-btn:hover {
    color: var(--text-primary);
}

/* Video Grid and Cards - Better visibility in light mode */
[data-theme="light"] .video-grid {
    gap: 16px;
}

/* Footer */
[data-theme="light"] .footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

/* Input Fields */
[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
    background: var(--bg-grey);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.1);
}

/* Scrollbar for Light Theme */
[data-theme="light"] ::-webkit-scrollbar {
    width: 12px;
    background: var(--bg-grey);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 6px;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ============================================
   PREMIUM DROPDOWN MENU
   ============================================ */

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--hover-overlay);
    border: 1px solid var(--border-color);
}

.user-menu-trigger:hover {
    background: var(--bg-grey);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.user-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    min-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.1), rgba(0, 217, 255, 0.1));
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: 3px solid var(--bg-card);
}

.dropdown-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-username {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.dropdown-email {
    font-size: 13px;
    color: var(--text-secondary);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--hover-overlay);
}

.dropdown-item:active {
    transform: scale(0.98);
}

.dropdown-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.dropdown-item.logout {
    color: var(--error);
    border-top: 1px solid var(--border-color);
}

.dropdown-item.logout:hover {
    background: rgba(244, 67, 54, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* Light Theme Dropdown Enhancements */
[data-theme="light"] .user-menu-trigger {
    background: var(--bg-card);
    box-shadow: 0 2px 8px var(--shadow);
}

[data-theme="light"] .user-menu-trigger:hover {
    box-shadow: 0 4px 12px var(--shadow);
}

[data-theme="light"] .user-dropdown {
    background: var(--bg-card);
    box-shadow: 0 12px 48px var(--shadow);
}

[data-theme="light"] .dropdown-header {
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.05), rgba(0, 217, 255, 0.05));
}

[data-theme="light"] .dropdown-item:hover {
    background: var(--bg-grey);
}

[data-theme="light"] .dropdown-item.logout:hover {
    background: rgba(244, 67, 54, 0.08);
}

/* ============================================
   PREMIUM ICONS & BUTTONS
   ============================================ */

/* Icon Wrapper */
.icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hover-overlay);
    transition: all 0.3s ease;
}

.icon-wrapper:hover {
    background: var(--primary);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.3);
}

.icon-wrapper:hover svg {
    color: white;
}

[data-theme="light"] .icon-wrapper {
    background: var(--bg-grey);
}

[data-theme="light"] .icon-wrapper:hover {
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.25);
}

/* Enhanced Button Styles */
button,
.button {
    position: relative;
    overflow: hidden;
}

button::before,
.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before,
.button:active::before {
    width: 300px;
    height: 300px;
}

/* Primary Button Enhanced */
.btn-login,
.btn-primary,
.btn-upload {
    position: relative;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 16px rgba(255, 59, 92, 0.25);
    border: none;
}

.btn-login:hover,
.btn-primary:hover,
.btn-upload:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 6px 24px rgba(255, 59, 92, 0.4);
    transform: translateY(-2px);
}

.btn-login:active,
.btn-primary:active,
.btn-upload:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 59, 92, 0.3);
}

/* Secondary Button Enhanced */
.btn-signup {
    position: relative;
    background: var(--bg-card);
    border: 2px solid var(--border-strong);
    box-shadow: 0 2px 8px var(--shadow);
}

.btn-signup:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.05), rgba(0, 217, 255, 0.05));
    box-shadow: 0 4px 16px var(--shadow);
    transform: translateY(-2px);
}

/* Small Buttons */
.btn-login-small {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 2px 8px rgba(255, 59, 92, 0.2);
    border: none;
}

.btn-login-small:hover {
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.3);
    transform: translateY(-1px) scale(1.02);
}

/* Icon Buttons */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hover-overlay);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.3);
}

.icon-btn:hover svg {
    color: white;
}

/* Light Theme Button Enhancements */
[data-theme="light"] .btn-login,
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-upload {
    box-shadow: 0 4px 16px rgba(255, 59, 92, 0.2);
}

[data-theme="light"] .btn-login:hover,
[data-theme="light"] .btn-primary:hover,
[data-theme="light"] .btn-upload:hover {
    box-shadow: 0 8px 24px rgba(255, 59, 92, 0.35);
}

[data-theme="light"] .btn-signup {
    background: var(--bg-card);
    box-shadow: 0 2px 8px var(--shadow);
}

[data-theme="light"] .btn-signup:hover {
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.08), rgba(0, 217, 255, 0.08));
    box-shadow: 0 4px 16px var(--shadow);
}

[data-theme="light"] .icon-btn {
    background: var(--bg-grey);
    border-color: var(--border-color);
}

[data-theme="light"] .icon-btn:hover {
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.25);
}

/* ============================================
   PREMIUM SIDEBAR & FEED
   ============================================ */

/* Sidebar Enhancements */
.sidebar {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px var(--shadow);
}

.sidebar-section {
    background: var(--bg-grey);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.sidebar-section h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.sidebar-hint {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 12px;
}

/* Hashtag Items */
.hashtag-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background: var(--hover-overlay);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.hashtag-item:hover {
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.1), rgba(0, 217, 255, 0.1));
    border-color: var(--primary);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.2);
}

.hashtag-icon {
    font-size: 24px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
}

.hashtag-info {
    flex: 1;
}

.hashtag-name {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    font-size: 14px;
}

.hashtag-views {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Feed Header */
.feed-header {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px var(--shadow);
    border: 1px solid var(--border-color);
}

.feed-header h2 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Feed Tabs */
.feed-tabs {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: var(--bg-grey);
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--hover-overlay);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.3);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
}

/* Video Cards */
.video-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-grey);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 59, 92, 0.2);
    border-color: var(--primary);
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.video-card:hover::before {
    opacity: 1;
}

/* ============================================
   EXPLORE PAGE PROFESSIONAL DESIGN
   ============================================ */

/* Explore Container */
.explore-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Explore Header */
.explore-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.explore-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 59, 92, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.explore-title {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    letter-spacing: -1px;
}

.explore-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Search Section */
.search-section {
    position: relative;
    max-width: 700px;
    margin: 0 auto 40px;
}

.search-input {
    width: 100%;
    padding: 18px 60px 18px 24px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px var(--shadow);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(255, 59, 92, 0.2);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    pointer-events: none;
    opacity: 0.5;
}

/* Tabs Container */
.tabs-container {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    padding: 8px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
}

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

.tab-btn {
    flex: 1;
    min-width: 140px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--hover-overlay);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 59, 92, 0.3);
    transform: translateY(-2px);
}

/* Content Sections */
.content-section {
    margin-bottom: 50px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.section-icon {
    font-size: 32px;
}

/* Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

@media (min-width: 768px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Users Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.user-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px 24px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 59, 92, 0.1), transparent);
    transition: left 0.5s;
}

.user-card:hover::before {
    left: 100%;
}

.user-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.user-card-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 800;
    color: white;
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 
                0 0 0 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.user-card-avatar::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.3), rgba(168, 85, 247, 0.3));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-card:hover .user-card-avatar {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 10px 32px rgba(255, 59, 92, 0.4),
                0 0 0 6px rgba(255, 59, 92, 0.2);
    border-color: rgba(255, 255, 255, 1);
}

.user-card:hover .user-card-avatar::after {
    opacity: 1;
}

.user-card-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-card-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.user-card-username {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.user-card-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.user-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

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

.follow-btn {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.3);
}

.follow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 92, 0.4);
}

.follow-btn.following {
    background: var(--bg-grey);
    color: var(--text-primary);
    border: 2px solid var(--border-strong);
}

.follow-btn.following:hover {
    background: var(--hover-overlay);
    border-color: var(--primary);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 2px dashed var(--border-color);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* Light Theme Adjustments */
[data-theme="light"] .explore-header {
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
}

[data-theme="light"] .user-card {
    box-shadow: 0 2px 8px var(--shadow);
}

[data-theme="light"] .user-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .explore-title {
        font-size: 32px;
    }
    
    .explore-subtitle {
        font-size: 16px;
    }
    
    .tabs-container {
        gap: 8px;
        padding: 6px;
    }
    
    .tab-btn {
        min-width: 120px;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .users-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .user-card-avatar {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
}

/* Light Theme Sidebar & Feed */
[data-theme="light"] .sidebar {
    background: var(--bg-card);
    box-shadow: 0 2px 12px var(--shadow);
}

[data-theme="light"] .sidebar-section {
    background: var(--bg-grey);
}

[data-theme="light"] .hashtag-item {
    background: var(--bg-card);
    box-shadow: 0 1px 4px var(--shadow);
}

/* TikTok Player Comments Section */
.tiktok-comments-section {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    z-index: 10001;
}

.tiktok-comments-section.show {
    right: 0;
}

.tiktok-comments-section .comments-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.tiktok-comments-section .comments-close:hover {
    background: var(--hover-overlay);
}

@media (max-width: 768px) {
    .tiktok-comments-section {
        width: 100%;
        right: -100%;
    }
}

[data-theme="light"] .hashtag-item:hover {
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.05), rgba(0, 217, 255, 0.05));
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.15);
}

[data-theme="light"] .feed-header {
    background: var(--bg-card);
    box-shadow: 0 2px 12px var(--shadow);
}

[data-theme="light"] .feed-tabs {
    background: var(--bg-grey);
}

[data-theme="light"] .tab-btn.active {
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.25);
}

[data-theme="light"] .video-card {
    background: var(--bg-card);
    box-shadow: 0 2px 8px var(--shadow);
}

[data-theme="light"] .video-card:hover {
    box-shadow: 0 8px 24px rgba(255, 59, 92, 0.15);
}

/* ============================================
   SIDEBAR SUGGESTED USERS & HASHTAGS
   ============================================ */

/* Suggested Users in Sidebar */
.suggested-users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.suggested-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--hover-overlay);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.suggested-user-card:hover {
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.05), rgba(0, 217, 255, 0.05));
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.15);
}

.user-card-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.user-card-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

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

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

.user-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-username {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-stats-small {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.verified-badge-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #1DA1F2, #00D9FF);
    border-radius: 50%;
    color: white;
    font-size: 9px;
    font-weight: bold;
}

.follow-user-btn {
    padding: 6px 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
}

.follow-user-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.3);
}

.follow-user-btn:active {
    transform: translateY(0);
}

.follow-user-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading state */
.follow-user-btn.loading {
    color: transparent;
    pointer-events: none;
}

.follow-user-btn.loading::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    top: 50%;
    left: 50%;
    margin-left: -7px;
    margin-top: -7px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.5s linear infinite;
}

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

/* Hide button for already following users */
.suggested-user-card.already-following .follow-user-btn {
    display: none;
}

/* Suggested Users Preview (for guests) */
.suggested-users-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.user-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--hover-overlay);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.user-preview-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

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

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

.user-preview-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-preview-stats {
    font-size: 11px;
    color: var(--text-secondary);
}

/* View All Link */
.view-all-link {
    display: block;
    text-align: center;
    padding: 10px;
    margin-top: 12px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    background: rgba(255, 59, 92, 0.05);
    border: 1px solid rgba(255, 59, 92, 0.1);
    transition: all 0.3s ease;
}

.view-all-link:hover {
    background: rgba(255, 59, 92, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}


/* ========================================
   📱 RESPONSIVE DESIGN - Mobile First
   ======================================== */

/* 📱 Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Navbar */
    .navbar-container {
        padding: 0 12px;
    }
    
    .navbar-brand {
        font-size: 20px;
    }
    
    .nav-links {
        display: none; /* Hide on mobile, show hamburger menu */
    }
    
    .nav-right {
        gap: 8px;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* Container */
    .container {
        padding: 0 12px;
    }
    
    /* Video Grid */
    .video-grid, .posts-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 8px;
    }
    
    .video-card {
        border-radius: 8px;
        min-height: 250px;
    }
    
    .video-card-caption {
        font-size: 12px;
        line-height: 1.3;
        -webkit-line-clamp: 2;
    }
    
    .video-card-stats {
        font-size: 11px;
        gap: 8px;
    }
    
    .stat-item {
        font-size: 11px;
    }
    
    /* Profile */
    .profile-header {
        padding: 16px;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
    
    .profile-name {
        font-size: 20px;
    }
    
    .profile-username {
        font-size: 13px;
    }
    
    .profile-stats {
        gap: 16px;
        padding: 16px 0;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* Profile Tabs */
    .profile-tabs {
        gap: 4px;
        padding: 0 8px;
    }
    
    .tab {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    /* Buttons */
    button, .btn {
        font-size: 13px;
        padding: 10px 16px;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
        padding: 20px;
    }
    
    .auth-form {
        padding: 24px 16px;
    }
    
    .auth-form h2 {
        font-size: 22px;
    }
    
    /* Input fields */
    input, textarea {
        font-size: 14px;
        padding: 12px;
    }
    
    /* TikTok Comments */
    .tiktok-comments-section {
        width: 100% !important;
        right: -100%;
    }
    
    .tiktok-comments-section.active {
        right: 0;
    }
    
    .comments-header h3 {
        font-size: 16px;
    }
    
    /* Explore Page */
    .explore-title {
        font-size: 24px;
        padding: 16px;
    }
    
    .category-pills {
        padding: 12px;
        gap: 6px;
    }
    
    .category-pill {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* Search */
    .search-container {
        padding: 12px;
    }
    
    .search-box {
        font-size: 14px;
        padding: 10px 40px 10px 12px;
    }
}

/* 📱 Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .video-grid, .posts-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px;
    }
    
    .navbar-brand {
        font-size: 22px;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
}

/* 💻 Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .video-grid, .posts-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px;
    }
    
    .container {
        padding: 0 24px;
    }
    
    .navbar-container {
        padding: 0 24px;
    }
}

/* 🖥️ Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .video-grid, .posts-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* 🖥️ Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .video-grid, .posts-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 24px;
    }
    
    .container {
        max-width: 1400px;
    }
}

/* 📱 Mobile-specific fixes */
@media (max-width: 767.98px) {
    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }
    
    /* Full width on mobile */
    .mobile-full-width {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Stack elements vertically */
    .mobile-stack {
        flex-direction: column !important;
    }
    
    /* Reduce padding on mobile */
    .mobile-reduce-padding {
        padding: 12px !important;
    }
    
    /* Hide text, show icon only */
    .mobile-icon-only .btn-text {
        display: none;
    }
    
    /* Sidebar */
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 1000;
        transition: left 0.3s ease;
        background: var(--bg-grey);
        border-right: 1px solid var(--border-color);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    /* Main content full width on mobile */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Video player adjustments */
    .video-overlay {
        padding: 12px;
    }
    
    .video-user-info {
        gap: 8px;
    }
    
    .video-user-avatar {
        width: 32px;
        height: 32px;
    }
    
    .video-user-details {
        font-size: 13px;
    }
    
    /* Action buttons */
    .video-card-stats .stat-item {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    /* Play button */
    .play-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    /* Duration badge */
    .video-duration {
        font-size: 11px;
        padding: 3px 6px;
        bottom: 6px;
        right: 6px;
    }
}

/* 🎨 Landscape mode optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
    }
    
    .profile-stats {
        padding: 8px 0;
    }
}

/* 🔄 Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn, button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .tab {
        min-height: 44px;
    }
    
    .stat-item {
        min-height: 44px;
    }
    
    /* Remove hover effects on touch */
    .video-card:hover {
        transform: none;
    }
    
    /* Tap highlight color */
    * {
        -webkit-tap-highlight-color: rgba(255, 107, 157, 0.2);
    }
}

/* 📱 iOS Safe Area */
@supports (padding-top: env(safe-area-inset-top)) {
    .navbar {
        padding-top: env(safe-area-inset-top);
    }
    
    .main-content {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* 🌙 Dark mode media query */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-dark: #0A0A0A;
        --bg-grey: #141414;
        --bg-card: #1E1E1E;
    }
}

/* 🔋 Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

@media (max-width: 767.98px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* 📱 Mobile overlay for sidebar */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

@media (max-width: 767.98px) {
    .mobile-overlay.active {
        display: block;
    }
}

/* ========================================
   📱 Feed Tabs Enhancement
   ======================================== */

.feed-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tab-btn {
    position: relative;
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.tab-btn:hover {
    background: rgba(255, 107, 157, 0.1);
}

.tab-btn.active {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.tab-btn .tab-text {
    position: relative;
    z-index: 1;
}

.tab-btn .tab-indicator {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: transform 0.3s ease;
}

.tab-btn.active .tab-indicator {
    transform: translateX(-50%) scaleX(1);
}

/* Feed Header */
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 4px;
}

.feed-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    transition: all 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .feed-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .feed-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .tab-btn {
        flex: 1;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .tab-btn.active {
        font-size: 16px;
    }
}

/* ============================================
   Hashtags Grid & Cards
   ============================================ */
.hashtags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.hashtag-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hashtag-card:hover {
    background: var(--bg-grey);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.1);
}

.hashtag-icon {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.hashtag-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    word-break: break-word;
}

.hashtag-stats {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hashtag-separator {
    color: var(--border-color);
}

.hashtag-count, .hashtag-views {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .hashtags-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .hashtag-card {
        padding: 16px 12px;
    }
    
    .hashtag-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .hashtag-name {
        font-size: 16px;
    }
    
    .hashtag-stats {
        font-size: 12px;
        flex-direction: column;
        gap: 4px;
    }
    
    .hashtag-separator {
        display: none;
    }
}

/* ============================================
   Theme Toggle Button
   ============================================ */
.theme-toggle-btn {
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.theme-toggle-btn:hover {
    background: rgba(74, 144, 226, 0.2);
    transform: scale(1.1);
}

.theme-toggle-btn svg {
    transition: all 0.3s ease;
}

