html {
    scroll-behavior: smooth;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-card: #1a1a1a;
    --bg-nav: #0e0e0e;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #777777;
    --color-gold: #f5b041;
    --color-gold-hover: #f39c12;
    --color-gold-light: rgba(245, 176, 65, 0.15);
    --border-color: #262626;
    --sidebar-width: 250px;
    --header-height: 60px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Scrollbars styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold);
}

/* Layout Containers */
#wrapper {
    display: flex;
    min-height: 100vh;
}

#main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-width));
}

/* Sidebar Styling */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--bg-nav);
    border-right: 1px solid var(--border-color);
    z-index: 1030;
    padding-top: var(--header-height);
    overflow-y: auto;
    transition: all 0.3s ease;
}

#sidebar .nav-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    letter-spacing: 1.5px;
}

#sidebar .nav-link {
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

#sidebar .nav-link i {
    font-size: 1.1rem;
    margin-right: 12px;
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

#sidebar .nav-link:hover, 
#sidebar .nav-link.active {
    color: var(--color-gold);
    background-color: rgba(255, 255, 255, 0.02);
    border-left-color: var(--color-gold);
}

#sidebar .nav-link:hover i, 
#sidebar .nav-link.active i {
    color: var(--color-gold);
}

/* Header Navbar */
#header-nav {
    height: var(--header-height);
    background-color: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.brand-container {
    width: calc(var(--sidebar-width) - 1.5rem);
    display: flex;
    align-items: center;
}

.site-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.site-logo span {
    color: var(--color-gold);
}

/* Search Bar styling */
.search-form {
    max-width: 500px;
    width: 100%;
}

.search-input-group {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    overflow: hidden;
    padding: 2px 5px 2px 15px;
    display: flex;
    align-items: center;
    transition: border-color 0.2s ease;
}

.search-input-group:focus-within {
    border-color: var(--color-gold);
}

.search-input-group input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 6px 0;
    width: 100%;
}

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

.search-input-group input:focus {
    outline: none;
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.search-btn:hover {
    color: var(--color-gold);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Global Gold Button utilities */
.btn-gold {
    background-color: var(--color-gold);
    color: #000 !important;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-gold:hover {
    background-color: var(--color-gold-hover);
    box-shadow: 0 0 10px rgba(245, 176, 65, 0.4);
}

.btn-outline-gold {
    background-color: transparent;
    color: var(--color-gold);
    border: 1px solid var(--color-gold);
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-outline-gold:hover {
    background-color: var(--color-gold);
    color: #000 !important;
}

.hover-gold:hover {
    color: var(--color-gold) !important;
}

.text-gold {
    color: var(--color-gold) !important;
}

.bg-gold-dark {
    background-color: var(--color-gold);
    color: #000;
}

/* Video Card Styling */
.video-card {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease !important;
    cursor: pointer;
    background-color: var(--bg-card) !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(245, 176, 65, 0.1) !important;
    border-color: rgba(245, 176, 65, 0.25) !important;
}

.video-card img {
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.video-card:hover img {
    transform: scale(1.04);
}

.opacity-85 {
    opacity: 0.85;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fs-7 {
    font-size: 0.8rem;
}

.fs-8 {
    font-size: 0.72rem;
}

/* Category Card Styling */
.category-card {
    cursor: pointer;
    background-color: var(--bg-card) !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
    border-radius: 12px !important;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(245, 176, 65, 0.1) !important;
    border-color: rgba(245, 176, 65, 0.25) !important;
}

.category-card img {
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.category-card:hover img {
    transform: scale(1.06);
}

.bg-gradient-dark {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0) 100%) !important;
}

/* Video Details Player */
.video-player-container {
    background-color: #000;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    position: relative;
}


.embed-responsive-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.embed-responsive-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Custom HTML5 Player Styling */
.custom-html5-player {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    max-height: 560px;
}

.player-mode-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

/* Details Page Action Bar */
.action-bar {
    background-color: var(--bg-secondary);
    border-radius: 6px;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
}

.tab-nav {
    border-bottom: 1px solid var(--border-color);
}

.tab-nav .nav-link {
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tab-nav .nav-link:hover {
    color: var(--color-gold);
}

.tab-nav .nav-link.active {
    color: var(--color-gold);
    border-bottom-color: var(--color-gold);
}

/* Comments List */
.comment-item {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Auth Cards (Login/Signup) */
.auth-container {
    max-width: 450px;
    width: 100%;
    margin: 5% auto;
}

.auth-card {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
    border: 1px solid rgba(245, 176, 65, 0.15);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.auth-card:hover {
    border-color: rgba(245, 176, 65, 0.35);
    box-shadow: 0 25px 60px rgba(245, 176, 65, 0.05), 0 20px 50px rgba(0, 0, 0, 0.7);
}

.auth-card .form-control {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.2s ease;
}

.auth-card .form-control:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 12px rgba(245, 176, 65, 0.25);
    background-color: rgba(0, 0, 0, 0.6);
}

/* Footer style */
footer {
    background-color: var(--bg-nav);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--color-gold);
}

/* ===== Pagination ===== */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px !important;
    min-width: 38px;
    text-align: center;
    transition: all 0.2s ease;
    font-size: 0.88rem;
    font-weight: 500;
}

.pagination .page-link:hover {
    background-color: var(--color-gold-light);
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.pagination .page-item.active .page-link {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(245, 176, 65, 0.4);
}

.pagination .page-item.disabled .page-link {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: #444;
    cursor: default;
}

/* Placeholder contrast improvement */
input::placeholder,
textarea::placeholder,
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Custom Nav Pills styling for upload page tabs */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: var(--color-gold) !important;
    color: #000 !important;
    font-weight: 600;
}
.nav-pills .nav-link {
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.2s ease;
}
.nav-pills .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--color-gold);
}
