/* =====================================================
   CamsVivo - TikTok Clone | Premium Dark Theme
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Custom Properties ── */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-elevated: #1a1a1a;
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-glass-hover: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #666666;
    --text-muted: #444444;
    
    --accent-primary: #fe2c55;
    --accent-primary-glow: rgba(254, 44, 85, 0.4);
    --accent-secondary: #25f4ee;
    --accent-secondary-glow: rgba(37, 244, 238, 0.3);
    --accent-gradient: linear-gradient(135deg, #fe2c55, #ff6b6b);
    --accent-gradient-2: linear-gradient(135deg, #25f4ee, #5cf0e3);
    --accent-gradient-mixed: linear-gradient(135deg, #fe2c55, #a855f7, #25f4ee);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-active: rgba(255, 255, 255, 0.15);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px var(--accent-primary-glow);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --sidebar-width: 240px;
    --header-height: 60px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    color: var(--text-primary);
}

input, textarea {
    font-family: var(--font-main);
    outline: none;
    border: none;
    background: none;
    color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ── App Layout ── */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 0;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.sidebar-logo {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    box-shadow: var(--shadow-glow);
    animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { box-shadow: 0 0 15px var(--accent-primary-glow); }
    50% { box-shadow: 0 0 30px var(--accent-primary-glow); }
}

.sidebar-logo .logo-text {
    font-size: 20px;
    font-weight: 800;
    background: var(--accent-gradient-mixed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

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

.nav-item.active {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    font-weight: 600;
}

.nav-item.active::before {
    opacity: 1;
}

.nav-item .nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

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

.sidebar-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border-color);
}

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

.sidebar-user .user-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* ── Main Content ── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    height: 100vh;
    position: relative;
}

/* ── Video Feed ── */
.video-feed {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.video-card {
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.video-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    cursor: pointer;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    pointer-events: none;
    transition: transform 0.2s ease;
    z-index: 5;
}

.video-play-overlay.show {
    transform: translate(-50%, -50%) scale(1);
    animation: play-pop 0.5s ease forwards;
}

@keyframes play-pop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Video Info Overlay (bottom) */
.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 80px;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    z-index: 3;
}

.video-info .video-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.video-info .author-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--text-primary);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.video-info .author-avatar:hover {
    transform: scale(1.1);
}

.video-info .author-name {
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
}

.video-info .author-name:hover {
    text-decoration: underline;
}

.video-info .video-description {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    max-height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ── Action Buttons (right side) ── */
.video-actions {
    position: absolute;
    right: 16px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 4;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform var(--transition-bounce);
}

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

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

.action-btn .action-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all var(--transition-fast);
}

.action-btn:hover .action-icon {
    background: rgba(255, 255, 255, 0.2);
}

.action-btn.liked .action-icon {
    color: var(--accent-primary);
    background: rgba(254, 44, 85, 0.15);
}

.action-btn .action-count {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

/* Like animation */
@keyframes like-burst {
    0% { transform: scale(1); }
    25% { transform: scale(1.4); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.action-btn.liked .action-icon {
    animation: like-burst 0.4s ease;
}

/* ── Upload Modal ── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

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

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background var(--transition-fast);
}

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

/* ── Form Elements ── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* Upload zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--accent-primary);
    background: rgba(254, 44, 85, 0.05);
}

.upload-zone.dragging {
    border-color: var(--accent-secondary);
    background: rgba(37, 244, 238, 0.05);
    transform: scale(1.02);
}

.upload-zone.has-file {
    border-color: var(--accent-secondary);
    border-style: solid;
    padding: 20px;
}

.upload-zone .upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.upload-zone .upload-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.upload-zone .upload-hint {
    font-size: 13px;
    color: var(--text-tertiary);
}

.upload-preview {
    width: 100%;
    max-height: 200px;
    border-radius: var(--radius-md);
    object-fit: contain;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px var(--accent-primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px var(--accent-primary-glow);
    transform: translateY(-1px);
}

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

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

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

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-active);
}

.btn-follow {
    padding: 8px 20px;
    font-size: 14px;
    border-radius: var(--radius-xl);
}

.btn-follow.following {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
}

.btn-full {
    width: 100%;
}

/* ── Comments Panel ── */
.comments-panel {
    position: fixed;
    right: -420px;
    top: 0;
    width: 420px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    z-index: 500;
    display: flex;
    flex-direction: column;
    transition: right var(--transition-normal);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
}

.comments-panel.open {
    right: 0;
}

.comments-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comments-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    animation: comment-slide-in 0.3s ease;
}

@keyframes comment-slide-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.comment-item .comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

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

.comment-item .comment-author {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.comment-item .comment-text {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-secondary);
    word-break: break-word;
}

.comment-item .comment-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.comment-input-area {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.comment-input-area .form-input {
    flex: 1;
    min-height: 44px;
    max-height: 100px;
    resize: none;
    border-radius: var(--radius-xl);
    padding: 12px 18px;
}

.comment-send-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 10px var(--accent-primary-glow);
}

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

/* ── Profile Page ── */
.profile-page {
    height: 100vh;
    overflow-y: auto;
    display: none;
}

.profile-page.active {
    display: block;
}

.profile-header {
    padding: 48px 32px 32px;
    text-align: center;
    position: relative;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: var(--accent-gradient-mixed);
    opacity: 0.15;
    mask-image: linear-gradient(to bottom, black, transparent);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent);
}

.profile-avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 30px var(--accent-primary-glow);
}

.profile-avatar-edit {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border: 2px solid var(--bg-card);
}

.profile-display-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.profile-username {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.profile-bio {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

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

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

.profile-stat .stat-value {
    font-size: 20px;
    font-weight: 800;
}

.profile-stat .stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px;
    padding: 16px;
}

.profile-video-thumb {
    aspect-ratio: 9/16;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.profile-video-thumb:hover {
    transform: scale(1.03);
}

.profile-video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-video-thumb .thumb-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

/* ── Auth Page ── */
.auth-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.08;
    top: -200px;
    right: -200px;
    animation: auth-glow 8s ease-in-out infinite alternate;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--accent-secondary);
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.06;
    bottom: -200px;
    left: -200px;
    animation: auth-glow 8s ease-in-out infinite alternate-reverse;
}

@keyframes auth-glow {
    0% { transform: scale(1); }
    100% { transform: scale(1.3); }
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 420px;
    max-width: 90%;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-lg);
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .auth-logo .logo-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 12px;
    box-shadow: var(--shadow-glow);
}

.auth-card .auth-logo h1 {
    font-size: 28px;
    font-weight: 800;
    background: var(--accent-gradient-mixed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card .auth-logo p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.auth-tab.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 2px 10px var(--accent-primary-glow);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: form-fade 0.3s ease;
}

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

.auth-error {
    background: rgba(254, 44, 85, 0.1);
    border: 1px solid rgba(254, 44, 85, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--accent-primary);
    margin-bottom: 16px;
    display: none;
}

.auth-error.show {
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* ── Loading Spinner ── */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

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

.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 16px;
}

.loading-screen .spinner {
    width: 48px;
    height: 48px;
}

.loading-screen p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ── Empty State ── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    gap: 16px;
    color: var(--text-tertiary);
}

.empty-state .empty-icon {
    font-size: 64px;
    opacity: 0.3;
}

.empty-state .empty-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-secondary);
}

.empty-state .empty-text {
    font-size: 14px;
    max-width: 300px;
    text-align: center;
    line-height: 1.5;
}

/* ── Toast Notifications ── */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 14px;
    box-shadow: var(--shadow-md);
    animation: toast-in 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.3);
}

.toast.error {
    border-color: rgba(254, 44, 85, 0.3);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* ── Progress Bar ── */
.upload-progress {
    width: 100%;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
    display: none;
}

.upload-progress.active {
    display: block;
}

.upload-progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1000;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-header {
        display: flex !important;
    }

    .comments-panel {
        width: 100%;
        right: -100%;
    }

    .video-wrapper {
        max-width: 100%;
    }
}

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    z-index: 50;
    align-items: center;
    padding: 0 16px;
    justify-content: space-between;
}

.mobile-menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: var(--radius-md);
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ── Video progress bar ── */
.video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 10;
}

.video-progress-bar {
    height: 100%;
    background: var(--accent-primary);
    width: 0%;
    transition: width 0.1s linear;
}

/* ── Double tap like animation ── */
.double-tap-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 100px;
    z-index: 20;
    pointer-events: none;
    filter: drop-shadow(0 0 20px rgba(254, 44, 85, 0.8));
}

.double-tap-heart.animate {
    animation: double-tap 0.8s ease forwards;
}

@keyframes double-tap {
    0% { transform: translate(-50%, -50%) scale(0) rotate(-15deg); opacity: 1; }
    30% { transform: translate(-50%, -50%) scale(1.3) rotate(0deg); opacity: 1; }
    60% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.2) rotate(0deg); opacity: 0; }
}

/* ── Edit Profile Modal Specific ── */
.edit-profile-avatar {
    text-align: center;
    margin-bottom: 24px;
}

.edit-profile-avatar img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--accent-primary);
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.edit-profile-avatar img:hover {
    opacity: 0.8;
}

.edit-profile-avatar p {
    font-size: 13px;
    color: var(--accent-primary);
    margin-top: 8px;
    cursor: pointer;
}

/* ── Button Small ── */
.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* ── Sidebar Guest Card ── */
.sidebar-guest {
    padding: 10px 4px;
    text-align: center;
}

.guest-msg {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
}

/* ── Live Nav Badge & Pulse ── */
.badge-live-nav {
    display: inline-block;
    background: var(--accent-gradient);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

.live-pulse-icon {
    animation: live-pulse-glow 1.5s ease-in-out infinite;
}

@keyframes live-pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.badge-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff0040;
    box-shadow: 0 0 8px #ff0040;
    animation: live-pulse-glow 1.2s ease-in-out infinite;
    margin-right: 6px;
}

/* ── Auth Modal Refinements ── */
.auth-modal-box {
    position: relative;
    max-width: 440px;
    padding: 36px 32px 32px;
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

.auth-card-inner .auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-card-inner .auth-logo .logo-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    box-shadow: var(--shadow-glow);
}

.auth-card-inner .auth-logo h1 {
    font-size: 24px;
    font-weight: 800;
    background: var(--accent-gradient-mixed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card-inner .auth-logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

/* ── Live Streams Page ── */
.live-page {
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-primary);
    padding: 24px 32px;
}

.live-container {
    display: flex;
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
    height: calc(100vh - 48px);
}

.live-stream-box {
    flex: 1;
    background: #000;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: var(--shadow-lg);
}

.live-stream-box video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #050505;
}

.live-badge-top {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    z-index: 10;
}

.live-viewers-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-left: 6px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.live-overlay-info {
    position: relative;
    z-index: 10;
    padding: 16px 20px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.live-broadcaster {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-broadcaster img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    object-fit: cover;
}

.live-host-name {
    font-size: 15px;
    font-weight: 700;
}

.live-stream-title {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Floating Chat Overlay */
.live-chat-overlay {
    position: relative;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: none;
}

.live-chat-overlay::-webkit-scrollbar {
    display: none;
}

.live-chat-msg {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    max-width: 85%;
    animation: comment-slide-in 0.2s ease;
    align-self: flex-start;
}

.live-chat-msg .chat-user {
    font-weight: 700;
    color: var(--accent-secondary);
    margin-right: 6px;
}

.live-chat-msg.system {
    background: rgba(254, 44, 85, 0.2);
    border: 1px solid rgba(254, 44, 85, 0.3);
    color: #ff99aa;
    font-size: 12px;
}

/* Live Actions Bottom Bar */
.live-action-bar {
    position: relative;
    z-index: 10;
    padding: 12px 20px 16px;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-chat-input {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: var(--radius-xl);
    font-size: 13px;
    color: white;
}

.live-chat-input:focus {
    border-color: var(--accent-primary);
}

.live-send-btn, .live-heart-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform var(--transition-fast);
}

.live-heart-btn {
    background: rgba(254, 44, 85, 0.15);
    border-color: rgba(254, 44, 85, 0.3);
}

.live-send-btn:hover, .live-heart-btn:hover {
    transform: scale(1.15);
}

/* Live Sidebar (Right column) */
.live-sidebar {
    width: 340px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.live-sidebar-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.live-channels-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.live-channel-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.live-channel-card:hover, .live-channel-card.active {
    border-color: var(--accent-primary);
    background: var(--bg-glass-hover);
}

.live-channel-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    background: #222;
}

.live-channel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-channel-thumb .badge-pulse-mini {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ff0040;
    border-radius: 50%;
    box-shadow: 0 0 6px #ff0040;
}

.live-channel-details {
    flex: 1;
    min-width: 0;
}

.live-channel-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-channel-desc {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-go-live-banner {
    padding: 16px;
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.12), rgba(37, 244, 238, 0.08));
    border: 1px solid rgba(254, 44, 85, 0.2);
    border-radius: var(--radius-md);
    text-align: center;
}

.live-go-live-banner h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.live-go-live-banner p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Camera Preview inside Go Live Modal */
.live-camera-preview-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.live-camera-preview-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-preview-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

/* Mobile responsive adjustments for LIVE */
@media (max-width: 900px) {
    .live-container {
        flex-direction: column;
        height: auto;
    }

    .live-stream-box {
        height: 60vh;
    }

    .live-sidebar {
        width: 100%;
    }
}

/* =====================================================
   TIKTOK MOBILE FIRST & RESPONSIVE PERFECTION
   ===================================================== */

/* ── Mobile Top Header ── */
.mobile-top-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 54px;
    z-index: 100;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: auto;
}

.top-header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 12px;
    border-radius: var(--radius-xl);
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.top-header-btn.coin-pill {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.35);
    color: #ffd700;
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff0040;
    box-shadow: 0 0 8px #ff0040;
    animation: live-pulse-glow 1.2s infinite;
}

.top-header-tabs {
    display: flex;
    align-items: center;
    gap: 18px;
}

.top-tab {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    position: relative;
    padding: 4px 0;
    transition: all var(--transition-fast);
}

.top-tab.active {
    color: #ffffff;
    font-weight: 800;
    font-size: 17px;
}

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

/* ── Mobile TikTok Bottom Navigation ── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(8, 8, 8, 0.96);
    backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 999;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
}

.b-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.b-nav-item.active {
    color: #ffffff;
}

.b-nav-icon {
    font-size: 19px;
    line-height: 1;
}

.b-nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

/* Signature TikTok Center Plus Button */
.b-nav-item-center {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    cursor: pointer;
}

.tiktok-plus-btn {
    width: 44px;
    height: 28px;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -3px 0 0 #25f4ee, 3px 0 0 #fe2c55;
    transition: transform 0.15s ease;
}

.tiktok-plus-btn:active {
    transform: scale(0.92);
}

.tiktok-plus-btn span {
    color: #000000;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}

/* ── Video Action Gift Button & Music Disc ── */
.action-btn.gift-btn .action-icon {
    background: rgba(255, 215, 0, 0.18);
    border: 1px solid rgba(255, 215, 0, 0.35);
    color: #ffd700;
    animation: gift-glow 2.5s infinite;
}

@keyframes gift-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.2); }
    50% { box-shadow: 0 0 16px rgba(255, 215, 0, 0.5); }
}

.action-avatar-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.action-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    object-fit: cover;
}

.avatar-follow-badge {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    border: 2px solid #000;
}

.rotating-disc {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #111;
    border: 6px solid #222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    animation: spin 3.5s linear infinite;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    margin-top: 6px;
}

/* ── Mobile Layout Media Query (<= 768px) ── */
@media (max-width: 768px) {
    body {
        overflow: hidden;
    }

    .sidebar {
        display: none !important;
    }

    .mobile-header {
        display: none !important;
    }

    .mobile-top-header {
        display: flex;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
    }

    .video-feed {
        height: 100vh;
        height: 100dvh;
        padding-bottom: 0;
    }

    .video-card {
        height: 100vh;
        height: 100dvh;
        width: 100vw;
    }

    .video-wrapper {
        max-width: 100vw;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
    }

    .video-wrapper video {
        object-fit: cover;
    }

    .video-info {
        bottom: 66px;
        left: 14px;
        right: 80px;
        padding: 0;
    }

    .video-info .video-author {
        margin-bottom: 6px;
    }

    .video-info .video-description {
        font-size: 13px;
        max-height: 52px;
    }

    .video-actions {
        right: 10px;
        bottom: 74px;
        gap: 14px;
    }

    .action-btn .action-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .action-btn .action-count {
        font-size: 11px;
    }

    /* Modal as Bottom Sheet on Mobile */
    .modal {
        border-radius: 24px 24px 0 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        position: fixed;
        bottom: 0;
        max-height: 85vh;
        padding: 24px 20px 32px !important;
        margin: 0 !important;
        transform: translateY(100%) !important;
        transition: transform var(--transition-normal) !important;
    }

    .modal-overlay.active .modal {
        transform: translateY(0) !important;
    }

    .comments-panel {
        width: 100%;
        bottom: 0;
        height: 70vh;
        top: auto;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        transition: transform var(--transition-normal);
        right: 0 !important;
    }

    .comments-panel.open {
        transform: translateY(0);
    }
}

/* =====================================================
   GIFTS / STICKERS SYSTEM (TIKTOK STYLE)
   ===================================================== */

.gifts-sheet-modal {
    max-width: 500px;
    background: #141416;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 24px 28px;
}

.gifts-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.gifts-user-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
}

.balance-amount {
    color: #ffd700;
    font-size: 18px;
    font-weight: 800;
}

.btn-add-coins {
    margin-left: 8px;
    background: rgba(254, 44, 85, 0.15);
    border: 1px solid rgba(254, 44, 85, 0.4);
    color: var(--accent-primary);
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-add-coins:hover {
    background: var(--accent-primary);
    color: white;
}

.gifts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 16px 0;
    max-height: 280px;
    overflow-y: auto;
}

.gift-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 6px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.gift-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.gift-card.selected {
    background: rgba(254, 44, 85, 0.12);
    border-color: var(--accent-primary);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(254, 44, 85, 0.3);
}

.gift-icon {
    font-size: 34px;
    margin-bottom: 4px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    transition: transform var(--transition-bounce);
}

.gift-card.selected .gift-icon {
    transform: scale(1.15);
}

.gift-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.gift-cost {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 800;
    color: #ffd700;
    margin-top: 4px;
}

.gifts-sheet-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.gift-send-target {
    font-size: 13px;
    color: var(--text-secondary);
}

.gift-send-target strong {
    color: var(--text-primary);
}

.btn-send-gift {
    padding: 10px 24px;
    font-size: 14px;
    box-shadow: 0 4px 15px var(--accent-primary-glow);
}

/* ── Fullscreen Gift Animation Overlay ── */
.gift-animation-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gift-alert-banner {
    position: absolute;
    top: 60px;
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.95), rgba(168, 85, 247, 0.95));
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-xl);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
    animation: banner-drop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes banner-drop {
    from { transform: translateY(-40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.gift-big-avatar {
    font-size: 120px;
    animation: big-gift-pop 1.8s ease forwards;
    filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.8));
}

@keyframes big-gift-pop {
    0% { transform: scale(0) rotate(-20deg); opacity: 0; }
    30% { transform: scale(1.4) rotate(0deg); opacity: 1; }
    60% { transform: scale(1) rotate(0deg); opacity: 1; }
    100% { transform: scale(1.2) translateY(-60px); opacity: 0; }
}

/* =====================================================
   MERCADO PAGO WALLET & RECHARGE MODAL
   ===================================================== */

.wallet-modal-box {
    max-width: 560px;
}

.wallet-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mp-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 158, 227, 0.15);
    border: 1px solid rgba(0, 158, 227, 0.4);
    color: #009ee3;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.mp-badge-tag img {
    width: 14px;
    height: 14px;
}

.wallet-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 4px;
}

.wallet-tab {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.wallet-tab.active {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.wallet-tab-content.active {
    display: block;
    animation: form-fade 0.3s ease;
}

.wallet-balance-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.balance-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}

.balance-card .card-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-card .card-val {
    font-size: 22px;
    font-weight: 800;
    margin-top: 4px;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.package-card {
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.package-card:hover {
    border-color: rgba(0, 158, 227, 0.5);
}

.package-card.selected {
    border-color: #009ee3;
    background: rgba(0, 158, 227, 0.08);
    box-shadow: 0 0 15px rgba(0, 158, 227, 0.25);
}

.package-coins {
    font-size: 18px;
    font-weight: 800;
    color: #ffd700;
    margin-bottom: 4px;
}

.package-price {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.package-bonus {
    display: inline-block;
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #22c55e;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 6px;
}

.mp-guarantee-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 158, 227, 0.06);
    border: 1px solid rgba(0, 158, 227, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.mp-info-icon {
    font-size: 24px;
}

.mp-info-title {
    font-size: 13px;
    font-weight: 700;
    color: #009ee3;
}

.mp-info-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 2px;
}

.btn-mp {
    background: #009ee3;
    color: white;
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 4px 20px rgba(0, 158, 227, 0.4);
    gap: 8px;
}

.btn-mp:hover {
    background: #0089c7;
    box-shadow: 0 6px 25px rgba(0, 158, 227, 0.5);
}

/* ── Creator Real Money Withdrawals ── */
.withdraw-earnings-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(37, 244, 238, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.earnings-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.earnings-val {
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    margin: 4px 0;
}

.earnings-cash {
    font-size: 16px;
    color: #22c55e;
}

.earnings-rule {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.form-select {
    cursor: pointer;
}

.form-select option {
    background: #111111;
    color: white;
}

.input-hint {
    display: block;
    font-size: 12px;
    color: #22c55e;
    margin-top: 4px;
    font-weight: 600;
}

.user-coins-badge {
    font-size: 11px;
    color: #ffd700;
    font-weight: 700;
    margin-top: 2px;
}

.live-gift-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform var(--transition-fast);
}

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

/* ── Global Sound Button ── */
.sound-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.sound-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.08);
}
.sound-toggle-btn.sound-on {
    background: rgba(34, 197, 94, 0.25);
    border-color: #22c55e;
}

/* ── Search Modal ── */
.search-modal-box {
    max-width: 580px;
    width: 92%;
    background: #141416;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
}
.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}
.search-input-wrapper .search-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}
.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 38px 12px 42px;
    font-size: 15px;
    color: #fff;
    outline: none;
    transition: border-color var(--transition-fast);
}
.search-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
}
.search-clear-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: none;
}
.search-clear-btn.visible {
    display: block;
}
.search-quick-tags {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
}
.search-tag {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}
.search-tag:hover {
    background: rgba(254, 44, 85, 0.15);
    border-color: var(--primary);
    color: #fff;
}
.search-results-container {
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.search-placeholder-hint {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px 10px;
    font-size: 14px;
}
.search-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.search-user-item:hover {
    background: rgba(255, 255, 255, 0.08);
}
.search-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}
.search-user-info {
    flex: 1;
}
.search-user-name {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}
.search-user-handle {
    font-size: 12px;
    color: var(--text-secondary);
}
.search-video-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.search-video-item:hover {
    background: rgba(255, 255, 255, 0.08);
}
.search-video-badge {
    font-size: 20px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(254, 44, 85, 0.15);
}
.search-video-title {
    font-weight: 600;
    font-size: 13px;
    color: #fff;
}
.search-video-author {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ── PK Battle Overlay & Split Screen ── */
.pk-battle-overlay {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 35;
    pointer-events: none;
}
.pk-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.pk-team {
    display: flex;
    flex-direction: column;
}
.pk-creator {
    align-items: flex-start;
}
.pk-opponent {
    align-items: flex-end;
}
.pk-team-name {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.pk-creator .pk-team-score {
    font-size: 14px;
    font-weight: 900;
    color: #38bdf8;
}
.pk-opponent .pk-team-score {
    font-size: 14px;
    font-weight: 900;
    color: #f87171;
}
.pk-center-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pk-vs-badge {
    background: linear-gradient(135deg, #fe2c55, #ff007f);
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 1px;
}
.pk-timer {
    font-size: 11px;
    font-weight: 700;
    color: #ffd700;
    margin-top: 2px;
}
.pk-progress-bar-container {
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    margin-top: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.pk-bar-fill-left {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    transition: width 0.4s ease;
}
.pk-bar-fill-right {
    height: 100%;
    background: linear-gradient(90deg, #f87171, #dc2626);
    transition: width 0.4s ease;
}
.btn-pk-battle {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: #fff;
    font-weight: 700;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-pk-battle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}
.pk-split-active #live-stream-container {
    display: flex !important;
    flex-direction: row !important;
}
.pk-opponent-video-container {
    position: relative;
    flex: 1;
    height: 100%;
    background: #0d0d14;
    overflow: hidden;
    border-left: 2px solid rgba(239, 68, 68, 0.4);
}
.pk-opponent-video-container canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pk-opponent-overlay-info {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #ef4444;
}

/* ── Wallet History Styles ── */
.history-subheading {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.history-list-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}
.history-loading {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 16px;
}
.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.history-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.history-main-text {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.history-date {
    font-size: 11px;
    color: var(--text-secondary);
}
.history-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.history-amount {
    font-size: 14px;
    font-weight: 800;
}
.history-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}
.history-badge.pending {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}
.history-badge.approved, .history-badge.completed, .history-badge.paid {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}
.history-badge.rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}


