/* Core Global Layout Declarations */
:root {
    --bg-dark: #f8fafc;
    --surface-glass: rgba(255, 255, 255, 0.75);
    --surface-glass-hover: rgba(255, 255, 255, 0.9);
    --border-glass: rgba(15, 23, 42, 0.08);
    --primary-grad: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --accent-glow: rgba(99, 102, 241, 0.2);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --nav-height: 72px;
    --orb-opacity: 0.12;
}

[data-theme="dark"] {
    --bg-dark: #09090b;
    --surface-glass: rgba(22, 22, 29, 0.7);
    --surface-glass-hover: rgba(35, 35, 47, 0.85);
    --border-glass: rgba(255, 255, 255, 0.08);
    --accent-glow: rgba(168, 85, 247, 0.4);
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --orb-opacity: 0.25;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}
body.new-layout {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            overflow-x: hidden;
        }
/* Ambient Background Blur Orbs */
.bg-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    opacity: var(--orb-opacity);
    transition: opacity 0.3s ease;
}
.orb-1 { top: -50px; left: -50px; background: rgba(99, 102, 241, 1); }
.orb-2 { bottom: 100px; right: -50px; background: rgba(168, 85, 247, 1); }

/* Navigation Architecture Layouts */
.top-nav, .bottom-nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--surface-glass);
    border: 1px solid var(--border-glass);
    z-index: 100;
    transition: background 0.3s, border 0.3s;
}

.top-nav {
    height: 64px;
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    border-top: none;
    gap: 1rem;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, var(--brand-accent-crimson), var(--accent-glow-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo span {
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Fluid Search Bar Engine Styling */
.search-container {
    position: relative;
    flex: 1;
    max-width: 480px;
}

.search-container input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 8px 12px 8px 36px;
    border-radius: 20px;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}
input, select, textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 8px 12px 8px 36px;
    border-radius: 20px;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}
[data-theme="light"] .search-container input {
    background: rgba(15, 23, 42, 0.04);
}
.search-container input:focus {
    background: var(--surface-glass-hover);
    border-color: #6366f1;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    pointer-events: none;
    opacity: 0.6;
}

.top-nav-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    position: relative;
    transition: all 0.2s ease;
}
[data-theme="light"] .icon-btn { background: rgba(15, 23, 42, 0.05); }
.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 8px #ef4444;
}

.new_msg_badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    padding: 1px;
    display: none;
    height: 18px;
    text-align: center;
    background: red;
    color: white;
    font-size: 11px;
    border-radius: 50%;
    box-shadow: 0 0 8px red;
}
.profile-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    position: relative;
    transition: all 0.2s ease;
}
.badge_online {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 8px;
    height: 8px;
    background: green;
    border-radius: 50%;
    box-shadow: 0 0 8px green;
}

/* Modular Modal Presentation Overlays */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 1rem;
    transition: opacity 0.25s ease;
}

.modal-card {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.75rem;
}

.modal-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.9rem;
}
.modal-item:last-child { border-bottom: none; }

.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes modalSlide {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Scrollable Main Layout Canvas Frame */
#content-frame {
    margin-top: 64px;
    margin-bottom: var(--nav-height);
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    position: relative;
    z-index: 10;
}

/* Bottom Bar Navigation (Mobile Default) */
.bottom-nav {
    height: var(--nav-height);
    position: fixed;
    bottom: 0; 
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.25rem;
    border-bottom: none;
    border-radius: 20px 20px 0 0;
}

.nav-item {
    background: none; 
    border: none;
    display: flex; 
    flex-direction: column; 
    align-items: center;
    color: var(--text-muted); 
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
}

.icon-wrapper {
    font-size: 1.25rem;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    margin-top: 4px;
}

.nav-item.active .icon-wrapper {
    background: rgba(99, 102, 241, 0.15);
    color: #a855f7;
    transform: translateY(-4px);
}
.nav-item.active .nav-label {
    color: var(--text-main);
    font-weight: 600;
}

.action-btn .center-glow {
    background: var(--primary-grad);
    box-shadow: 0 4px 15px var(--accent-glow);
    transform: translateY(-10px);
    padding: 12px;
    border-radius: 50%;
}
.action-btn.active .center-glow { box-shadow: 0 0 25px #a855f7; }

/* Dynamic Card Framework Elements */
.glass-card {
    background: var(--surface-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(10px);
    transition: background 0.3s, border 0.3s;
}

.btn-primary {
    background: var(--primary-grad);
    color: white; border: none;
    padding: 8px 16px; border-radius: 8px;
    font-weight: 600; cursor: pointer;
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.video-preview {
    width: 100%; aspect-ratio: 16/9;
    background: linear-gradient(45deg, #1e1b4b, #311042);
    border-radius: 12px;
    margin-bottom: 0.75rem;
}
[data-theme="light"] .video-preview { background: linear-gradient(45deg, #cbd5e1, #e2e8f0); }

/* Responsive Transformative View Configurations (Desktop Layout Transformation) */
@media (min-width: 768px) {
    .logo { font-size: 1.4rem; }
    .top-nav { 
        left: 0; 
        width: 100%; 
        padding: 0 2rem; 
        border-bottom: 1px solid var(--border-glass);
        border-radius: 0;
    }
    .bottom-nav {
        top: 64px; 
        left: 0; 
        bottom: auto;
        width: 100%; 
        height: 56px;
        flex-direction: row; 
        justify-content: center;
        padding-top: 0; 
        gap: 1rem;
        border-top: none;
        border-bottom: 1px solid var(--border-glass); 
        border-radius: 0;
    }
    .nav-item { 
        flex: 0 1 auto; 
        width: auto; 
        flex-direction: row; 
        gap: 0.5rem; 
        padding: 6px 12px; 
        border-radius: 8px; 
    }
    .nav-item.active .icon-wrapper { 
        transform: none; 
        background: rgba(99, 102, 241, 0.15); 
    }
    .nav-item.active { 
        background: rgba(255, 255, 255, 0.05); 
        border: 1px solid var(--border-glass); 
    }
    [data-theme="light"] .nav-item.active { background: rgba(15, 23, 42, 0.05); }
    .action-btn .center-glow { 
        transform: none; 
        border-radius: 8px; 
        padding: 6px 12px; 
        background: var(--primary-grad); 
        box-shadow: 0 4px 15px var(--accent-glow);
    }
    #content-frame { 
        margin-left: 0; 
        margin-top: 120px; /* Accounts for both top-nav (64px) and top-positioned bottom-nav (~56px) */
        margin-bottom: 0; 
        padding: 2rem; 
    }
}

/* Header Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--bg-surface);
    height: 70px;
}

.search-bar input {
    width: 400px;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--bg-surface);
    background-color: #000;
    color: var(--text-main);
    outline: none;
}

.user-profile {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--accent);
}

/* Fluid Layout Engine (Grid-to-Flex responsive map) */
.main-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}

/* Main Interactive Video Player Column */
.player-section {
    display: flex;
    flex-direction: column;
}

.video-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    z-index: 1;
}

#mainPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 3;
}

/* Immersive Ambient Backglow */
.ambient-glow {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center;
    filter: blur(60px) opacity(0.45);
    z-index: 2;
    transition: background 0.5s ease;
    pointer-events: none;
}

.video-metadata {
    margin-top: 1.5rem;
}

.video-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.video-stats {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.video-description {
    background-color: var(--bg-surface);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Engagement Sidebar Styling */
.sidebar-section {
    background-color: var(--bg-surface);
    border-radius: 12px;
    padding: 1rem;
    height: fit-content;
}

.tab-menu {
    display: flex;
    border-bottom: 1px solid var(--bg-surface-hover);
    margin-bottom: 1rem;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.8rem;
    color: var(--text-muted);
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.tab-btn.active {
    color: var(--text-main);
    border-bottom: 2px solid var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Hover-to-Play Recommendation Card Components */
.preview-card {
    display: flex;
    gap: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.preview-card:hover {
    background-color: var(--bg-surface-hover);
}

.thumbnail-wrapper {
    position: relative;
    width: 140px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #000;
    flex-shrink: 0;
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.preview-card:hover .preview-video {
    opacity: 1;
}

.card-info h3 {
    font-size: 0.95rem;
    line-height: 1.2;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-info p, .card-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
}

/* Comments System styling */
.comment-box {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-surface-hover);
    flex-shrink: 0;
}

.comment-text strong {
    font-size: 0.85rem;
    color: var(--text-main);
}

.comment-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Fluid Responsive Breakpoints */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    .search-bar input {
        width: 250px;
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 1rem;
    }
    .search-bar {
        display: none;
    }
    .main-container {
        padding: 0.5rem;
        gap: 1rem;
    }
    .video-player-container {
        border-radius: 0;
    }
    .koyra_name {
        display: none;
    }
}

button { margin: 10px; }

* {
  scrollbar-width: none;
  scrollbar-color: #888 #f1f1f1;
}

/* Container styling for positioning the custom arrow */
.select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 300px;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  font-size: 16px;
  font-family: inherit;
  color: #333333;
  background-color: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.25s ease;
}

select:hover {
  border-color: #b3b3b3;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

select:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
  background-color: #fafafa;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 6px;
  background-color: #666666;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  pointer-events: none;
  transition: transform 0.25s ease;
}

.select-wrapper:focus-within::after {
  background-color: #4a90e2;
  transform: translateY(-50%) rotate(180deg);
}

select:disabled {
  background-color: #f5f5f5;
  color: #999999;
  border-color: #e0e0e0;
  cursor: not-allowed;
}

h1, h2, h3, h4 {
    font-size: 15px;
}

.avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            margin-right: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: #fff;
            background: linear-gradient(135deg, #0064e0, #2e89ff);
            font-size: 16px;
}