/* TikTok Style Video Platform CSS */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
     /* Default to dark for app-like feel */
    min-height: 100vh;
    color: #111827;
    overflow-x: hidden;
}

/* Mobile Container */
.container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    position: relative;
    padding-bottom: 60px; /* Space for bottom nav */
}

body.theme-dark {
    background: #020617;
    color: #e5e7eb;
}

body.theme-dark .container {
    background: #020617;
}

body.theme-dark .header {
    background: rgba(15, 23, 42, 0.96);
    border-bottom-color: rgba(15, 23, 42, 0.8);
}

body.theme-dark .header:hover {
    background: rgba(15, 23, 42, 1);
    box-shadow: 0 2px 18px rgba(15, 23, 42, 0.8);
}

body.theme-dark .logo {
    color: #f9fafb;
}

body.theme-dark .bottom-nav {
    background: rgba(15, 23, 42, 0.98);
    border-top-color: rgba(15, 23, 42, 0.9);
}

body.theme-dark .nav-item {
    color: #f0f0f0;
}

body.theme-dark .nav-item:hover {
    color: #f7188f;
    background: rgba(15, 23, 42, 0.8);
}

body.theme-dark .nav-item.active {
    color: #f7188f;
}

body.theme-dark .video-card {
    background: #020617;
}

body.theme-dark .video-overlay-content {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

body.theme-dark .panel-header {
    background: #020617;
    color: #e5e7eb;
}

body.theme-dark .panel-body {
    background: #020617;
}

body.theme-dark .panel-item {
    color: #9ca3af;
}

body.theme-dark .panel-item i {
    color: #9ca3af;
}

body.theme-dark .panel-item:active {
    background: rgba(15, 23, 42, 0.9);
}

body.theme-dark .account-menu-dropdown {
    background: #020617;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.9);
}

body.theme-dark .comment,
body.theme-dark .comment-input-area,
body.theme-dark .comments-drawer {
    background: #0f172a;
    color: #e5e7eb;
}
body.theme-dark button.comment-report{background:#0f172a;color: #c8c8c8;}
body.theme-dark .comment-author {color:#f8006d}
body.theme-dark .comment-input-area{border-top:1px solid #2f2f2f}


body.theme-dark .form-input {
    background: #000000;
    color: #e5e7eb;
    border-color: #8b3346;
}

body.theme-dark .form-input::placeholder {
    color: #6b7280;
}

body.theme-dark .btn.btn-secondary {
    background: #111827;
    color: #e5e7eb;
}

body.theme-dark .btn.btn-primary {
    background: #f70064;
    border-color: #da005c;
}

body.theme-dark .chat-msg {
    background: #0f172a;
    color: #e5e7eb;
}
body.theme-dark .message-footer,
body.theme-dark .message-timestamp {
    color: #cbd5e1;
}
body.theme-dark .notification-item {
    background: #0f172a;
    border-color: #1f2937;
}
body.theme-dark .notification-item:hover {
    background: rgba(15, 23, 42, 0.9);
    border-color: #334155;
}
body.theme-dark .notification-item.unread {
    background: rgba(59, 7, 100, 0.25);
    border-color: #7c3aed;
}
body.theme-dark .notification-title,
body.theme-dark .notification-subtitle,
body.theme-dark .notification-time {
    color: #e5e7eb;
}
body.theme-dark .video-options-modal {
    background: #0f172a;
    border-color: #1f2937;
}
body.theme-dark .video-menu {
    background: #0f172a;
    color: #e5e7eb;
}
body.theme-dark .video-menu .menu-item {
    background: #0f172a;
    color: #e5e7eb;
}
body.theme-dark .video-menu .menu-item:hover {
    background: #111827;
}
body.theme-dark .gift-modal .modal-content {
    background: #0f172a;
    color: #e5e7eb;
    border-color: #1f2937;
}
body.theme-dark .gift-modal .modal-header,
body.theme-dark .gift-modal .modal-footer {
    border-color: #1f2937;
    color: #cbd5e1;
}
body.theme-dark .gift-card {
    border-color: #1f2937;
    color: #e5e7eb;
}
body.theme-dark .gift-card .gift-title,
body.theme-dark .gift-card .gift-price {
    color: #fb7185;
}
body.theme-dark .chat-input-area {
    background: #0f172a;
    border-top-color: #1f2937;
}
body.theme-dark .chat-input {
    background: #0f172a;
    border-color: #334155;
    color: #e5e7eb;
}
body.theme-dark .comment-form {
    background: #0f172a;
    border-top-color: #1f2937;
}
body.theme-dark .comment-input {
    background: #0f172a;
    border-color: #334155;
    color: #e5e7eb;
}
body.theme-dark .start-form {
    background: #0f172a;
    color: #e5e7eb;
    border-color: #1f2937;
}
body.theme-dark .chat-section {
    background: #0f172a;
    border-color: #1f2937;
}
body.theme-dark .chat-header {
    border-bottom-color: #1f2937;
    color: #e5e7eb;
}
body.theme-dark .chat-messages {
    background: #0b1220;
}
body.theme-dark .chat-content {
    background: #0f172a;
    color: #e5e7eb;
    box-shadow: 0 1px 3px rgba(2, 6, 23, 0.6);
}
body.theme-dark .stream-actions {
    background: #0f172a;
    border-color: #1f2937;
}

.chat-msg {
    max-width: 75%;
    margin: 6px 8px;
    padding: 8px 12px;
    border-radius: 14px;
    border: 1px solid #eee;
    background: #f7f7f9;
    color: #222;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.chat-msg.me {
    align-self: flex-end;
    background: rgba(255, 0, 80, 0.06);
    border-color: rgba(255, 0, 80, 0.18);
}
.chat-msg.them {
    align-self: flex-start;
}
body.theme-dark .chat-msg {
    background: #0b1220;
    border-color: #1f2937;
    color: #e5e7eb;
    box-shadow: 0 1px 2px rgba(2, 6, 23, 0.4);
}
body.theme-dark .chat-msg.me {
    background: rgba(251, 113, 133, 0.16);
    border-color: rgba(251, 113, 133, 0.35);
}
body.theme-dark .chat-msg.them {
    background: #0b1220;
    border-color: #1f2937;
}
body.theme-dark .message-footer,
body.theme-dark .message-timestamp {
    color: #cbd5e1;
}
body.theme-dark .card {
    background: #0f172a;
    border-color: #1f2937;
    color: #e5e7eb;
}
body.theme-dark .balance {
    color: #cbd5e1;
}
body.theme-dark .pkg {
    border-color: #334155;
    color: #e5e7eb;
}
body.theme-dark #chatBox {
    background: #0f172a;
    border-color: #1f2937 !important;
    color: #e5e7eb;
}
body.theme-dark .emoji-picker {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e5e7eb !important;
}
body.theme-dark select#gateway {
    background: #0f172a;
    color: #e5e7eb;
    border-color: #334155;
}
/* Settings (Dark Mode) */
body.theme-dark .settings-tabs {
    background: transparent;
}
body.theme-dark .settings-tab-button {
    background: #111827;
    color: #e5e7eb;
}
body.theme-dark .settings-tab-button.active {
    background: #fb7185;
    color: #fff;
}
body.theme-dark .settings-tab-content section {
    background: #020617 !important;
    border-color: #1f2937 !important;
}
body.theme-dark .settings-tab-content h3 {
    color: #e5e7eb;
}
body.theme-dark .settings-tab-content .form-label {
    color: #e5e7eb;
}
body.theme-dark .settings-tab-content .form-input {
    background: #020617;
    border-color: #1f2937;
    color: #e5e7eb;
}
body.theme-dark .settings-tab-content .btn.btn-secondary {
    background: #111827;
    color: #e5e7eb;
}

/* Success message override in dark mode */
body.theme-dark .u-alert-success {
    background: rgba(22, 101, 52, 0.9);
    color: #bbf7d0;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 16px;
}

/* Chat input bar (Dark Mode) */
body.theme-dark .chat-input-bar {
    background: #0f172a;
    border-top-color: #1f2937;
}

body.theme-dark .u-alert-error {
    background: rgba(127, 29, 29, 0.9);
    color: #fee2e2;
}

body.theme-dark .u-alert-success {
    background: rgba(22, 101, 52, 0.9);
    color: #bbf7d0;
}

 

/* Desktop Enhancements */
@media (min-width: 501px) {
    html {
        height: 100%;
    }
    body {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
        min-height: 100vh;
        height: 100%;
        background: #f0f0f0;
    }
    .container {
        height: 100vh;
        max-height: none;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        border-radius: 0;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
    /* Scrollbar Styling */
    .container::-webkit-scrollbar {
        width: 6px;
    }
    .container::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.2);
        border-radius: 3px;
    }
    .container::-webkit-scrollbar-track {
        background: transparent;
    }
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1003;
    transition: all 0.3s ease;
    will-change: transform, opacity;
}

.header:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.header.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: #000;
    text-align: center;
    letter-spacing: -0.5px;
}

.logo i {
    color: #ff0050;
    margin-right: 4px;
}
.logo img {
    height: 45px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(6px 0 #f70051);
    animation: logoShadowX 3s ease-in-out infinite;
}

.logo img:hover {
    animation-play-state: paused;
}

@keyframes logoShadowX {
    0% { filter: drop-shadow(6px 0 #f70051); }
    35% { filter: drop-shadow(3px 0 #f70051); }
    70% { filter: drop-shadow(-4px 0 #f70051); }
    100% { filter: drop-shadow(6px 0 #f70051); }
}

.header-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.header-btn:active {
    background: rgba(0,0,0,0.05);
}

body.theme-dark .header-btn {
    color: #e5e7eb;
    background: transparent;
}

body.theme-dark .header-btn:active {
    background: rgba(15, 23, 42, 0.9);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.breadcrumbs a {
    color: #111827;
    text-decoration: none;
    font-weight: 500;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs .sep {
    color: #9ca3af;
    margin: 0 2px;
}
.breadcrumbs .current {
    color: #6b7280;
    font-weight: 600;
}
body.theme-dark .breadcrumbs {
    color: #9ca3af;
    border-bottom-color: #1f2937;
}
body.theme-dark .breadcrumbs a {
    color: #e5e7eb;
}
body.theme-dark .breadcrumbs .sep {
    color: #64748b;
}
body.theme-dark .breadcrumbs .current {
    color: #cbd5e1;
}

/* Headings tidy */
main h1 {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin: 12px 0;
}
main h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 10px 0;
}
main h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 8px 0;
}

/* Video Feed */
.video-feed {
    padding: 0 14px 60px;
}

.video-feed.video-grid {
    padding: 0 0 60px;
}

/* Video Card (for feed view if needed, but we use grid now) */
.video-card {
    position: relative;
    background: #000;
    height: 100%; /* Fill shorts container height */
    scroll-snap-align: start;
    scroll-snap-stop: always;
    width: 100%;
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
}

.video-container.is-paused .play-overlay {
    opacity: 1;
}
.video-container.is-loading .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 70px;
    height: 70px;
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 30px;
    padding-left: 5px; /* Adjust for play icon center */
}
.spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: diktokSpin 0.8s linear infinite;
}
@keyframes diktokSpin {
    to { transform: rotate(360deg); }
}

/* Placeholder loading overlay for not-yet-loaded cards */
.video-card.placeholder {
    height: 100%;
    background: #000;
}
.video-card.placeholder .video-container {
    width: 100%;
    height: 100%;
    position: relative;
}
.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.infinite-scroll-overlay {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.infinite-scroll-overlay .spinner {
    width: 26px;
    height: 26px;
    border: 3px solid rgba(255, 0, 80, 0.25);
    border-top-color: #ff0050;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0;
}

/* Loading spinner inside overlay */
.play-overlay .spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Video Overlay Content */
.video-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px; /* Extra bottom padding */
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    pointer-events: none;
    z-index: 5;
}

.shorts-username {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    pointer-events: auto;
    cursor: pointer;
}

.video-description {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-music {
    display: flex;
    align-items: center;
    font-size: 14px;
    margin-top: 10px;
}

.video-music i {
    margin-right: 8px;
}

/* Right Side Actions */
.actions-vertical {
    position: absolute;
    right: 8px;
    bottom: 100px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    cursor: pointer;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.action-btn i {
    font-size: 24px;
    margin-bottom: 4px;
    background: rgba(0,0,0,0.1);
    padding: 7px;
    border-radius: 50%;
    transition: transform 0.2s;
}

.action-btn:active i {
    transform: scale(0.9);
}

.action-btn.liked i {
    color: #ff0050;
}

.action-btn.saved i {
    color: #ffd400;
}

.action-count {
    font-size: 12px;
    font-weight: 600;
}

.action-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    border-radius: 50%;
    border: none;
    padding: 0;
}

.action-avatar img, .action-avatar .initial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
}

.plus-icon {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff0050;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1005;
    padding-bottom: env(safe-area-inset-bottom);
    transition: all 0.3s ease;
    will-change: transform, opacity;
}

.bottom-nav:hover {
    background: rgba(255, 255, 255, 0.95);
}

.bottom-nav.hidden {
    transform: translate(-50%, 100%);
    opacity: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    width: 20%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 4px;
}

.nav-item:hover {
    color: #000;
    background: rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: #ff0050;
}

.nav-item.active i {
    transform: scale(1.1);
}

.nav-item.upload-btn i {
    color: #fff;
    background: #000;
    width: 40px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    border-left: 4px solid #ff358d;
    align-items: center;
    border-right: 4px solid #1dfff9;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 0, 80, 0.3);
}

.nav-item.upload-btn:hover i {
    transform: scale(1.1);
}

.nav-badge {
    position: absolute;
    top: 2px;
    right: 18px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #ff0050;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Grid Layout for Profile/Search/Home */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    padding: 1px;
    background: #fff;
    overflow: auto;
}

body.theme-dark .video-grid {
    background: #020617;
}

.video-grid-item {
    position: relative;
    aspect-ratio: 9/16;
    background: #000;
    cursor: pointer;
    overflow: hidden;
    margin: 1px;
    transition: opacity 0.25s ease;
}

.video-grid-item:hover { z-index: 10; }

.video-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.25s ease;
}

.video-grid-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.video-grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.video-grid-item:hover::before { 
    opacity: 1; 
}

.video-grid-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.video-grid-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.video-grid-item.playing img {
    opacity: 0;
}
.video-grid-item.playing video {
    opacity: 1;
}

/* Chat messages */

/* Modal utilities (dark-themed confirm dialogs) */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.modal-card-dark {
    width: min(420px, 90%);
    background: #020617;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.9);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

/* Light theme overrides for modal */
body:not(.theme-dark) .modal-card-dark {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
body:not(.theme-dark) .modal-header-dark {
    border-bottom-color: rgba(0,0,0,0.08);
}
body:not(.theme-dark) .modal-title {
    color: #111827;
}
body:not(.theme-dark) .btn-close-dark {
    color: #333333;
}
body:not(.theme-dark) .modal-actions {
    background: #ffffff;
}

.modal-header-dark {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.modal-title {
    font-weight: 700;
    color: #f9fafb;
}

.btn-close-dark {
    background: transparent;
    border: 0;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
}
.modal-actions {
    display: flex;
    gap: 14px;
    padding: 18px;
    background: #020617;
}

.modal-action-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
}

.btn-gradient-blue {
    background: linear-gradient(135deg,#2b6eff,#4cc3ff);
    color: #fff;
}

.btn-gradient-red {
    background: linear-gradient(135deg,#ff416c,#ff4b2b);
    color: #fff;
}
.icon-26 { font-size:26px; }
.font-600 { font-weight:600; }
.opacity-90 { opacity:0.9; }
.w-100 { width: 100%; }
.icon-16 { font-size: 16px; }
.icon-20 { font-size: 20px; }
.grid-metrics {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    backdrop-filter: none;
    padding: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.video-grid-item:hover .grid-metrics {
    opacity: 1;
    transform: translateY(-2px);
}

.grid-metrics span {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.grid-metrics i {
    font-size: 13px;
}

.notification-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-item.unread {
    border-color: #ff0050;
    background: #fff6fa;
}


/* Feed Tabs */
.feed-tabs {
    display: flex;
    justify-content: space-evenly;
    padding: 10px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 60px; /* Below header */
    z-index: 1002;
}

body.theme-dark .feed-tabs {
    background: #020617;
    border-bottom-color: #111827;
}

body.theme-dark .feed-tab {
    color: #e5e7eb;
}

body.theme-dark .feed-tab.active {
    color: #fb7185;
}

.feed-tab {
    padding: 3px 10px;
    font-weight: 600;
    color: #303030;
    text-decoration: none;
    font-size: 15px;
    margin-bottom: 5px;
    position: relative;
}

.feed-tab.active {
    color: #f70051;
}

.feed-tab.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #ff0050;
    border-radius: 2px;
}

/* Comments Drawer */
.comments-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: #fff;
    border-radius: 12px 12px 0 0;
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.1, 0.7, 0.1, 1);
    display: none;
    flex-direction: column;
}

.comments-drawer.open {
    display: flex;
    transform: translateY(0);
}

.comments-header {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    position: relative;
    color: #333;
}

.close-comments {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    color: #1e1e1e;
}

.comment {
    display: flex;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.comment-delete {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    float: right;
}
.comment-delete:active {
    color: #333;
}

/* Theme: Dark overrides for comments drawer */
body.theme-dark .comments-drawer {
    background: #0f172a;
    border-top: 1px solid #1f2937;
}
body.theme-dark .comments-header {
    color: #e5e7eb;
    border-bottom-color: #1f2937;
}
body.theme-dark .close-comments {
    color: #cbd5e1;
}
body.theme-dark .comments-list {
    color: #e5e7eb;
}
body.theme-dark .comment-text {
    color: #e5e7eb;
}

/* Comments loading indicator */
.comments-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #666;
}
.comments-loading .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: #ff0050;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
body.theme-dark .comments-loading {
    color: #cbd5e1;
}
body.theme-dark .comments-loading .spinner {
    border-color: #334155;
    border-top-color: #fb7185;
}

/* Live banner in sidebar */
.live-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ff0f65;
    border-radius: 10px;
    padding: 5px 20px;
    margin-bottom: 8px;
    text-decoration: none;
}
 
.live-banner .live-label {
    font-weight: 700;
    letter-spacing: 0.3px;
}

.video-container,
.video-container * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.double-tap-heart {
    position: absolute;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%) scale(1);
    font-size: 70px;
    color: #ff0050;
    opacity: 0;
    pointer-events: none;
    animation: doubleTapHeartFade 700ms ease-out forwards;
}

@keyframes doubleTapHeartFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -70%) scale(1.2); }
}

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

.comment-actions .btn.btn-sm {
    padding: 5px 8px;
    font-size: 11px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 200;
    font-size: 10px;
    margin: 5px 0;
}
.comment-actions .btn.btn-sm i {
    font-size: 12px;
    margin: 0;
}

.auth-page-inner {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    padding: 20px 18px 22px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.auth-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 14px;
}

.auth-form .form-group {
    margin-bottom: 10px;
}

.auth-input {
    padding: 7px 10px;
    font-size: 14px;
    border-radius: 10px;
}

.auth-submit {
    width: 100%;
    margin-top: 6px;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 600;
    border-radius: 999px;
}
.comment-actions .btn.btn-sm .count {
    font-size: 12px;
    font-weight: 300;
}

.replies {
    margin-left: 0;
    padding-left: 0;
}

.replies .comment-avatar {
    width: 26px;
    height: 26px;
    margin-right: 8px;
    font-size: 12px;
}

.replies .comment-author {
    font-size: 12px;
}

.replies .comment-text {
    font-size: 13px;
}

.replies .comment-actions {
    gap: 6px;
}

.replies .comment-actions .btn.btn-sm {
    padding: 3px 5px;
    font-size: 10px;
    border-radius: 9px;
    gap: 5px;
}

.replies .comment-actions .btn.btn-sm i {
    font-size: 11px;
}

.replies .comment-actions .btn.btn-sm .count {
    font-size: 10px;
}

.reply-form {
    margin-top: 10px;
    margin-bottom: 10px;
    padding-left: 0;
}

.reply-form-child {
    margin-top: 8px;
    margin-left: 22px;
}

.reply-input-wrap {
    position: relative;
    width: 80%;
}

.reply-input-wrap .reply-input {
    height: 30px;
    padding: 5px 8px;
    border-radius: 18px;
    font-size: 12px;
    width: 80%;
    margin: 0 5px;
}

.reply-input-wrap .reply-send {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: #ff0050;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.reply-input-wrap .reply-send i {
    font-size: 12px;
}

.reply-empty {
    color: #666;
    font-size: 12px;
    padding: 6px 0;
}

.comment-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-top: 6px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eee;
    margin-right: 10px;
    display: flex;
    justify-content: center;
    margin-top: 5px;
    font-weight: bold;
    color: #1b1b1b;
    flex-shrink: 0;
    align-items: center;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 15px;
    color: #666;
    margin-bottom: 2px;
}

.comment-text {
    font-size: 14px;
    color: #333;
}

.comment-input-area {
    padding: 10px 12px 42px;
    border-top: 1px solid #eee;
    background: #fff;
    position: relative;
}

.comments-drawer .comment-input-area {
    padding-bottom: 48px;
}

.comments-drawer .comment-input-area .form-input {
    width: 100%;
    padding-right: 110px;
}

.form-input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #f1f1f2;
    outline: none;
    width: 100%;
    margin: 10px 0;
}

.search-input-wrap {
    position: relative;
}

.search-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    overflow: hidden;
    z-index: 2500;
    max-height: 360px;
    display: none;
}

.search-suggest.open {
    display: block;
}

.search-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
}

.search-suggest-item:hover {
    background: #f6f6f6;
}

.search-suggest-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f1f2;
    flex: 0 0 auto;
}

.search-suggest-text {
    min-width: 0;
    flex: 1;
}

.search-suggest-title {
    font-weight: 700;
    font-size: 14px;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggest-meta {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.search-suggest-empty {
    padding: 10px 12px;
    color: #666;
}

.btn {
    padding: 10px 12px;
    border-radius: 20px;
    border: none;
    margin: 3px;
    display: inline-block;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary {
    background: #ff0050;
    color: #fff;
}

.btn-secondary {
    background: #f4f4f4;
    color: #414141;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

/* Side Panel */
.side-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 280px;
    background: #f8f8f8;
    z-index: 2000;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.side-panel.left {
    left: 0;
    transform: translateX(-100%);
}

.account-menu-dropdown {
    position: fixed;
    min-width: 220px;
    max-width: 260px;
    max-height: calc(100vh - 80px);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.5);
    background: #ffffff;
    z-index: 2001;
    display: none;
    flex-direction: column;
}

.side-panel.left.open {
    transform: translateX(0);
}

.account-menu-dropdown.open {
    display: flex !important;
}

.side-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.side-overlay.open {
    display: block;
    opacity: 1;
}

@media (min-width: 900px) {
    .container {
        margin: 0 auto;
        box-shadow: none;
        width: 100%;
        max-width: 500px;
    }
    .side-panel.left {
        /* Desktop-da sol panel daimi açıq olsun və ekranın solundan kənara çıxmasın */
        left: 0;
        transform: translateX(0);
    }
    .side-overlay {
        display: none !important;
    }
}

.panel-header {
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid #9ca3af;
}

.panel-body {
    padding: 10px 0;
    flex: 1;
    overflow-y: auto;
}

.panel-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: background 0.1s;
}

.panel-item:active {
    background: #f5f5f5;
}

.panel-item i {
    width: 30px;
    font-size: 18px;
    color: #666;
}

.theme-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.theme-toggle-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.theme-toggle-btn {
    width: 46px;
    height: 24px;
    border-radius: 999px;
    border: none;
    padding: 2px;
    background: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle-knob {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.4);
    transform: translateX(0);
    transition: transform 0.18s ease;
}

.theme-toggle-btn.theme-on {
    background: #0f172a;
}

.theme-toggle-btn.theme-on .theme-toggle-knob {
    transform: translateX(20px);
}

/* Shorts Modal */
.shorts-modal {
    position: fixed;
    top: 0; /* Will be set by JavaScript */
    bottom: 0; /* Will be set by JavaScript */
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    left: 0;
    right: 0;
    background: #000;
    z-index: 1002; /* Between header (1003) and bottom nav (1001) */
    display: none; /* Toggled by JS */
    overflow: hidden;
}

.shorts-modal-content {
    width: 100%;
    height: 100%;
    position: relative;
}

.shorts-feed {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none; /* Firefox */
}

.shorts-feed::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Page padding utility for forms/settings */
.page-padded {
    padding: 14px;
}

.shorts-modal-close {
    position: absolute;
    top: 10px;
    right: 10px; /* Moved to right for better UX inside container */
    left: auto;
    z-index: 1001;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shorts-modal .video-card {
    height: 100%; /* Fill the available modal height */
    scroll-snap-align: start;
    position: relative;
}

.shorts-modal .video-container {
    height: stretch;
    position: relative;
}

.shorts-modal .video-player {
    width: 100%;
    height: 100%;
    will-change: transform;
    object-fit: cover;
}

/* Avatar upload trigger overlay */
.profile-avatar {
    position: relative;
}
.avatar-upload-trigger {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.avatar-upload-trigger i {
    font-size: 16px;
}
/* Position overlay content bottom-left (not full screen) */
.shorts-modal .video-overlay-content {
    position: absolute;
    left: 0;
    bottom: 0;
    max-width: -webkit-fill-available;
}
.shorts-modal .video-overlay-content .video-controls {
    max-height: 30vh;
    overflow: hidden;
    max-width: 85%;
}

/* Position actions bottom-right */
.shorts-modal .actions-vertical {
    position: absolute;
    right: 12px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Comment input area */
.comment-input-area .btn.btn-secondary {
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.comment-input-area-controls {
    position: absolute;
    right: 16px;
    bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.emoji-picker .emoji-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
}
.emoji-picker .emoji-btn:hover {
    background: #f5f5f5;
    border-radius: 6px;
}

/* Global content padding except video-grid */
main.video-feed:not(.video-grid) {
    padding-top: 12px;
}
.no-videos {
    padding-left: 16px;
    padding-right: 16px;
}
.panel-body {
    padding: 14px;
}

/* Ensure non-modal comments are hidden by default */
.comments-section {
    display: none;
}
/* Upload Page Styles */
.upload-container {
    padding: 20px;
}

.upload-form {
    padding-top: 6px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #222;
    font-size: 14px;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    background: #fafafa;
    color: #444;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-align: center;
}

.file-input-label:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

#videoPreview {
    width: 100%;
    max-height: 240px;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

#uploadProgress {
    height: 10px;
}

.form-group {
    margin-bottom: 20px;
}

/* WhatsApp-style read/unread icons */

/* Enhanced notification item */
.notification-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.notification-item.unread {
    border-color: #ff0050;
    background: #fff6fa;
}

.notification-item:hover {
    background: #f9f9f9;
    border-color: #ddd;
}

.notification-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.notification-text {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.notification-subtitle {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.notification-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-left: 12px;
    flex-shrink: 0;
}

.notification-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.notification-time {
    font-size: 11px;
    color: #999;
    margin-right: 8px;
}

/* Message notification specific styling */
.message-notification {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.message-notification:hover {
    background: #f5f5f5;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.form-control:focus {
    border-color: #ff0050;
}

.file-upload-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f9f9f9;
    transition: all 0.2s;
}

.file-upload-wrapper:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.file-upload-wrapper i {
    font-size: 40px;
    color: #999;
    margin-bottom: 10px;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* Auth Pages */
.auth-container {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.auth-logo {
    font-size: 40px;
    margin-bottom: 40px;
}

.auth-form {
    width: 100%;
    max-width: 320px;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-links a {
    color: #ff0050;
    text-decoration: none;
    font-weight: 600;
}

.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.settings-tab-button {
    flex: 1;
    border: none;
    padding: 8px 10px;
    border-radius: 999px;
    background: #f3f3f3;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.settings-tab-button.active {
    background: #ff0050;
    color: #fff;
}

.settings-panels {
    margin-top: 4px;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

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

.settings-panels {
    margin-top: 4px;
    overflow-x: hidden;
}

@media (max-width: 640px) {
    .settings-tab-content form {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
}

.settings-save-button {
    width: 100%;
    margin-top: 8px;
}

.video-options-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 2000;
}

.video-options-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    width: 92%;
    max-width: 520px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none;
    z-index: 2001;
    max-height: 80vh;
    overflow-y: auto;
}

/* Chat input fixed bar */
.chat-input-bar {
    position: fixed;
    left: 0;
    margin: 0 auto;
    right: 0;
    bottom: 56px; /* default bottom nav height */
    width: 500px;
    max-width: 100%;
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 1002;
    padding: 8px 0;
}
.chat-input-inner {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 0 12px;
    box-sizing: border-box;
}
.chat-input-inner .form-input {
    min-width: 0;
}
.chat-input-inner button,
.chat-input-inner label {
    flex: 0 0 auto;
}
.emoji-picker.fixed {
    position: fixed !important;
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
    z-index: 1003;
}

.video-options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 10px;
}

.video-options-header .close-btn {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}

.video-options-body .form-input {
    margin-bottom: 8px;
}

.video-options-body h4 {
    margin: 10px 0 6px;
}

.video-menu {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    display: none;
    z-index: 2002;
    padding: 8px;
    max-height: 70vh;
    overflow: auto;
}

.video-menu .menu-item {
    width: 100%;
    text-align: left;
    border: none;
    background: #fff;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
}

.video-menu .menu-item + .menu-item {
    margin-top: 6px;
}

.video-menu .menu-item:hover {
    background: #f5f5f5;
}

.video-menu .menu-item.danger {
    color: #c62828;
}

/* Profile Header */
.profile-header {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #eee;
    margin: 0 auto 15px;
    overflow: hidden;
}

body.theme-dark .profile-header {
    background: #020617;
}

body.theme-dark .profile-avatar {
    background: #020617;
}

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

/* Live gradient ring utility (general) */
.avatar-ring {
    position: relative;
    border: 2px solid transparent;
    border-radius: 50%;
    background:
      linear-gradient(#ffffff, #ffffff) padding-box,
      conic-gradient(#ff0050, #ffd400, #3b82f6, #22c55e, #ff0050) border-box;
}
body.theme-dark .avatar-ring {
    background:
      linear-gradient(#020617, #020617) padding-box,
      conic-gradient(#ff0050, #ffd400, #3b82f6, #22c55e, #ff0050) border-box;
}
/* Thicker ring for profile avatar */
.profile-avatar.avatar-ring {
    border-width: 4px;
}

.profile-info h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.profile-info p {
    color: #666;
    margin-bottom: 15px;
    font-size: 13px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-stats span {
    font-size: 14px;
}

.profile-stats strong {
    font-size: 16px;
    display: block;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Infinite scroll loading spinner */
.infinite-scroll-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 14px;
}

.infinite-scroll-loading .loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff0050;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chat-msg {
    position: relative;
    margin-bottom: 15px;
    max-width: 70%;
    background: #f0f0f0;
    padding: 10px 15px;
    border-radius: 18px;
    display: inline-block;
}

.chat-msg.me {
    margin-left: auto;
}

.chat-msg.them {
    margin-right: auto;
    text-align: left;
}

/* Div iÃ§i tÉ™mizlÉ™ndi - birbaÅŸa .chat-msg sinifinÉ™ keÃ§irildi */

.chat-msg img {
    max-width: 200px;
    border-radius: 12px;
    margin-bottom: 5px;
}

.message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 4px;
    font-size: 11px;
    color: #999;
    gap: 6px;
}

.chat-msg.me .message-footer {
    justify-content: flex-end;
}

.chat-msg.them .message-footer {
    justify-content: flex-start;
}

.message-timestamp {
    font-size: 11px;
    color: #999;
    opacity: 0.8;
}

.message-read-status {
    display: inline-flex;
    align-items: center;
}

.read-status {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
}

.read-status .single-check,
.read-status .double-check,
.message-read-status .single-check,
.message-read-status .double-check {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 10px;
    vertical-align: middle;
}

.read-status .checkmark,
.message-read-status .checkmark {
    position: absolute;
    width: 12px;
    height: 8px;
}

.read-status .checkmark::before,
.read-status .checkmark::after,
.message-read-status .checkmark::before,
.message-read-status .checkmark::after {
    content: '';
    position: absolute;
    background: #999;
    height: 2px;
    border-radius: 1px;
}

.single-check .checkmark::before {
    width: 4px;
    transform: rotate(45deg);
    top: 5px;
    left: 2px;
}

.single-check .checkmark::after {
    width: 8px;
    transform: rotate(-45deg);
    top: 3px;
    left: 5px;
}

.double-check .checkmark:nth-child(1)::before {
    width: 4px;
    transform: rotate(45deg);
    top: 5px;
    left: 1px;
    opacity: 0.6;
}

.double-check .checkmark:nth-child(1)::after {
    width: 8px;
    transform: rotate(-45deg);
    top: 3px;
    left: 4px;
    opacity: 0.6;
}

.double-check .checkmark:nth-child(2)::before {
    width: 4px;
    transform: rotate(45deg);
    top: 5px;
    left: 5px;
}

.double-check .checkmark:nth-child(2)::after {
    width: 8px;
    transform: rotate(-45deg);
    top: 3px;
    left: 8px;
}

.chat-msg.me .message-footer .double-check .checkmark::before,
.chat-msg.me .message-footer .double-check .checkmark::after {
    background: #999;
}

.chat-msg.me .message-footer .single-check .checkmark::before,
.chat-msg.me .message-footer .single-check .checkmark::after {
    background: #666;
}


form.search-form {
    margin: 15px;
}

a.nav-item:hover {
    color: #f70051;
}

i.fas.fa-plus-square:hover {
    color: #ffffff;
    background: #3b2d2d;
}


main.video-feed.video-grid h2 {
    padding: 10px 20px;
    margin: 10px;
}

body.theme-dark main.video-feed.video-grid h2 {
    color: #e5e7eb;
}

/* Modern Button Enhancements */
.btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    will-change: transform;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #ff0050, #ff3d7a);
    border: none;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: linear-gradient(135deg, #f8f8f8, #f5f5f5);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #34ce57);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    border: none;
}

/* Action Button Animations */
.action-btn {
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn i {
    transition: all 0.2s ease;
}

.action-btn:hover i {
    background: rgba(0,0,0,0.2);
    transform: rotate(5deg);
}

/* Modern Form Elements */
.form-control {
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
}

.form-control:focus {
    border-color: #ff0050;
    box-shadow: 0 0 0 3px rgba(255, 0, 80, 0.1);
    outline: none;
}

/* Loading Animations */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 8px;
}

.skeleton-text {
    height: 20px;
    width: 100%;
    margin-bottom: 10px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Pulse Animation for Loading */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Spin Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -30px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

.bounce {
    animation: bounce 1s ease infinite;
}

/* Modern Cards */
.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

button.comment-report {
    color: #6a6a6a;
    font-size: 10px;
    border: 0;
    transition: color 0.2s ease;
}

button.comment-report:hover {
    color: #dc3545;
}

button.comment-pin {
    float: right;
    border: 0;
    margin: 2px 20px;
    font-size: 10px;
    color: #6a6a6a;
    transition: color 0.2s ease;
}

button.comment-pin:hover {
    color: #ffc107;
}

.reply-list {
    margin: 5px;
}


.comment-input-area div {
    display: flex;
}
 
.u-flex { display: flex; }
.u-items-center { align-items: center; }
.u-justify-between { justify-content: space-between; }
.u-gap-8 { gap: 8px; }
.u-gap-10 { gap: 10px; }
.u-gap-12 { gap: 12px; }
.u-gap-16 { gap: 16px; }
.u-gap-20 { gap: 20px; }
.u-flex-wrap { flex-wrap: wrap; }
.u-flex-col { flex-direction: column; }
.u-alert-success { background:#dcfce7; color:#166534; padding:16px; border-radius:8px; margin-bottom:24px; display:flex; align-items:center; gap:8px; }
.u-alert-error { background:#fee2e2; color:#991b1b; padding:16px; border-radius:8px; margin-bottom:24px; display:flex; align-items:center; gap:8px; }
.u-justify-center { justify-content: center; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-muted { color: #666; }
.text-primary { color: #ff0050; }
.mt-4 { margin-top: 4px; }
.mb-4 { margin-bottom: 4px; }
.ml-4 { margin-left: 4px; }
.mr-4 { margin-right: 4px; }
.pt-4 { padding-top: 4px; }
.pb-4 { padding-bottom: 4px; }
.pl-4 { padding-left: 4px; }
.pr-4 { padding-right: 4px; }
.mt-8 { margin-top: 8px; }
.mb-8 { margin-bottom: 8px; }
.ml-8 { margin-left: 8px; }
.mr-8 { margin-right: 8px; }
.pt-8 { padding-top: 8px; }
.pb-8 { padding-bottom: 8px; }
.pl-8 { padding-left: 8px; }
.pr-8 { padding-right: 8px; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.ml-12 { margin-left: 12px; }
.mr-12 { margin-right: 12px; }
.pt-12 { padding-top: 12px; }
.pb-12 { padding-bottom: 12px; }
.pl-12 { padding-left: 12px; }
.pr-12 { padding-right: 12px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.ml-16 { margin-left: 16px; }
.mr-16 { margin-right: 16px; }
.pt-16 { padding-top: 16px; }
.pb-16 { padding-bottom: 16px; }
.pl-16 { padding-left: 16px; }
.pr-16 { padding-right: 16px; }

.logo-link { color: inherit; text-decoration: none; }
.offline-banner { position:absolute; top:15px; left:50%; transform:translateX(-50%); background:rgba(0,0,0,0.7); color:#fff; padding:6px 10px; border-radius:6px; font-size:12px; display:none; z-index:11; }
.badge-live { display:inline-flex; align-items:center; gap:6px; background:#ff0050; color:#fff; font-weight:700; font-size:10px; padding:3px 8px; border-radius:10px; }
.chip-muted { font-size:12px; color:#888; background:#f5f5f5; padding:2px 8px; border-radius:10px; }
.empty-state { text-align:center; padding:20px; color:#888; font-size:13px; }
.grid-span-all { grid-column: 1 / -1; }
.emoji-picker { display:none; margin-top:8px; background:#fff; border:1px solid #eee; border-radius:8px; padding:6px; }
.w-100 { width: 100%; }
.icon-16 { font-size: 16px; }
.icon-20 { font-size: 20px; }
.icon-40 { font-size: 40px; }
.icon-24 { font-size: 24px; }
.opacity-50 { opacity: 0.5; }
.u-hide { display: none; }
.h-100 { height: 100%; }
.object-cover { object-fit: cover; }
.u-text-center { text-align: center; }
.u-overflow-auto { overflow: auto; }
.u-cursor-pointer { cursor: pointer; }
.u-inline-block { display: inline-block; }
.u-justify-between { justify-content: space-between; }
.rounded-4 { border-radius: 4px; }
.rounded-full { border-radius: 50%; }
.border-ddd { border: 1px solid #ddd; }
.select-sm { padding:4px; border-radius:4px; border:1px solid #ddd; }
.w-40 { width: 40px; }
.h-60 { height: 60px; }
.w-32 { width: 32px; }
.h-32 { height: 32px; }
.story-upload-label { display:flex; width:64px; height:64px; border-radius:50%; border:2px dashed #aaa; align-items:center; justify-content:center; cursor:pointer; }
.story-progress-ring { width:64px; height:64px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; position:relative; background:linear-gradient(45deg,#ccc,#eee); }
.story-progress-spinner { position:absolute; width:64px; height:64px; border-radius:50%; border:3px solid rgba(255,255,255,0.35); border-top-color:#fff; animation:spin 1s linear infinite; }
.story-progress-inner { width:56px; height:56px; border-radius:50%; background:#111; display:flex; align-items:center; justify-content:center; color:#fff; font-size:12px; }
.story-upload-label-text { font-size:12px; margin-top:6px; color:#ddd; }
@keyframes spin { from { transform: rotate(0) } to { transform: rotate(360deg) } }
.live-card { border:1px solid #eee; border-radius:12px; overflow:hidden; width:320px; box-shadow:0 4px 15px rgba(0,0,0,0.05); transition:transform 0.2s; }
.live-thumb { background:#000; width:100%; aspect-ratio:16/9; position:relative; }
.thumb-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#fff; background:#333; }
.badge-top-left { position:absolute; top:10px; left:10px; }
.thumb-img { width:100%; height:100%; object-fit:cover; position:absolute; top:0; left:0; display:none; }
.live-card-body { padding:15px; }
.live-user-row { display:flex; align-items:center; gap:12px; }
.live-ava { width:40px; height:40px; border-radius:50%; overflow:hidden; background:#eee; flex-shrink:0; }
.live-meta { flex:1; min-width:0; }
.live-username { font-weight:bold; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.live-title { font-size:12px; color:#666; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }


main.main-content {
    height: 100%;
    overflow-y: scroll;
}

.container h1 {
    padding: 10px 25px;
    font-size: 22px;
    font-weight: 600;
}

div#storiesBar {
    padding: 25px;
}

/* Messages Feed - No Videos */
.messages-feed {
    padding: 0 14px 60px;
}

.messages-feed .video-card,
.messages-feed .video-container,
.messages-feed .video-player {
    display: none !important;
}


.auth-footer {
    margin: 10px auto;
    padding: 10px 25px;
}

.auth-footer a {
    font-size: 18px;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: #f71a75;
}


span.live-icon {
}

i.fas.fa-tv {
    color: #ec0744 !important;
}


.comment-actions-top {
    float: right;
}

*::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}
*::-webkit-scrollbar-track {
    background: #f1f1f1;
}
*::-webkit-scrollbar-thumb {
    background-color: #b7b7b7;
    border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
    background-color: #999999;
}
body.theme-dark *::-webkit-scrollbar-track {
    background: #0b1220;
}
body.theme-dark *::-webkit-scrollbar-thumb {
    background-color: #fb7185;
}
* {
    scrollbar-width: thin;
    scrollbar-color: #999999 #f1f1f1;
}
body.theme-dark * {
    scrollbar-color: #fb7185 #0b1220;
}


body.theme-dark .auth-card {
    color: #fff;
    background: #323c55;
}

body.theme-dark .form-label {
    color: #fff;
}

body.theme-dark .bottom-nav span {
    color: #f1f1f1;
}
