/* ========================================
   StreamNest — Premium Dark Design System 
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Core Palette */
    --bg-primary: #0a0a10;
    --bg-secondary: #13131d;
    --bg-tertiary: #1c1c2e;
    --bg-accent: #252540;

    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #55556a;

    /* Brand Accent */
    --accent: #7c5cfc;
    --accent-light: #a29bfe;
    --accent-dark: #5a3fd6;
    --accent-glow: rgba(124, 92, 252, 0.35);
    --accent-gradient: linear-gradient(135deg, #7c5cfc 0%, #a29bfe 50%, #6c5ce7 100%);

    /* Semantic Colors */
    --success: #2ed573;
    --danger: #ff4757;
    --warning: #ffa502;
    --info: #1e90ff;

    /* Surfaces */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Timing */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* -------- RESET -------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    /* Anti-Download/Anti-Copy Shield */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Allow selection in specific readable/input areas only */
input,
textarea,
[contenteditable="true"],
.selectable,
.comment-text,
.desc-content,
.video-watch-title,
.changelog-content {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

img,
video {
    pointer-events: none;
    -webkit-user-drag: none;
}

/* Allow interaction for specific media elements that need controls */
.player-container video,
.player-container .custom-controls,
.player-container .player-btn,
.upload-dropzone video,
a,
button,
input,
textarea {
    pointer-events: auto;
}





html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(124, 92, 252, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(162, 155, 254, 0.05), transparent);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-normal);
}

img {
    max-width: 100%;
}

/* -------- SCROLLBAR -------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-accent);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ========================================
   NOTIFICATION BAR
   ======================================== */
.notification-bar {
    background: var(--accent-gradient);
    color: white;
    text-align: center;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    animation: barPulse 3s ease-in-out infinite;
}

@keyframes barPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    background: rgba(19, 19, 29, 0.85);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.5px;
}

.logo i {
    -webkit-text-fill-color: var(--accent);
    font-size: 1.3rem;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-item {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
}

.nav-item:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(124, 92, 252, 0.15);
    color: var(--accent-light);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -0.8rem;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-normal);
}

.user-menu:hover {
    border-color: var(--glass-border-hover);
    background: var(--glass-bg-hover);
}

.user-menu img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
    background: var(--accent-gradient);
    border: none;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #e84118);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #05c46b);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.content-wrapper {
    min-height: calc(100vh - 160px);
}

/* ========================================
   VIDEO GRID
   ======================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-slow);
    border: 1px solid var(--glass-border);
    position: relative;
}

.video-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, transparent 40%, var(--accent) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-slow);
    pointer-events: none;
    z-index: 1;
}

.video-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.video-card:hover::before {
    opacity: 1;
}

.thumbnail-wrapper {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
}

.thumbnail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.video-card:hover .thumbnail-img {
    transform: scale(1.08);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 2;
}

.video-info {
    padding: 1rem 1.2rem;
    display: flex;
    gap: 0.8rem;
}

.video-info-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.video-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.channel-name {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition-normal);
}

.channel-name:hover {
    color: var(--text-primary);
}

.video-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.verified-badge {
    color: var(--accent-light);
    font-size: 0.75rem;
}

/* ========================================
   AUTH PAGES
   ======================================== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(124, 92, 252, 0.06), transparent 60%);
}

.auth-box {
    background: var(--bg-secondary);
    padding: 2.5rem 3rem;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.auth-title {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-normal);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238888a0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* ========================================
   STUDIO LAYOUT
   ======================================== */
.studio-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 60px);
}

.sidebar {
    background: var(--bg-secondary);
    padding: 2rem 1rem;
    border-right: 1px solid var(--glass-border);
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    object-fit: cover;
    box-shadow: var(--shadow-glow);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.3rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.sidebar-link.active,
.sidebar-link:hover {
    background: rgba(124, 92, 252, 0.12);
    color: var(--accent-light);
}

.sidebar-link.active {
    border-left: 3px solid var(--accent);
}

.dashboard-content {
    padding: 2rem 2.5rem;
}

/* ========================================
   STATS CARDS
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.stat-icon.purple {
    background: rgba(124, 92, 252, 0.15);
    color: var(--accent-light);
}

.stat-icon.green {
    background: rgba(46, 213, 115, 0.15);
    color: var(--success);
}

.stat-icon.red {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger);
}

.stat-icon.blue {
    background: rgba(30, 144, 255, 0.15);
    color: var(--info);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

/* ========================================
   VIDEO PLAYER PAGE
   ======================================== */
/* ========================================
   PREMIUM CUSTOM PLAYER
   ======================================== */
.watch-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    padding-top: 1rem;
}

.player-container {
    width: 100%;
    background: #000;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.video-element {
    width: 100%;
    height: 100%;
    display: block;
}

.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 25px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}


.player-container:hover .custom-controls {
    opacity: 1;
    visibility: visible;
}

/* Progress Bar */
.progress-area {
    width: 100%;
    height: 6px;
    cursor: pointer;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.progress-bar-wrap {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    transition: height 0.1s ease;
}

.progress-area:hover .progress-bar-wrap {
    height: 8px;
}

.progress-current {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 2px;
    width: 0%;
}

.progress-current::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    transition: transform 0.1s ease;
}

.progress-area:hover .progress-current::after {
    transform: translateY(-50%) scale(1);
}

/* Controls Bar */
.controls-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.player-btn:hover {
    transform: scale(1.15);
    color: var(--accent-light);
}

.player-btn:active {
    transform: scale(0.9);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    width: 0;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    accent-color: var(--accent);
}

.volume-container:hover .volume-slider {
    width: 80px;
    opacity: 1;
}

.time-display {
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
}

/* Speed Menu */
.speed-container {
    position: relative;
}

.speed-menu {
    position: absolute;
    bottom: 50px;
    right: 0;
    background: rgba(15, 15, 19, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 8px;
    display: flex;
    flex-direction: column;
    width: 80px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.speed-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.speed-menu span {
    padding: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    text-align: center;
    border-radius: 4px;
}

.speed-menu span:hover {
    background: rgba(255, 255, 255, 0.1);
}

.speed-menu span.active {
    color: var(--accent-light);
    font-weight: 700;
}

/* Video Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.large-play-icon {
    font-size: 5rem;
    color: #fff;
    filter: drop-shadow(0 0 20px var(--accent));
}

/* Watch Page Meta */
.video-watch-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 1.5rem 0 1rem;
    line-height: 1.3;
}

.video-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.channel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-meta {
    display: flex;
    flex-direction: column;
}

.channel-name-link {
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sub-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-subscribe {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-left: 1rem;
    transition: all 0.3s;
}

.btn-subscribe:hover {
    opacity: 0.9;
    transform: scale(1.03);
}

.btn-subscribe.subscribed {
    background: var(--bg-accent);
    color: var(--text-secondary);
}

.video-stats-actions {
    display: flex;
    gap: 0.8rem;
}

.action-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
}

.action-btn:hover {
    background: var(--glass-bg);
}

.action-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.video-description-box {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    margin-bottom: 2rem;
}

.desc-stats {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 1rem;
}

/* Sidebar Watch */
.video-sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
}

.sidebar-video-card {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    text-decoration: none;
}

.sidebar-thumb-wrap {
    width: 140px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-video-info {
    display: flex;
    flex-direction: column;
}

.sidebar-video-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-video-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Anti-Download Watermark */
.player-container::after {
    content: 'STREAMNEST SECURE';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.7rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.15);
    pointer-events: none;
    z-index: 10;
    letter-spacing: 2px;
}


/* ========================================
   ROLE BADGES
   ======================================== */
.role-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.role-owner {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a24;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
    animation: ownerGlow 2s ease-in-out infinite alternate;
}

@keyframes ownerGlow {
    from {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.2);
    }

    to {
        box-shadow: 0 0 18px rgba(255, 215, 0, 0.5);
    }
}

.role-admin {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
}

.role-moderator {
    background: linear-gradient(135deg, #2ed573, #7bed9f);
    color: #1a1a24;
}

.role-user {
    background: var(--bg-accent);
    color: var(--text-secondary);
}

/* ========================================
   PROFILE PAGE
   ======================================== */
.profile-banner {
    width: 100%;
    height: 280px;
    background: var(--accent-gradient);
    position: relative;
    overflow: hidden;
}

.profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-header {
    max-width: 1200px;
    margin: -60px auto 0;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.profile-avatar-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    object-fit: cover;
    box-shadow: var(--shadow-md);
    background: var(--bg-secondary);
}

.profile-info h1 {
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-info .profile-stats {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.profile-tabs {
    display: flex;
    gap: 0;
    margin-top: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.profile-tab {
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.profile-tab:hover,
.profile-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

/* ========================================
   ADMIN PANEL
   ======================================== */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.admin-table thead {
    background: var(--bg-tertiary);
}

.admin-table th {
    padding: 1rem 1.2rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
}

.admin-table td {
    padding: 0.9rem 1.2rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background var(--transition-normal);
}

.admin-table tbody tr:hover {
    background: var(--glass-bg);
}

.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.admin-user-cell img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========================================
   CHANGELOG
   ======================================== */
.changelog-timeline {
    position: relative;
    padding-left: 30px;
}

.changelog-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--bg-accent));
}

.changelog-entry {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.8rem 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--glass-border);
    position: relative;
    transition: all var(--transition-normal);
}

.changelog-entry::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.changelog-entry:hover {
    border-color: var(--glass-border-hover);
    transform: translateX(4px);
}

.changelog-version {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-light);
    margin-bottom: 0.4rem;
}

.changelog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.changelog-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.changelog-content {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.92rem;
}

.changelog-content ul {
    padding-left: 1.2rem;
    margin-top: 0.5rem;
}

.changelog-content li {
    margin-bottom: 0.4rem;
}

/* ========================================
   ALERTS & MESSAGES
   ======================================== */
.alert {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.alert-success {
    background: rgba(46, 213, 115, 0.12);
    color: var(--success);
    border: 1px solid rgba(46, 213, 115, 0.2);
}

.alert-error {
    background: rgba(255, 71, 87, 0.12);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.alert-info {
    background: rgba(124, 92, 252, 0.12);
    color: var(--accent-light);
    border: 1px solid rgba(124, 92, 252, 0.2);
}

/* ========================================
   UPLOAD DROPZONE
   ======================================== */
.upload-dropzone {
    border: 2px dashed var(--glass-border);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--glass-bg);
}

.upload-dropzone:hover {
    border-color: var(--accent);
    background: rgba(124, 92, 252, 0.06);
}

.upload-dropzone i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.upload-dropzone p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.upload-filename {
    color: var(--accent-light);
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========================================
   PROFILE ACCOUNT CARDS
   ======================================== */
.settings-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
}

.settings-card h3 {
    margin-bottom: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    opacity: 0.4;
}

.empty-state h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.empty-state p {
    max-width: 400px;
    margin: 0 auto 1.5rem;
    line-height: 1.5;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    border-top: 1px solid var(--glass-border);
    margin-top: 3rem;
    background: var(--bg-secondary);
}

.footer .container {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========================================
   COMMENT SECTION
   ======================================== */
.comment-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.comment-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.comment-text {
    font-size: 0.92rem;
    line-height: 1.5;
    margin-top: 0.3rem;
    color: var(--text-secondary);
}

.reply-trigger {
    color: var(--text-muted);
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}

.reply-trigger:hover {
    color: var(--accent-light);
}

.replies-list {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 1.5rem;
    margin-top: 1rem;
    margin-left: 1rem;
}

.reply-item {
    margin-bottom: 1.2rem;
    display: flex;
    gap: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.reply-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    border: 1px solid var(--glass-border);
}

.creator-heart-badge i {
    animation: heartPulse 2s ease-in-out infinite;
}

@keyframes heartPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.comment-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-glow);
}

/* ========================================
   SECRET FEATURES EASTER EGG
   ======================================== */
.secret-panel {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 165, 0, 0.05));
    border: 1px dashed rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.secret-panel::before {
    content: '🔮';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 2.5rem;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(10deg);
    }
}

.secret-panel h3 {
    color: #FFD700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   SUBSCRIBE BUTTON
   ======================================== */
.subscribe-btn {
    background: #ff0000;
    border: none;
    padding: 0.55rem 1.3rem;
    border-radius: var(--radius-full);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.subscribe-btn:hover {
    background: #cc0000;
    transform: scale(1.05);
}

.subscribe-btn.subscribed {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

/* ========================================
   DATA TABLE (Studio)
   ======================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
}

.data-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.data-table tr {
    transition: background var(--transition-normal);
}

.data-table tbody tr:hover {
    background: var(--glass-bg);
}

.table-video-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.table-thumb {
    width: 100px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.video-card {
    animation: fadeIn 0.4s ease forwards;
}

.video-card:nth-child(2) {
    animation-delay: 0.05s;
}

.video-card:nth-child(3) {
    animation-delay: 0.1s;
}

.video-card:nth-child(4) {
    animation-delay: 0.15s;
}

.video-card:nth-child(5) {
    animation-delay: 0.2s;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 1rem;
    }

    .nav-links {
        gap: 0.3rem;
    }

    .nav-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .studio-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .container {
        padding: 1rem;
    }

    .profile-banner {
        height: 160px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .watch-layout {
        grid-template-columns: 1fr;
        padding: 0.5rem;
    }

    .video-sidebar {
        margin-top: 2rem;
    }

    .custom-controls {
        padding: 10px;
    }

    .player-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .time-display {
        font-size: 0.7rem;
    }

    .volume-slider {
        display: none;
        /* Too hard to use on mobile */
    }
}