/* ============================================
   Pingstr - Main Styles
   A modern TikTok/Instagram inspired design
   ============================================ */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #fe2c55;
    --primary-dark: #e91e45;
    --primary-light: #ff6b8a;
    --secondary: #25f4ee;
    --secondary-dark: #1ed4ce;
    
    --bg-primary: #000000;
    --bg-secondary: #121212;
    --bg-tertiary: #1f1f1f;
    --bg-card: #262626;
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --border-color: rgba(255, 255, 255, 0.12);
    --border-light: rgba(255, 255, 255, 0.08);
    
    --success: #00f076;
    --warning: #ffcc00;
    --error: #ff3b30;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #fe2c55 0%, #ff6b8a 100%);
    --gradient-secondary: linear-gradient(135deg, #25f4ee 0%, #fe2c55 100%);
    --gradient-dark: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    
    /* Spacing */
    --sidebar-width: 240px;
    --sidebar-collapsed: 72px;
    --mobile-nav-height: 60px;
    
    /* Typography */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(254, 44, 85, 0.4);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #eeeeee;
    --bg-card: #ffffff;
    
    --text-primary: #161823;
    --text-secondary: rgba(22, 24, 35, 0.75);
    --text-muted: rgba(22, 24, 35, 0.5);
    
    --border-color: rgba(22, 24, 35, 0.12);
    --border-light: rgba(22, 24, 35, 0.08);
}

/* Reset & Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Announcement Bar */
.announcement-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.announcement-bar.visible {
    display: flex;
}

.announcement-bar p {
    margin: 0;
    flex: 1;
}

.announcement-bar .close-announcement {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}

.announcement-bar .close-announcement:hover {
    background: rgba(255, 255, 255, 0.3);
}

body.has-announcement {
    padding-top: 44px;
}

body.has-announcement .sidebar {
    top: 44px;
    height: calc(100vh - 44px);
}

body.has-announcement .main-content {
    margin-top: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    z-index: 1000;
    transition: width var(--transition-normal);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 24px;
}

.logo i {
    font-size: 32px;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-links li a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-links li.active a {
    background: var(--gradient-primary);
    color: white;
}

.nav-links li a i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

/* Admin link styling */
#adminNavLink a {
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.1), rgba(255, 0, 80, 0.05));
    border: 1px solid rgba(254, 44, 85, 0.3);
}

#adminNavLink a:hover {
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.2), rgba(255, 0, 80, 0.1));
}

#adminNavLink a i {
    color: var(--primary);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--gradient-primary);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info span {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    padding: 8px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.logout-btn:hover {
    color: var(--error);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding-bottom: 0;
}

/* ============================================
   VIDEO FEED
   ============================================ */

.video-feed {
    max-width: 100%;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

.video-card {
    position: relative;
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-primary);
}

.video-wrapper {
    position: relative;
    max-width: 480px;
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 40px);
    margin: 20px 0;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-lg);
    cursor: pointer;
    background: #000;
}

.video-overlay {
    display: none;
}

.video-card:hover .video-overlay {
    opacity: 0;
}

.play-pause-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.play-pause-indicator.show {
    opacity: 1;
    animation: fadeOut 0.5s ease forwards;
}

/* Mute Indicator */
.mute-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 16px 24px;
    border-radius: 12px;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.mute-indicator i {
    font-size: 36px;
}

.mute-indicator span {
    font-size: 14px;
    font-weight: 500;
}

.mute-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes fadeOut {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

/* Video Info */
.video-info {
    position: absolute;
    bottom: 80px;
    left: 16px;
    right: 80px;
    z-index: 10;
}

.video-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.author-details {
    flex: 1;
}

.author-name {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-name .verified {
    color: var(--secondary);
    font-size: 14px;
}

.author-name .verified.official {
    color: var(--primary);
}

.author-username {
    font-size: 13px;
    color: var(--text-secondary);
}

.author-link,
.author-name-link {
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition-fast);
}

.author-link:hover,
.author-name-link:hover {
    opacity: 0.8;
}

.author-link .author-avatar {
    cursor: pointer;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.author-link:hover .author-avatar {
    transform: scale(1.05);
    border-color: var(--secondary);
}

.author-name-link:hover .author-name {
    color: var(--primary);
}

.follow-btn {
    padding: 6px 16px;
    background: var(--primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.follow-btn:hover {
    background: var(--primary-dark);
}

.follow-btn.following {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.video-caption {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-caption.expanded {
    -webkit-line-clamp: unset;
}

.video-caption .hashtag {
    color: var(--text-primary);
    font-weight: 600;
}

.video-music {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.video-music i {
    animation: spin 3s linear infinite;
}

.video-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.video-date i {
    font-size: 11px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Video Actions */
.video-actions {
    position: absolute;
    bottom: 100px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: white;
    transition: transform var(--transition-fast);
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn .icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all var(--transition-fast);
}

.action-btn:hover .icon {
    background: rgba(255, 255, 255, 0.2);
}

.action-btn.liked .icon {
    color: var(--primary);
}

.action-btn.liked .icon i {
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.action-btn span {
    font-size: 12px;
    font-weight: 500;
}

/* Progress Bar */
.video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
}

.video-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 16px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    font-size: 22px;
    transition: color var(--transition-fast);
}

.mobile-nav a.active {
    color: var(--text-primary);
}

.mobile-nav .upload-btn-mobile {
    width: 44px;
    height: 32px;
    background: var(--gradient-secondary);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 18px;
}

/* ============================================
   MODALS - Fixed & Scrollable
   ============================================ */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 40px);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 20px;
}

.close-modal {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-secondary);
    border-radius: 50%;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.close-modal:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Comments Modal */
.comments-list {
    padding: 16px;
    max-height: calc(60vh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.comment-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.comment-actions button {
    color: inherit;
    transition: color var(--transition-fast);
}

.comment-actions button:hover {
    color: var(--text-primary);
}

.comment-delete-btn {
    color: var(--text-muted) !important;
    margin-left: auto;
}

.comment-delete-btn:hover {
    color: var(--primary) !important;
}

.comment-input {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.comment-input input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    outline: none;
}

.comment-input input::placeholder {
    color: var(--text-muted);
}

.comment-input button {
    padding: 12px;
    color: var(--primary);
    font-size: 18px;
    transition: transform var(--transition-fast);
}

.comment-input button:hover {
    transform: scale(1.1);
}

/* Share Modal */
.share-content {
    padding-bottom: 20px;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    color: var(--text-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.share-option:hover {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.share-option i {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    transition: all var(--transition-fast);
}

.share-option:hover i {
    transform: scale(1.1);
}

.share-option span {
    font-size: 12px;
}

.share-option.whatsapp i { background: #25d366; }
.share-option.facebook i { background: #1877f2; }
.share-option.twitter i { background: #1da1f2; }

/* Share User Selection */
.share-user-selection {
    border-top: 1px solid var(--border-color);
    padding: 16px;
    max-height: 350px;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-search {
    margin-bottom: 16px;
}

.share-search input {
    width: 100%;
    padding: 12px 18px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.share-search input::placeholder {
    color: var(--text-muted);
}

.share-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.15);
}

.share-user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-user-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.share-user-item:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    transform: translateX(4px);
}

.share-user-item img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 2px 8px rgba(254, 44, 85, 0.2);
    transition: transform 0.2s ease;
}

.share-user-item:hover img {
    transform: scale(1.05);
}

.share-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.share-user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-user-username {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-send-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), #ff6b8a);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(254, 44, 85, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-send-btn:hover {
    background: linear-gradient(135deg, #ff6b8a, var(--primary));
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(254, 44, 85, 0.4);
}

.share-send-btn:active {
    transform: scale(0.98);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--text-muted);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 3000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast i {
    font-size: 20px;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--error); }
.toast.warning i { color: var(--warning); }

.toast-message {
    flex: 1;
    font-size: 14px;
}

.toast-close {
    color: var(--text-muted);
    font-size: 18px;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ============================================
   TRENDING SECTION
   ============================================ */

.trending-section {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.trending-section h4 {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trending-section h4 i {
    color: var(--primary);
}

.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trending-tag {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.trending-tag:hover {
    background: var(--primary);
    color: white;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--primary);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links li a {
    position: relative;
}

/* ============================================
   NOTIFICATIONS MODAL
   ============================================ */

.notifications-content {
    max-width: 420px;
    max-height: 80vh;
}

.notifications-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.notif-tab {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.notif-tab:hover {
    background: var(--bg-secondary);
}

.notif-tab.active {
    background: var(--primary);
    color: white;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--bg-tertiary);
}

.notification-item.unread {
    background: rgba(254, 44, 85, 0.05);
}

.notification-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
}

.notification-text strong {
    font-weight: 600;
}

.notification-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.notification-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
}

.notifications-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.notifications-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ============================================
   VIDEO OPTIONS MODAL
   ============================================ */

.options-content {
    max-width: 320px;
    padding: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.options-list {
    display: flex;
    flex-direction: column;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
    width: 100%;
}

.option-item:hover {
    background: var(--bg-tertiary);
}

.option-item i {
    width: 24px;
    text-align: center;
    font-size: 18px;
    color: var(--text-secondary);
}

.option-item.cancel {
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    justify-content: center;
}

.option-item.cancel:hover {
    color: var(--primary);
}

/* ============================================
   SPEED CONTROL MODAL
   ============================================ */

.speed-content {
    max-width: 300px;
}

.speed-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.speed-btn {
    padding: 14px 20px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.speed-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.speed-btn.active {
    background: rgba(254, 44, 85, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   VIDEO REPORT MODAL
   ============================================ */

.report-modal-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(8px);
}

.report-modal-overlay.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.report-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 450px;
    max-height: 85vh;
    overflow-y: auto;
}

.report-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.report-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.report-modal-header h2 i {
    color: var(--error);
}

.close-modal-btn {
    background: var(--bg-tertiary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.close-modal-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.report-form {
    padding: 20px 24px;
}

.report-form .form-group {
    margin-bottom: 20px;
}

.report-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-reason-option {
    display: block;
    cursor: pointer;
}

.report-reason-option input {
    display: none;
}

.report-reason-option .reason-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.report-reason-option .reason-content i {
    width: 20px;
    color: var(--text-secondary);
}

.report-reason-option:hover .reason-content {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.report-reason-option input:checked + .reason-content {
    background: rgba(254, 44, 85, 0.1);
    border-color: var(--primary);
}

.report-reason-option input:checked + .reason-content i {
    color: var(--primary);
}

.report-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.report-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.report-modal-actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.cancel-btn {
    flex: 1;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cancel-btn:hover {
    background: var(--bg-hover);
}

.submit-report-btn {
    flex: 1;
    padding: 12px 20px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.submit-report-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(254, 44, 85, 0.3);
}

.submit-report-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.report-success {
    padding: 48px 24px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-icon i {
    font-size: 40px;
    color: var(--success);
}

.report-success h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.report-success p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ============================================
   KEYBOARD SHORTCUTS INDICATOR
   ============================================ */

.shortcuts-hint {
    position: fixed;
    bottom: 100px;
    right: 20px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: var(--radius-md);
    color: white;
    font-size: 12px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.shortcuts-hint.show {
    opacity: 1;
}

.shortcuts-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 0 2px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-collapsed);
    }
    
    .sidebar .logo span,
    .sidebar .nav-links span,
    .sidebar .login-btn span,
    .sidebar .user-info span {
        display: none;
    }
    
    .sidebar .logo {
        justify-content: center;
    }
    
    .sidebar .nav-links li a {
        justify-content: center;
        padding: 12px;
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed);
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding-bottom: var(--mobile-nav-height);
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .video-feed {
        height: calc(100vh - var(--mobile-nav-height));
    }
    
    .video-card {
        height: calc(100vh - var(--mobile-nav-height));
    }
    
    .video-wrapper {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }
    
    .video-player {
        border-radius: 0;
    }
    
    .toast-container {
        left: 20px;
        right: 20px;
    }
    
    .toast {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .video-info {
        bottom: 60px;
        right: 70px;
    }
    
    .video-actions {
        bottom: 80px;
        right: 12px;
        gap: 12px;
    }
    
    .action-btn .icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    
    .share-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Hide scrollbar for video feed */
.video-feed::-webkit-scrollbar {
    display: none;
}

.video-feed {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

/* ============================================
   LOGIN POPUP
   ============================================ */

.popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(8px);
}

.popup[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.popup .wrapper {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.popup[aria-hidden="false"] .wrapper {
    transform: scale(1) translateY(0);
}

.popup .wrapper h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup .wrapper p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 28px;
    line-height: 1.6;
}

.popup .wrapper #closePopup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 48px;
    background: var(--gradient-primary);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.popup .wrapper #closePopup:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.popup .close-x {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.popup .close-x:hover {
    background: var(--primary);
    color: white;
}

/* Popup animation */
@keyframes popupShake {
    0%, 100% { transform: scale(1) translateY(0); }
    25% { transform: scale(1) translateY(0) rotate(-1deg); }
    75% { transform: scale(1) translateY(0) rotate(1deg); }
}

/* ============================================
   SOUND MODAL
   ============================================ */

.sound-content {
    max-width: 500px;
    width: 95%;
}

.sound-details {
    display: flex;
    gap: 24px;
    padding: 20px;
    align-items: center;
}

.sound-cover {
    position: relative;
    flex-shrink: 0;
}

.sound-disc {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    animation: spinDisc 3s linear infinite;
    box-shadow: 0 4px 20px rgba(254, 44, 85, 0.3);
}

.sound-disc::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--bg-primary);
    border-radius: 50%;
    z-index: 1;
}

@keyframes spinDisc {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   VIDEO OPTIONS MODAL
   ============================================ */

.video-options-modal {
    max-width: 350px;
    border-radius: var(--radius-xl);
}

.video-options-list {
    padding: 8px 0;
}

.video-option-item {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 15px;
    transition: background var(--transition-fast);
}

.video-option-item:hover {
    background: var(--bg-tertiary);
}

.video-option-item i {
    width: 24px;
    text-align: center;
    font-size: 18px;
    color: var(--text-secondary);
}

.video-option-item.danger {
    color: var(--error);
}

.video-option-item.danger i {
    color: var(--error);
}

.sound-waves {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 20px;
}

.sound-waves span {
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
    animation: soundWave 0.5s ease-in-out infinite alternate;
}

.sound-waves span:nth-child(1) { height: 8px; animation-delay: 0s; }
.sound-waves span:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.sound-waves span:nth-child(3) { height: 12px; animation-delay: 0.2s; }
.sound-waves span:nth-child(4) { height: 20px; animation-delay: 0.3s; }
.sound-waves span:nth-child(5) { height: 10px; animation-delay: 0.4s; }

@keyframes soundWave {
    from { height: 4px; }
    to { height: 20px; }
}

.sound-info {
    flex: 1;
    min-width: 0;
}

.sound-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sound-info p {
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.sound-album {
    font-size: 0.85rem;
    color: var(--text-muted) !important;
}

.sound-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.sound-stats i {
    color: var(--primary);
    margin-right: 4px;
}

.sound-actions {
    display: flex;
    gap: 12px;
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sound-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sound-action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.sound-action-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.sound-action-btn.primary:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.sound-action-btn.liked i,
.sound-action-btn.saved i {
    color: var(--primary);
}

.sound-action-btn.liked i.far,
.sound-action-btn.saved i.far {
    font-weight: 900;
    font-family: "Font Awesome 6 Free";
}

.sound-videos {
    padding: 20px;
}

.sound-videos h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.sound-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.sound-video-item {
    aspect-ratio: 9/16;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.sound-video-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-fast);
}

.sound-video-item:hover img {
    transform: scale(1.05);
}

.sound-video-item .play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.sound-video-item:hover .play-overlay {
    opacity: 1;
}

.sound-video-item .play-overlay i {
    color: white;
    font-size: 24px;
}

.sound-video-grid:empty::after {
    content: 'No other videos use this sound yet';
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-size: 0.9rem;
}

/* Make music clickable */
.video-music {
    cursor: pointer;
    transition: color var(--transition-fast);
}

.video-music:hover {
    color: var(--primary);
}

/* ============================================
   MODAL RESPONSIVE FIXES
   ============================================ */

@media (max-width: 768px) {
    .modal {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        max-width: 100%;
        max-height: 90vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }

    .modal.active .modal-content {
        transform: translateY(0);
    }

    .comments-list {
        max-height: calc(70vh - 120px);
    }

    .share-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Notifications Modal Fix */
.notifications-content {
    max-height: calc(100vh - 80px);
}

.notifications-content .modal-body,
.notifications-list {
    max-height: calc(70vh - 60px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Options Modal Fix */
.options-content,
.speed-content {
    max-width: 320px;
}

.options-content .option-item,
.speed-content .speed-option {
    padding: 14px 20px;
}

/* Sound Modal Fix */
.sound-content {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.sound-details {
    padding: 20px;
}

.sound-video-grid {
    max-height: 250px;
    overflow-y: auto;
}
