@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #f59e0b;
    --primary-glow: rgba(245, 158, 11, 0.4);
    --primary-hover: #d97706;
    --secondary: #8b5cf6;
    --secondary-glow: rgba(139, 92, 246, 0.4);
    --accent: #10b981;
    --bg-dark: #020617;
    --bg-lighter: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.6);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --danger: #ef4444;
    --success: #10b981;
    --border: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --nav-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: auto;
    min-height: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: visible;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.btn {
    cursor: pointer;
    border: none;
    outline: none;
    padding: 0.85rem 2rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    letter-spacing: 0.025em;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    box-shadow: 0 10px 15px -3px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: var(--glass-border);
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-5px);
}

.feature-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: 0.4s;
}

.feature-card:hover::before {
    opacity: 1;
}

.user-select-none {
    user-select: none;
    -webkit-user-select: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
nav {
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(12px);
    transition: all 0.4s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

nav.scrolled {
    background: rgba(2, 6, 23, 0.9);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

/* Premium Typography & Utilities */
.gradient-text {
    background: linear-gradient(90deg, #fbbf24 0%, #fb923c 40%, #e879f9 70%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float {
    animation: float 5s ease-in-out infinite;
}

/* Slider Styles */
.slider-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 2rem;
    margin-bottom: 4rem;
    background: var(--bg-lighter);
}

.slider-wrapper {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5rem;
}

.slide-content {
    max-width: 600px;
    opacity: 0;
    transform: translateX(-50px);
    transition: 0.8s 0.3s forwards;
}

.slide.active .slide-content {
    opacity: 1;
    transform: translateX(0);
}

.slider-nav {
    position: absolute;
    bottom: 2rem;
    right: 5rem;
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    background: var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.slider-dot.active {
    background: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--primary-glow);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    z-index: 10;
    transition: 0.3s;
}

.slider-btn:hover {
    background: var(--primary);
    color: #000;
}

.btn-prev {
    left: 2rem;
}

.btn-next {
    right: 2rem;
}

@media (max-width: 768px) {
    .slider-container {
        height: 400px;
    }

    .slide-overlay {
        padding: 0 2rem;
        text-align: center;
        background: rgba(2, 6, 23, 0.7);
    }

    .slider-nav {
        right: 50%;
        transform: translateX(50%);
    }

    .slider-btn {
        display: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-fade {
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.floating {
    animation: float 5s ease-in-out infinite;
}

.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    padding: 2rem 0;
}

.marquee-content {
    display: inline-flex;
    gap: 2rem;
    animation: marquee 40s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

/* Layout Utilities */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block !important;
    }

    .hero h1 {
        font-size: 2.2rem !important;
    }

    .glass-card {
        padding: 1.25rem;
        overflow-x: auto;
    }

    .glass-card table {
        min-width: 500px;
    }
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 2000;
    transition: 0.4s;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    border-left: 1px solid var(--border);
}

.mobile-nav-overlay.active {
    right: 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-lighter);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-main);
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* Video Grid */
.video-card {
    border-radius: 1.5rem;
    overflow: hidden;
    background: var(--bg-lighter);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-glow);
}

.video-thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s;
}

.video-card:hover .video-thumb {
    transform: scale(1.1);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.video-card:hover .video-overlay {
    opacity: 1;
}

.play-ico {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 0 20px var(--primary-glow);
}

.video-info {
    padding: 1.25rem;
}

.video-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.tag {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    font-size: 0.75rem;
}

/* Admin Sidebar Layout */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 260px;
    background: var(--bg-lighter);
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-section {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin: 1.5rem 0.75rem 0.75rem;
    opacity: 0.6;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 0.75rem;
    transition: 0.3s;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-link:hover {
    background: var(--glass);
    color: var(--text-main);
}

.sidebar-link.active {
    background: var(--glass);
    color: var(--primary);
    border: 1px solid var(--border);
}

.admin-main {
    flex: 1;
    padding: 2.5rem;
    overflow-x: hidden;
    width: 100%;
}

@media (max-width: 992px) {
    .admin-main {
        padding-top: 5rem;
    }
}

.admin-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    gap: 1.5rem;
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem !important;
    }

    #play-icon {
        font-size: 3rem !important;
    }

    .end-screen h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 992px) {
    .admin-mobile-nav {
        display: flex !important;
    }

    .sidebar {
        position: fixed !important;
        left: -280px;
        top: 0;
        height: 100vh !important;
        max-height: 100vh;
        z-index: 2000;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        left: 0;
    }

    #admin-sidebar-close {
        display: block !important;
    }

    .sidebar-nav {
        flex-direction: column !important;
        /* Stack them back for fly-out */
        overflow-x: visible !important;
    }

    .sidebar-label {
        display: block !important;
        /* Keep it in the fly-out drawer */
    }

    .admin-main {
        padding: 1.5rem 1rem;
    }
}

/* Mobile Bottom App-like Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 0.6rem 0.2rem;
    z-index: 3000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.5);
    border-radius: 20px 20px 0 0;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: var(--text-dim);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.4rem;
    flex: 1;
    transition: 0.3s;
    text-align: center;
}

.mobile-nav-item i {
    font-size: 1.1rem;
}

.mobile-nav-item:active {
    scale: 0.9;
}

.active-nav {
    color: var(--primary);
}

.active-nav i {
    text-shadow: 0 0 10px var(--primary-glow);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 70px;
        /* Space for bottom nav */
    }

    /* Admin Mobile Fixes */
    .admin-body #main-nav,
    .admin-body footer {
        display: none !important;
    }

    .admin-main {
        padding: 1.5rem 1rem !important;
    }

    .admin-header-flex {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 2rem;
        gap: 1rem;
    }

    .admin-header-flex h1 {
        font-size: 1.75rem !important;
    }

    .admin-actions {
        width: 100%;
        gap: 0.5rem;
    }

    .admin-actions .btn {
        flex: 1;
        padding: 0.75rem 1rem !important;
        font-size: 0.85rem !important;
        justify-content: center;
    }
}