/* ==========================================================
   TikNia - TikTok-Style Social Video Platform Design System
   ========================================================== */

:root {
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* TikNia Brand Accents */
    --brand-pink: #FE2C55;
    --brand-pink-hover: #E02449;
    --brand-cyan: #25F4EE;
    --brand-gradient: linear-gradient(135deg, #FE2C55 0%, #FF0050 50%, #25F4EE 100%);

    /* Light Theme (Default) */
    --bg-page: #f8f9fc;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --bg-rail: rgba(0, 0, 0, 0.45);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-focus: #FE2C55;
    --text-primary: #121216;
    --text-secondary: #65676b;
    --text-muted: #8c8d94;
    --text-inverse: #ffffff;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
    
    --bottom-nav-height: 58px;
    --desktop-sidebar-width: 250px;
    --feed-max-width: 480px;
}

/* OLED Dark Theme */
[data-theme="dark"] {
    --bg-page: #0a0a0d;
    --bg-surface: #121217;
    --bg-elevated: #1a1a22;
    --bg-rail: rgba(0, 0, 0, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #FE2C55;
    --text-primary: #f2f3f7;
    --text-secondary: #9a9ba4;
    --text-muted: #6e707a;
    --text-inverse: #121216;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* Custom Sleek Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(140, 140, 160, 0.25);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(140, 140, 160, 0.45);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(140, 140, 160, 0.25) transparent;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-page);
    color: var(--text-primary);
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color 0.25s ease, color 0.25s ease;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease, opacity 0.15s ease;
}

/* Premium Component Styling & Bootstrap Harmonization */
.card {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.modal-content {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.form-control, .form-select {
    background-color: var(--bg-page);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--brand-pink);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.18);
}

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

.dropdown-menu {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: 12px;
}

.dropdown-item {
    color: var(--text-primary);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(254, 44, 85, 0.1);
    color: var(--brand-pink);
}

/* Premium Interactive Buttons */
.btn-danger {
    background: linear-gradient(135deg, #FE2C55 0%, #FF0050 100%);
    border: none;
    box-shadow: 0 4px 14px rgba(254, 44, 85, 0.3);
    color: #ffffff !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff1744 0%, #e02449 100%);
    box-shadow: 0 6px 20px rgba(254, 44, 85, 0.45);
    transform: translateY(-1px);
}

.btn-danger:active {
    transform: scale(0.97);
}

.btn-outline-danger {
    border-color: var(--brand-pink);
    color: var(--brand-pink);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-outline-danger:hover {
    background: var(--brand-pink);
    border-color: var(--brand-pink);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(254, 44, 85, 0.35);
    transform: translateY(-1px);
}

.btn-outline-danger:active {
    transform: scale(0.97);
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-outline-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--text-muted);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Video Thumbnail Card Hover Animation */
.group-hover-video {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}
.group-hover-video:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}
.group-hover-video img {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.group-hover-video:hover img {
    transform: scale(1.04);
}

/* Header & Top Bar */
.tiknia-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1020;
    transition: background-color 0.25s ease;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.brand-icon {
    font-size: 1.8rem;
    color: var(--brand-pink);
    filter: drop-shadow(0 2px 8px rgba(254, 44, 85, 0.35));
}

/* Search Bar in Header */
.topbar-search {
    position: relative;
    max-width: 440px;
    width: 100%;
    margin: 0 1.5rem;
}

.topbar-search input {
    width: 100%;
    background: var(--bg-page);
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.65rem 1.25rem 0.65rem 2.75rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.topbar-search input:focus {
    background: var(--bg-surface);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.15);
}

.topbar-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Desktop App Container */
.app-container {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    padding-left: var(--desktop-sidebar-width);
    padding-right: 0;
    min-height: calc(100vh - 60px);
    width: 100%;
    box-sizing: border-box;
    transition: padding 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-container.has-right-rail {
    padding-right: 320px;
    height: calc(100vh - 60px);
    min-height: calc(100vh - 60px);
    overflow: hidden;
}

body.feed-page {
    overflow: hidden;
}

.app-main-content {
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding: 1.75rem 1rem;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Desktop Sidebar */
.desktop-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: var(--desktop-sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    padding: 1.25rem 0.75rem;
    overflow-y: auto;
    z-index: 1010;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.sidebar-nav-item i {
    font-size: 1.35rem;
}

.sidebar-nav-item:hover, .sidebar-nav-item.active {
    background: rgba(254, 44, 85, 0.08);
    color: var(--brand-pink);
}

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

.sidebar-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
}

/* Recommended Creators in Sidebar */
.sidebar-creator-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.sidebar-creator-item:hover {
    background: var(--bg-page);
}

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

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

.sidebar-creator-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-creator-handle {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Central Video Feed Column */
.feed-column {
    margin: 0 auto;
    width: 100%;
    max-width: 580px;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Feed Navigation Tabs (For You / Following) */
.feed-tabs-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    background: transparent;
    padding: 0.2rem 0;
    margin-bottom: 0.25rem;
    z-index: 990;
    flex-shrink: 0;
}

.feed-tab-btn {
    background: none;
    border: none;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    padding: 0.2rem 0.4rem;
    transition: color 0.2s ease;
}

.feed-tab-btn.active {
    color: var(--text-primary);
}

.feed-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--brand-pink);
    border-radius: 2px;
}

/* Snap Video Feed Container */
.feed-container {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

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

/* Individual Video Item */
.video-card-item {
    position: relative;
    height: min(calc(100vh - 84px), 640px);
    max-height: calc(100vh - 84px);
    aspect-ratio: 9 / 16;
    width: auto;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000000;
    border-radius: 16px;
    overflow: visible; /* Action rail sits cleanly outside on desktop */
    margin: 12px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
    border-radius: 16px;
    cursor: pointer;
}

/* Video Overlay Controls & Badges */
.video-overlay-gradient {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
}

/* Right Action Rail (Desktop Web Layout - Outside Card on Right) */
.video-action-rail {
    position: absolute;
    left: calc(100% + 14px);
    right: auto;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    z-index: 25;
}

.action-rail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.action-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.action-btn:hover {
    transform: scale(1.12);
    background: var(--bg-page);
    color: var(--brand-pink);
    border-color: rgba(254, 44, 85, 0.35);
}

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

.action-btn.liked {
    color: var(--brand-pink) !important;
    background: rgba(254, 44, 85, 0.1) !important;
    border-color: rgba(254, 44, 85, 0.3) !important;
    animation: heartPulse 0.35s ease;
}

.action-btn.saved {
    color: #ffb703 !important;
    background: rgba(255, 183, 3, 0.1) !important;
    border-color: rgba(255, 183, 3, 0.3) !important;
}

.action-btn.reposted {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.action-label {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 2px;
    text-shadow: none;
}

/* Creator Profile Button with Plus */
.creator-avatar-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    margin-bottom: 2px;
}

.creator-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--brand-pink);
    object-fit: cover;
}

.follow-plus-badge {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand-pink);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: bold;
    border: 2px solid var(--bg-surface);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.follow-plus-badge:hover {
    transform: translateX(-50%) scale(1.15);
}

/* Spinning Vinyl Audio Record */
.sound-disc {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #111111;
    border: 4px solid #222222;
    overflow: hidden;
    position: relative;
    animation: rotateDisc 5s linear infinite;
    cursor: pointer;
    margin-top: 2px;
}

.sound-disc img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sound-disc.paused {
    animation-play-state: paused;
}

@keyframes rotateDisc {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* Bottom Metadata Details */
.video-metadata-overlay {
    position: absolute;
    left: 16px;
    bottom: 20px;
    right: 16px; /* Full width since action rail is outside on desktop! */
    z-index: 20;
    color: #ffffff;
    pointer-events: auto;
}

.creator-handle {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.35rem;
}

.creator-handle .verified-badge {
    color: var(--brand-cyan);
    font-size: 1rem;
}

.video-caption {
    font-size: 0.9rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.65rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hashtag-link {
    color: #ffffff;
    font-weight: 700;
}

.hashtag-link:hover {
    color: var(--brand-cyan);
    text-decoration: underline;
}

.mention-link {
    color: #ffffff;
    font-weight: 700;
}

/* Sound Marquee Audio Row */
.sound-audio-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.sound-audio-row i {
    font-size: 0.95rem;
}

.marquee-wrap {
    max-width: 220px;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marqueeText 10s linear infinite;
}

@keyframes marqueeText {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* Scrubbing Progress Bar */
.video-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    z-index: 25;
    cursor: pointer;
}

.video-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--brand-pink);
    transition: width 0.1s linear;
}

/* Play/Pause Icon Center Flash */
.play-pause-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 30;
}

.play-pause-indicator.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Floating Double Tap Heart Particle */
.floating-heart {
    position: absolute;
    font-size: 4.5rem;
    color: var(--brand-pink);
    filter: drop-shadow(0 4px 12px rgba(254, 44, 85, 0.6));
    pointer-events: none;
    z-index: 40;
    animation: floatHeart 0.8s forwards ease-out;
}

@keyframes floatHeart {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5) rotate(-15deg);
    }
    50% {
        opacity: 0.9;
        transform: translate(-50%, -80%) scale(1.25) rotate(10deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -120%) scale(1.4) rotate(0deg);
    }
}

/* Desktop Right Recommendations Rail */
.desktop-right-rail {
    position: fixed;
    top: 60px;
    right: 0;
    bottom: 0;
    width: 320px;
    padding: 1.5rem;
    overflow-y: auto;
    border-left: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.trending-chip {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.25rem 0.25rem 0.25rem 0;
    transition: all 0.2s;
}

.trending-chip:hover {
    background: rgba(254, 44, 85, 0.1);
    border-color: var(--brand-pink);
    color: var(--brand-pink);
}

/* Mobile Bottom Navigation Bar - Authentic TikTok App Dark OLED Styling */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: #000000 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    z-index: 1030;
    padding: 0 0.5rem;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-items {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 0.72rem;
    font-weight: 600;
    position: relative;
    padding: 4px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.bottom-nav-link i {
    font-size: 1.35rem;
    margin-bottom: 2px;
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
    color: #ffffff !important;
}

/* Floating Center Create Button - Iconic Cyan/Magenta TikTok Style */
.create-btn-special {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 30px;
    background: #ffffff;
    border-radius: 9px;
    position: relative;
    cursor: pointer;
    box-shadow: -3px 0 0 var(--brand-cyan), 3px 0 0 var(--brand-pink);
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.create-btn-special:hover,
.create-btn-special:active {
    transform: scale(1.08);
}

.create-btn-special i {
    font-size: 1.25rem;
    color: #121216;
    margin: 0;
}

/* Comments Bottom Sheet Drawer */
.comments-drawer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: var(--feed-max-width);
    height: 65vh;
    background: var(--bg-surface);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.comments-drawer.open {
    transform: translate(-50%, 0);
}

.drawer-drag-handle {
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 10px auto 4px auto;
}

.comments-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
}

.comments-list-box {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.comment-input-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.comment-input-bar input {
    flex: 1;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.6rem 1.15rem;
    color: var(--text-primary);
    outline: none;
}

.comment-input-bar button {
    background: none;
    border: none;
    color: var(--brand-pink);
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
}

/* Modal / Bottom Sheet Backdrop */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1040;
    display: none;
}

.drawer-backdrop.show {
    display: block;
}

/* Toast Notifications */
.tiknia-toast-container {
    position: fixed;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

.tiknia-toast {
    background: rgba(18, 18, 22, 0.92);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    animation: toastSlideDown 0.3s ease;
}

@keyframes toastSlideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Breakpoints & Device Adaptability */
@media (max-width: 1240px) {
    .desktop-right-rail {
        display: none !important;
    }
    .app-container.has-right-rail {
        padding-right: 0 !important;
    }
}

/* ==========================================================================
   AUTHENTIC TIKTOK MOBILE APP FEED INTERFACE
   ========================================================================== */
.tiktok-mobile-feed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    z-index: 1025;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.25) 60%, transparent 100%);
    pointer-events: none;
}

.tiktok-mobile-feed-header a,
.tiktok-mobile-feed-header button {
    pointer-events: auto;
}

.tiktok-header-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffffff;
    font-size: 1.25rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    transition: opacity 0.2s ease;
    text-decoration: none;
}
.tiktok-header-btn:hover {
    color: #ffffff;
    opacity: 0.85;
}

.live-pill {
    background: #FE2C55;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(254, 44, 85, 0.8);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.85; }
}

.tiktok-feed-header-center {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tiktok-feed-tab {
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    position: relative;
    padding: 4px 2px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tiktok-feed-tab.active {
    color: #ffffff;
    font-size: 1.15rem;
}

.tiktok-feed-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

.tiktok-feed-tab-sep {
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 991.98px) {
    .desktop-sidebar {
        display: none !important;
    }
    .desktop-right-rail {
        display: none !important;
    }
    .topbar-search {
        display: none;
    }
    .mobile-bottom-nav {
        display: block !important;
    }

    /* Full-Bleed Edge-to-Edge TikTok Mobile Feed */
    .app-container.has-right-rail {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden !important;
        background: #000000 !important;
    }

    .app-container.has-right-rail .feed-column {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #000000 !important;
    }

    .app-container.has-right-rail .feed-container {
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        scroll-snap-type: y mandatory;
        -webkit-overflow-scrolling: touch;
        background: #000000 !important;
    }

    .app-container.has-right-rail .video-card-item {
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: none !important;
        aspect-ratio: unset !important;
        border-radius: 0 !important;
        margin: 0 !important;
        background: #000000 !important;
        box-shadow: none !important;
        position: relative !important;
    }

    .app-container.has-right-rail .video-player {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        background: #000000 !important;
    }

    .app-container.has-right-rail .video-action-rail {
        left: auto !important;
        right: 10px !important;
        bottom: calc(var(--bottom-nav-height) + 16px) !important;
        z-index: 50 !important;
        gap: 0.5rem !important;
    }

    .app-container.has-right-rail .action-btn {
        width: 40px !important;
        height: 40px !important;
        background: rgba(22, 22, 28, 0.55) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        border: none !important;
        color: #ffffff !important;
        font-size: 1.3rem !important;
        box-shadow: none !important;
        filter: drop-shadow(0 2px 5px rgba(0,0,0,0.6)) !important;
    }

    .app-container.has-right-rail .action-label {
        color: #ffffff !important;
        font-size: 0.72rem !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85) !important;
    }

    .app-container.has-right-rail .creator-avatar-wrap {
        width: 42px !important;
        height: 42px !important;
    }

    .app-container.has-right-rail .creator-avatar-img {
        width: 44px !important;
        height: 44px !important;
        border-color: #ffffff !important;
    }

    .app-container.has-right-rail .follow-plus-badge {
        border-color: #ffffff !important;
    }

    .app-container.has-right-rail .sound-disc {
        width: 38px !important;
        height: 38px !important;
        border-width: 5px !important;
    }

    .app-container.has-right-rail .video-metadata-overlay {
        left: 14px !important;
        right: 76px !important;
        bottom: calc(var(--bottom-nav-height) + 16px) !important;
        z-index: 45 !important;
    }

    .app-container.has-right-rail .video-progress-bar {
        bottom: var(--bottom-nav-height) !important;
        z-index: 60 !important;
    }

    /* Standard Inner Pages on Mobile (profile, search, messages, etc.) */
    .app-container:not(.has-right-rail) {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-top: 56px !important;
        margin-bottom: calc(var(--bottom-nav-height) + 12px) !important;
    }
    .app-main-content {
        padding: 1rem 0.75rem !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
}

/* Short Desktop Screens (e.g. 1280x585, 1366x768 with browser UI) */
@media (min-width: 992px) and (max-height: 720px) {
    .feed-tabs-header {
        display: none !important;
    }
    .video-card-item {
        height: calc(100vh - 74px) !important;
        max-height: calc(100vh - 74px) !important;
        margin: 6px auto !important;
    }
    .video-action-rail {
        bottom: 8px !important;
        gap: 4px !important;
        left: calc(100% + 16px) !important;
        width: 52px !important;
    }
    .action-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.05rem !important;
    }
    .action-label {
        font-size: 0.68rem !important;
        margin-top: 1px !important;
    }
    .creator-avatar-wrap {
        width: 38px !important;
        height: 38px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .creator-avatar-img {
        width: 38px !important;
        height: 38px !important;
    }
    .follow-plus-badge {
        width: 15px !important;
        height: 15px !important;
        font-size: 0.65rem !important;
        bottom: -3px !important;
    }
    .sound-disc {
        width: 32px !important;
        height: 32px !important;
        border-width: 2px !important;
    }
    .creator-handle {
        font-size: 0.95rem !important;
        margin-bottom: 2px !important;
    }
    .video-caption {
        font-size: 0.82rem !important;
        -webkit-line-clamp: 2 !important;
        margin-bottom: 4px !important;
    }
    .sound-audio-row {
        font-size: 0.75rem !important;
    }
}

/* Ultra-Short Desktop Screens (<= 440px) */
@media (min-width: 992px) and (max-height: 440px) {
    .action-label {
        display: none !important;
    }
    .video-action-rail {
        gap: 2px !important;
        left: calc(100% + 12px) !important;
    }
    .action-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.85rem !important;
    }
    .creator-avatar-wrap {
        width: 30px !important;
        height: 30px !important;
    }
    .creator-avatar-img {
        width: 30px !important;
        height: 30px !important;
    }
    .sound-disc {
        width: 24px !important;
        height: 24px !important;
    }
}

@media (max-width: 575.98px) {
    .app-container:not(.has-right-rail) {
        margin-top: 52px !important;
    }
    .tiknia-topbar {
        height: 52px;
        padding: 0 0.75rem;
    }
    .app-main-content {
        padding: 0.75rem 0.5rem !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }
}

/* ==========================================================================
   24-HOUR STORIES SYSTEM
   ========================================================================== */
.stories-tray-wrapper {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: 0.5rem 0.25rem;
    overflow: hidden;
}

.stories-scroll-container {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 6px;
}
.stories-scroll-container::-webkit-scrollbar {
    display: none;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.story-item:hover {
    transform: translateY(-2px);
}

.story-avatar-ring {
    position: relative;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    padding: 2.5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-avatar-ring.active-ring {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 30%, #fe2c55 70%, #ff007f 100%);
    box-shadow: 0 4px 14px rgba(254, 44, 85, 0.35);
}

.story-avatar-ring.viewed-ring {
    background: var(--border-color);
}

.story-avatar-ring.add-ring {
    background: transparent;
    border: 2px dashed var(--border-focus);
}

.story-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-surface);
    border: 2px solid var(--bg-surface);
}

.story-add-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-pink);
    color: #fff;
    border: 2px solid var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.story-add-badge:hover {
    transform: scale(1.15);
}

.story-username {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    max-width: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

/* Fullscreen Story Viewer */
.story-theater-wrap {
    max-width: 440px;
    height: 100vh;
    margin: 0 auto;
    position: relative;
    background: #0a0a0c !important;
    display: flex;
    flex-direction: column;
}

.story-progress-bars {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    z-index: 50;
}

.story-bar-track {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    overflow: hidden;
}

.story-bar-fill {
    height: 100%;
    width: 0%;
    background: #ffffff;
    border-radius: 2px;
}

.story-top-header {
    position: absolute;
    top: 24px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.story-media-container {
    flex: 1;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.story-media-element {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.story-touch-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    z-index: 20;
    cursor: pointer;
}
.story-touch-nav.left { left: 0; }
.story-touch-nav.right { right: 0; }

.story-footer-overlay {
    position: absolute;
    bottom: 24px;
    left: 16px;
    right: 16px;
    z-index: 50;
}

.story-caption-text {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    padding: 0.65rem 1rem;
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==========================================================================
   VIDEO REPOST SYSTEM
   ========================================================================== */
.btn-repost {
    color: #ffffff;
}
.btn-repost.reposted,
.action-btn.btn-repost.active {
    color: #ffd166 !important;
    text-shadow: 0 0 12px rgba(255, 209, 102, 0.6);
}
.action-btn.btn-repost:hover {
    transform: scale(1.18);
    color: #ffd166;
}

.video-repost-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 209, 102, 0.15);
    border: 1px solid rgba(255, 209, 102, 0.35);
    color: #ffd166;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.4rem;
    backdrop-filter: blur(4px);
}

/* ==========================================================================
   INTERACTIVE VIDEO POLLS & STICKERS
   ========================================================================== */
.video-poll-overlay {
    position: absolute;
    top: 25%;
    left: 20px;
    max-width: 240px;
    width: calc(100% - 100px);
    background: rgba(18, 18, 24, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 0.85rem;
    z-index: 25;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    animation: pollFloat 3s ease-in-out infinite alternate;
}

@keyframes pollFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

.video-poll-question {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 0.65rem;
    line-height: 1.25;
}

.video-poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.video-poll-btn {
    position: relative;
    width: 100%;
    padding: 0.45rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-poll-btn:hover:not(.voted) {
    background: rgba(254, 44, 85, 0.25);
    border-color: rgba(254, 44, 85, 0.5);
    transform: scale(1.02);
}

.video-poll-progress {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(254, 44, 85, 0.5), rgba(37, 244, 238, 0.5));
    border-radius: 12px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.video-poll-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* ==========================================================================
   GLOBAL ADMIN ANNOUNCEMENT TOP BAR
   ========================================================================== */
.global-announcement-bar {
    position: relative;
    width: 100%;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1030;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.announcement-gradient {
    background: linear-gradient(90deg, #fe2c55, #ff007f, #7928ca, #25f4ee);
    background-size: 300% 300%;
    animation: gradientMove 8s ease infinite;
    color: #ffffff;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.announcement-primary {
    background: #0d6efd;
    color: #ffffff;
}
.announcement-warning {
    background: #ffb703;
    color: #000000;
}
.announcement-info {
    background: #00b4d8;
    color: #ffffff;
}

.announcement-link {
    color: inherit;
    text-decoration: underline;
    margin-left: 0.5rem;
    font-weight: 700;
}
.announcement-link:hover {
    opacity: 0.85;
}

.announcement-dismiss-btn {
    position: absolute;
    right: 1rem;
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.7;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}
.announcement-dismiss-btn:hover {
    opacity: 1;
}

/* ==========================================================================
   AUDIO WAVEFORM & UPLOAD STUDIO
   ========================================================================== */
.audio-waveform-bar {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 36px;
    padding: 0 8px;
}
.audio-waveform-bar span {
    width: 3px;
    background: var(--brand-pink);
    border-radius: 3px;
    animation: waveBounce 1.2s ease-in-out infinite alternate;
}
.audio-waveform-bar span:nth-child(2) { animation-delay: 0.15s; }
.audio-waveform-bar span:nth-child(3) { animation-delay: 0.3s; }
.audio-waveform-bar span:nth-child(4) { animation-delay: 0.45s; }
.audio-waveform-bar span:nth-child(5) { animation-delay: 0.6s; }

@keyframes waveBounce {
    0% { height: 6px; }
    100% { height: 32px; }
}

.audio-waveform-bar span {
    animation-play-state: paused;
}
.audio-waveform-bar.playing span {
    animation-play-state: running;
}

/* ==========================================================================
   PRO VIDEO PLAYER FLOATING CONTROLS
   ========================================================================== */
.video-floating-pro-controls {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 25;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.video-card-item:hover .video-floating-pro-controls {
    opacity: 1;
}

@media (max-width: 991.98px) {
    .video-floating-pro-controls {
        opacity: 0.85;
        top: 60px;
        right: 12px;
    }
}

.pro-control-badge {
    background: rgba(22, 22, 28, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background-color 0.2s ease;
}

.pro-control-badge:hover {
    transform: scale(1.1);
    background: rgba(254, 44, 85, 0.85);
    border-color: transparent;
    color: #ffffff;
}

/* ==========================================================================
   REELS AUDIO, VOLUME SLIDER & TAP TO UNMUTE BANNER
   ========================================================================== */
.video-unmute-banner {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 18, 24, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    z-index: 35;
    cursor: pointer;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    animation: unmutePulse 2s infinite ease-in-out;
}

@keyframes unmutePulse {
    0%, 100% { transform: translateX(-50%) scale(1); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55); }
    50% { transform: translateX(-50%) scale(1.05); box-shadow: 0 8px 28px rgba(254, 44, 85, 0.5); border-color: rgba(254, 44, 85, 0.7); }
}

.video-unmute-banner.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-unmute-banner:hover {
    background: rgba(254, 44, 85, 0.95);
    border-color: transparent;
    color: #ffffff;
    transform: translateX(-50%) scale(1.06);
}

.volume-control-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding: 3px 8px;
}

.pro-volume-slider {
    width: 50px;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    transition: width 0.2s ease, opacity 0.2s ease;
}

.pro-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FE2C55;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.btn-rail-sound-toggle.unmuted i {
    color: #25F4EE;
    filter: drop-shadow(0 0 6px rgba(37, 244, 238, 0.6));
}


/* ==========================================================================
   MINI PROFILE HOVER CARDS
   ========================================================================== */
.profile-hover-card {
    position: absolute;
    width: 310px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    z-index: 2000;
    display: none;
    overflow: hidden;
    animation: hoverCardFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.hover-card-thumb-link {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.hover-card-thumb-link:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   UNIVERSAL TIKTOK SHARE SHEET
   ========================================================================== */
.share-friend-item {
    transition: transform 0.15s ease;
}
.share-friend-item:hover {
    transform: translateY(-2px);
}

.share-app-btn {
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-app-btn:hover {
    background: rgba(254, 44, 85, 0.08);
    border-color: rgba(254, 44, 85, 0.3);
    transform: translateY(-2px);
}

.share-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.share-app-name {
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==========================================================================
   AUTHENTIC LIVE STREAMING ROOM & BROADCAST STUDIO
   ========================================================================== */
.live-stream-page {
    margin-top: 60px;
    height: calc(100vh - 60px);
    background: #000000;
    color: #ffffff;
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .live-stream-page {
        margin-top: 0;
        height: 100vh;
        height: 100dvh;
    }
}

.live-room-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.live-video-viewport {
    flex: 1;
    position: relative;
    height: 100%;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.live-video-media-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.live-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.live-video-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 25%, transparent 60%, rgba(0,0,0,0.85) 100%);
    pointer-events: none;
}

.live-header-bar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
}

.live-host-badge {
    display: flex;
    align-items: center;
    background: rgba(22, 22, 28, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 4px 12px 4px 4px;
}

.live-host-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-pink);
}

.live-host-info {
    max-width: 140px;
}

.live-host-name {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.1;
}

.live-host-diamonds {
    font-size: 0.72rem;
    color: #ffb703;
    font-weight: 600;
}

.live-viewers-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(22, 22, 28, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-pink);
    animation: livePulseDot 1.5s infinite;
}

@keyframes livePulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.live-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(22, 22, 28, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.2s ease;
}

.live-close-btn:hover {
    color: #ffffff;
    transform: scale(1.1);
    background: rgba(254, 44, 85, 0.8);
}

/* Floating Heart Tap Area & Engine */
.live-heart-tap-area {
    position: absolute;
    right: 20px;
    bottom: 80px;
    width: 140px;
    height: 320px;
    z-index: 8;
    pointer-events: auto;
}

.live-floating-heart {
    position: absolute;
    bottom: 0;
    animation: floatHeartUp 2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
    pointer-events: none;
}

@keyframes floatHeartUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.6) rotate(0deg);
    }
    50% {
        transform: translateY(-160px) scale(1.2) rotate(15deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-320px) scale(1.4) rotate(-20deg);
    }
}

.live-heart-combo-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--brand-pink);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 1px 6px;
    display: none;
    box-shadow: 0 0 8px rgba(254, 44, 85, 0.8);
}

.live-heart-combo-badge.active {
    display: block;
    animation: comboPop 0.2s ease;
}

@keyframes comboPop {
    0% { transform: scale(0.7); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Floating Chat Ticker */
.live-chat-ticker-container {
    position: relative;
    z-index: 10;
    padding: 0 16px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: auto;
}

.live-chat-welcome-pill {
    background: rgba(22, 22, 28, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.3;
}

.live-chat-messages-box {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scrollbar-width: none;
    mask-image: linear-gradient(to top, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 80%, transparent 100%);
}

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

.live-chat-message-item {
    background: rgba(22, 22, 28, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 5px 12px;
    font-size: 0.82rem;
    line-height: 1.35;
    word-break: break-word;
    display: inline-block;
    align-self: flex-start;
    animation: messageSlideIn 0.2s ease;
}

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

.live-chat-message-item.is-gift-notice {
    background: linear-gradient(90deg, rgba(254, 44, 85, 0.85), rgba(255, 183, 3, 0.85));
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(254, 44, 85, 0.5);
}

.live-msg-author {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8rem;
    margin-right: 4px;
}

/* Bottom Action Bar */
.live-bottom-bar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.live-chat-input-form {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.live-chat-input {
    width: 100%;
    background: rgba(22, 22, 28, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    color: #ffffff;
    padding: 10px 42px 10px 18px;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.live-chat-input:focus {
    border-color: var(--brand-pink);
    box-shadow: 0 0 0 2px rgba(254, 44, 85, 0.2);
}

.live-send-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--brand-pink);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(22, 22, 28, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}

.live-icon-btn:hover {
    transform: scale(1.12);
    background: rgba(255, 255, 255, 0.15);
}

.live-icon-btn:active {
    transform: scale(0.92);
}

/* Sidebar Rail (Desktop) */
.live-sidebar-rail {
    width: 360px;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    height: 100%;
}

.live-channel-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.live-channel-card:hover {
    background: var(--bg-page);
}

.live-channel-card.active {
    background: rgba(254, 44, 85, 0.1);
    border: 1px solid rgba(254, 44, 85, 0.25);
}

.live-badge-mini {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--brand-pink);
    color: #ffffff;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 999px;
    border: 1px solid var(--bg-surface);
}

.live-gift-tile {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.live-gift-tile:hover {
    background: rgba(254, 44, 85, 0.15);
    border-color: var(--brand-pink);
    transform: scale(1.05);
}

/* Fullscreen gift blast */
.live-gift-blast-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: blastFade 2.5s forwards;
}

.live-gift-blast-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: blastPop 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.live-gift-blast-icon {
    font-size: 7rem;
    filter: drop-shadow(0 0 30px rgba(255, 183, 3, 0.8));
}

.live-gift-blast-banner {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 20px #fe2c55, 0 0 40px #25f4ee;
    letter-spacing: 2px;
    margin-top: 10px;
}

@keyframes blastPop {
    0% { transform: scale(0.2) rotate(-20deg); opacity: 0; }
    50% { transform: scale(1.3) rotate(10deg); opacity: 1; }
    70% { transform: scale(1) rotate(0deg); opacity: 1; }
    100% { transform: scale(1.1); opacity: 1; }
}

@keyframes blastFade {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* ==========================================================================
   AUTHENTIC TIKTOK PROFILE PAGE & HOVER VIDEO PREVIEWS
   ========================================================================== */
.tiktok-profile-header {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.tiktok-story-ring {
    position: relative;
    padding: 4px;
    background: linear-gradient(135deg, #fe2c55 0%, #25f4ee 50%, #fe2c55 100%);
    background-size: 200% 200%;
    animation: storyRingGlow 4s ease infinite;
    border-radius: 50%;
    display: inline-block;
}

@keyframes storyRingGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.profile-avatar-img {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--bg-surface);
}

.profile-stat-box {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.profile-stat-box:hover {
    background: rgba(254, 44, 85, 0.08);
    transform: translateY(-1px);
}

.profile-stat-num {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.profile-stat-lbl {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.btn-tiktok-primary {
    background: linear-gradient(135deg, #fe2c55, #ff3b5c);
    color: #ffffff !important;
    border: none;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.5rem 1.6rem;
    font-size: 0.92rem;
    box-shadow: 0 4px 15px rgba(254, 44, 85, 0.35);
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-tiktok-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 44, 85, 0.45);
    color: #ffffff;
}

.btn-tiktok-secondary {
    background: var(--bg-primary);
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
    font-weight: 600;
    border-radius: 999px;
    padding: 0.5rem 1.3rem;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-tiktok-secondary:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

/* Profile Tabs */
.tiktok-profile-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.75rem;
    padding: 0;
    list-style: none;
}

.tiktok-profile-tab-item {
    position: relative;
    padding: 12px 18px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tiktok-profile-tab-item:hover {
    color: var(--text-primary);
}

.tiktok-profile-tab-item.active {
    color: var(--text-primary);
    font-weight: 700;
}

.tiktok-profile-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
}

/* Video Grid Card & Video Hover Autoplay */
.tiktok-video-card {
    position: relative;
    aspect-ratio: 9/16;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s ease;
}

.tiktok-video-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.tiktok-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.tiktok-hover-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.tiktok-card-bottom-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}

.tiktok-view-count {
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.tiktok-card-caption-preview {
    position: absolute;
    bottom: 34px;
    left: 10px;
    right: 10px;
    font-size: 0.78rem;
    color: #f1f1f1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

.tiktok-video-card:hover .tiktok-card-caption-preview {
    opacity: 1;
    transform: translateY(0);
}

.tiktok-pinned-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #fe2c55;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    letter-spacing: 0.5px;
}

.tiktok-repost-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 209, 102, 0.95);
    color: #000000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 3;
}

/* User Relations Modal Items */
.relations-modal-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 12px;
    transition: background 0.15s ease;
}

.relations-modal-user-item:hover {
    background: rgba(125, 125, 125, 0.08);
}

/* Mobile Responsive Refinements */
@media (max-width: 768px) {
    .tiktok-profile-header {
        padding: 1.5rem 1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        background: transparent;
        box-shadow: none;
    }
    .profile-avatar-img {
        width: 90px;
        height: 90px;
    }
    .tiktok-profile-tabs {
        gap: 1rem;
    }
    .tiktok-profile-tab-item {
        padding: 10px 8px;
        font-size: 0.92rem;
    }
}

/* ==========================================================================
   SMALL PROFILE VIDEO GRID (COMPACT REELS THUMBNAILS)
   ========================================================================== */
.profile-video-grid-small {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

@media (max-width: 1200px) {
    .profile-video-grid-small {
        grid-template-columns: repeat(5, 1fr);
        gap: 7px;
    }
}

@media (max-width: 991px) {
    .profile-video-grid-small {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
}

@media (max-width: 768px) {
    .profile-video-grid-small {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .profile-video-grid-small {
        grid-template-columns: repeat(3, 1fr);
        gap: 3px;
    }
}

.profile-video-grid-item {
    width: 100%;
}

.profile-video-grid-small .tiktok-video-card {
    border-radius: 6px;
}

.profile-video-grid-small .tiktok-view-count {
    font-size: 0.72rem;
    font-weight: 700;
}

.profile-video-grid-small .tiktok-card-bottom-info {
    padding: 4px 6px;
}

.profile-video-grid-small .tiktok-pinned-badge {
    font-size: 0.62rem;
    padding: 2px 5px;
    top: 4px;
    left: 4px;
}

.profile-video-grid-small .tiktok-repost-badge {
    font-size: 0.62rem;
    padding: 2px 5px;
    top: 4px;
    left: 4px;
}

/* ==========================================================================
   TIKTOK CREATOR STUDIO & MULTI-SOURCE VIDEO EDITOR
   ========================================================================== */
.creator-studio-container {
    max-width: 1240px;
    margin: 0 auto;
}

.studio-mode-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 1.75rem;
    scrollbar-width: none;
}
.studio-mode-nav::-webkit-scrollbar {
    display: none;
}

.studio-mode-pill {
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    user-select: none;
}

.studio-mode-pill:hover {
    color: var(--text-primary);
    border-color: rgba(254, 44, 85, 0.4);
    transform: translateY(-1px);
}

.studio-mode-pill.active {
    background: linear-gradient(135deg, #fe2c55, #ff3b5c);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(254, 44, 85, 0.38);
}

.studio-card-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

/* Video Editor Canvas / Viewport */
.editor-viewport-wrap {
    position: relative;
    aspect-ratio: 9/16;
    max-height: 480px;
    margin: 0 auto;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.editor-viewport-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter 0.2s ease;
}

/* CSS Filters for Live Studio Preview */
.filter-normal { filter: none; }
.filter-vibrant { filter: contrast(1.25) saturate(1.4) brightness(1.04); }
.filter-cyberpunk { filter: contrast(1.2) hue-rotate(200deg) saturate(1.3); }
.filter-vintage { filter: sepia(0.35) contrast(1.1) brightness(0.95); }
.filter-noir { filter: grayscale(1) contrast(1.35) brightness(0.95); }
.filter-sunset { filter: sepia(0.25) saturate(1.35) hue-rotate(-15deg); }

.editor-filter-btn {
    border-radius: 12px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.editor-filter-btn:hover {
    border-color: #fe2c55;
}

.editor-filter-btn.active {
    border-color: #fe2c55;
    background: rgba(254, 44, 85, 0.12);
    color: #fe2c55;
    font-weight: 700;
}

/* Draggable Text Overlay on Video */
.editor-text-overlay {
    position: absolute;
    top: 35%;
    left: 15%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: move;
    user-select: none;
    border: 1px dashed rgba(255, 255, 255, 0.4);
    z-index: 10;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* Slideshow Sequence Tray */
.slideshow-sequence-tray {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 4px;
    min-height: 120px;
    align-items: center;
}

.slideshow-img-card {
    width: 80px;
    height: 110px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.slideshow-img-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slideshow-img-order {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-img-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #fe2c55;
    color: #fff;
    border: none;
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Live Smartphone Mockup Simulator */
.phone-simulator-frame {
    width: 290px;
    height: 560px;
    border-radius: 36px;
    border: 8px solid #1a1a24;
    background: #000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 16px;
    background: #1a1a24;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 25;
}

.phone-screen {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #000;
}

.phone-live-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-right-actions {
    position: absolute;
    right: 10px;
    bottom: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 15;
}

.phone-action-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-size: 1.25rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.phone-action-icon span {
    font-size: 0.65rem;
    font-weight: 700;
}

.phone-bottom-caption {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 60px;
    z-index: 15;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.9);
}

.phone-caption-user {
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.phone-caption-text {
    font-size: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.phone-music-disc {
    position: absolute;
    bottom: 14px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #111;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: discRotate 4s linear infinite;
    z-index: 15;
}

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

@media (max-width: 991px) {
    .phone-simulator-frame {
        width: 240px;
        height: 480px;
    }
}

/* ==========================================================================
   CAPCUT & INSHOT PRO VIDEO STUDIO ENGINE STYLES
   ========================================================================== */
.capcut-monitor-wrapper {
    background: #08080c;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.capcut-viewport {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    transition: aspect-ratio 0.3s ease, max-height 0.3s ease, width 0.3s ease;
}

.capcut-viewport.ratio-9-16 {
    aspect-ratio: 9/16;
    height: 460px;
    max-width: 100%;
}

.capcut-viewport.ratio-1-1 {
    aspect-ratio: 1/1;
    height: 380px;
    max-width: 100%;
}

.capcut-viewport.ratio-16-9 {
    aspect-ratio: 16/9;
    height: 310px;
    width: 100%;
    max-width: 550px;
}

.capcut-viewport.ratio-4-5 {
    aspect-ratio: 4/5;
    height: 420px;
    max-width: 100%;
}

.capcut-canvas-bg {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    opacity: 0.55;
    filter: blur(28px);
    z-index: 1;
    pointer-events: none;
    transition: all 0.3s ease;
}

.capcut-canvas-bg.bg-black {
    background: #000 !important;
    filter: none !important;
    opacity: 1 !important;
}

.capcut-canvas-bg.bg-gradient {
    background: linear-gradient(135deg, #1f0d3d, #0b1a30, #2b0b1e) !important;
    filter: none !important;
    opacity: 1 !important;
}

#editorVideoElement {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    z-index: 2;
    transition: filter 0.2s ease, transform 0.25s ease;
}

/* Visual FX Layer */
.capcut-fx-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.capcut-fx-layer.fx-glitch {
    animation: fxGlitchShake 0.35s infinite alternate ease-in-out;
    box-shadow: inset 0 0 40px rgba(37, 244, 238, 0.35), inset 0 0 60px rgba(254, 44, 85, 0.35);
}

@keyframes fxGlitchShake {
    0% { transform: translate(0, 0); filter: hue-rotate(0deg); }
    20% { transform: translate(-3px, 2px); filter: hue-rotate(40deg); }
    40% { transform: translate(2px, -2px); filter: hue-rotate(-30deg); }
    60% { transform: translate(-2px, -1px); }
    100% { transform: translate(3px, 1px); filter: hue-rotate(15deg); }
}

.capcut-fx-layer.fx-vhs {
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.25),
        rgba(0, 0, 0, 0.25) 2px,
        transparent 2px,
        transparent 4px
    );
    opacity: 0.85;
}

.capcut-fx-layer.fx-grain {
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 0);
    background-size: 4px 4px;
    opacity: 0.75;
}

.capcut-fx-layer.fx-vignette {
    box-shadow: inset 0 0 85px rgba(0, 0, 0, 0.95);
}

.capcut-fx-layer.fx-glow {
    backdrop-filter: blur(1px) brightness(1.15) contrast(1.1);
    box-shadow: inset 0 0 45px rgba(255, 230, 0, 0.25);
}

/* Safe Zone Margins */
.capcut-safe-zone {
    position: absolute;
    inset: 48px 24px 80px 24px;
    border: 1px dashed rgba(254, 44, 85, 0.65);
    border-radius: 8px;
    pointer-events: none;
    z-index: 6;
}

/* Overlays Layer (Texts, Captions, Stickers) */
.capcut-overlays-container {
    position: absolute;
    inset: 0;
    z-index: 5;
    overflow: hidden;
}

.capcut-overlay-item {
    position: absolute;
    user-select: none;
    cursor: grab;
    z-index: 10;
    transition: transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: pre-wrap;
    text-align: center;
    line-height: 1.25;
}

.capcut-overlay-item:active {
    cursor: grabbing;
}

.capcut-overlay-item.selected {
    outline: 2px dashed #fe2c55;
    outline-offset: 4px;
}

.overlay-delete-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 22px;
    height: 22px;
    background: #fe2c55;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    z-index: 20;
    border: 1.5px solid #fff;
}

/* CapCut Subtitle Typography Styles */
.capcut-overlay-item.style-tiktok {
    color: #ffe600;
    font-weight: 900;
    text-shadow: 
        -2px -2px 0 #000, 2px -2px 0 #000, 
        -2px 2px 0 #000, 2px 2px 0 #000,
        0 4px 10px rgba(0,0,0,0.9);
}

.capcut-overlay-item.style-neon {
    color: #25f4ee;
    font-weight: 800;
    text-shadow: 
        0 0 8px #25f4ee, 
        0 0 18px #25f4ee, 
        0 0 32px #fe2c55,
        -1px -1px 0 #000, 1px 1px 0 #000;
}

.capcut-overlay-item.style-alert {
    color: #ffffff;
    background: #fe2c55;
    padding: 6px 16px;
    border-radius: 10px;
    font-weight: 900;
    box-shadow: 0 4px 16px rgba(254, 44, 85, 0.6);
}

.capcut-overlay-item.style-luxury {
    background: linear-gradient(135deg, #fff382, #ffd700, #ff9900);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.8));
}

.capcut-overlay-item.style-retro {
    color: #00ff66;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 102, 0.8), -1px -1px 0 #000;
    background: rgba(0, 0, 0, 0.65);
    padding: 4px 12px;
    border-radius: 6px;
}

.capcut-overlay-item.style-minimal {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.45);
    padding: 4px 12px;
    border-radius: 6px;
}

.capcut-overlay-item.is-sticker {
    font-size: 2.4rem;
    line-height: 1;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}

/* Floating Transport Bar */
.capcut-transport-bar {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 480px;
    background: rgba(22, 22, 30, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 6px 16px;
}

.timecode-display {
    font-size: 0.8rem;
    font-weight: 700;
    color: #25f4ee;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

.transport-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.transport-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fe2c55;
}

.transport-btn-play {
    background: #fe2c55 !important;
    width: 36px;
    height: 36px;
    box-shadow: 0 2px 10px rgba(254, 44, 85, 0.5);
}

.transport-btn-play:hover {
    transform: scale(1.08);
}

/* ==========================================================================
   CAPCUT MULTI-TRACK TIMELINE
   ========================================================================== */
.capcut-timeline-container {
    background: #0e0e14;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.timeline-header-ruler {
    height: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    margin-bottom: 8px;
    user-select: none;
}

.ruler-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: monospace;
}

.timeline-tracks-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 140px;
    position: relative;
}

/* Playhead Needle */
.timeline-playhead-needle {
    position: absolute;
    top: -24px;
    bottom: 0;
    left: 0%;
    width: 2px;
    background: #fe2c55;
    z-index: 30;
    pointer-events: none;
    transition: left 0.05s linear;
}

.playhead-tag {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: #fe2c55;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.playhead-line {
    width: 2px;
    height: 100%;
    background: #fe2c55;
    box-shadow: 0 0 8px rgba(254, 44, 85, 0.8);
}

.timeline-track {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0 8px;
}

.track-label {
    width: 95px;
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
}

.track-clips-lane {
    flex-grow: 1;
    height: 32px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Filmstrip video lane */
.video-filmstrip-strip {
    display: flex;
    height: 100%;
    width: 100%;
    gap: 2px;
}

.filmstrip-frame {
    height: 100%;
    width: 44px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.85;
}

.trim-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 16px;
    background: #fe2c55;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.7rem;
    cursor: ew-resize;
    z-index: 15;
    box-shadow: 0 0 8px rgba(0,0,0,0.7);
}

.trim-handle-start {
    left: 0%;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.trim-handle-end {
    right: 0%;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.audio-track-pill {
    background: rgba(37, 244, 238, 0.15);
    border: 1px solid rgba(37, 244, 238, 0.35);
    color: #25f4ee;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    height: 100%;
    display: flex;
    align-items: center;
}

.timeline-chip {
    position: absolute;
    top: 3px;
    bottom: 3px;
    background: rgba(255, 230, 0, 0.25);
    border: 1px solid rgba(255, 230, 0, 0.6);
    color: #ffe600;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    padding: 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   CAPCUT TOOL DOCK & TABS
   ========================================================================== */
.capcut-tool-dock-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dock-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.dock-tab-btn i {
    font-size: 1.15rem;
}

.dock-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.dock-tab-btn.active {
    color: #fe2c55;
    background: rgba(254, 44, 85, 0.12);
    border-color: rgba(254, 44, 85, 0.35);
}

.dock-panel {
    animation: dockFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    padding-top: 10px;
}

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

.capcut-style-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.capcut-style-card:hover, .capcut-style-card.active {
    border-color: #fe2c55;
    background: rgba(254, 44, 85, 0.1);
}

.capcut-preview-pill {
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-block;
}

.pill-tiktok { color: #ffe600; text-shadow: -1px -1px 0 #000, 1px 1px 0 #000; }
.pill-neon { color: #25f4ee; text-shadow: 0 0 6px #25f4ee; }
.pill-alert { background: #fe2c55; color: #fff; padding: 2px 8px; border-radius: 4px; }
.pill-luxury { color: #ffd700; }
.pill-retro { color: #00ff66; font-family: monospace; }
.pill-minimal { color: #fff; }

.sticker-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    font-size: 1.4rem;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}

.sticker-btn:hover {
    transform: scale(1.18);
    background: rgba(254, 44, 85, 0.15);
    border-color: #fe2c55;
}

.capcut-fx-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.capcut-fx-chip:hover, .capcut-fx-chip.active {
    background: rgba(254, 44, 85, 0.15);
    border-color: #fe2c55;
    color: #fe2c55;
}

.editor-speed-chip.active {
    background: #fe2c55 !important;
    color: #fff !important;
    border-color: #fe2c55 !important;
    font-weight: 800;
}


