:root {
    /* Brand Colors */
    --primary: #0A8A8A;
    /* Deep Modern Teal */
    --primary-hover: #0d9e9e;
    --primary-light: rgba(10, 138, 138, 0.1);
    --background: #111111;
    /* Soft Black */
    --surface: #1a1a1a;
    --surface-light: #242424;
    --text: #FFFFFF;
    /* Bright White */
    --text-muted: #a0a0a0;
    --accent: #0A8A8A;
    --danger: #ff4d4d;
    --warning: #ffc107;

    /* Layout & Spacing (8px grid) */
    --nav-height: 80px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);

    --container-max: 1400px;
    --section-spacing: 6rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scroll Snap/Smoothness */
html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Buttons Polish */
button,
.btn {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    border-radius: var(--border-radius);
    padding: 14px 28px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(10, 138, 138, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.btn-icon {
    width: 45px;
    height: 45px;
    padding: 0;
    border-radius: 50%;
    background: var(--surface-light);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.line-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Refined */
.glass {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Navigation - Redesigned */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

nav.scrolled {
    background: #ffffff;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #000000;
}

.logo img {
    height: 70px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    position: relative;
    font-weight: 500;
    color: #555555;
}

.nav-links a.active,
.nav-links a:hover {
    color: #000000;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-auth {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* User Avatar Dropdown */
.user-dropdown {
    position: relative;
    cursor: pointer;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Hero Section Refined */
.hero {
    height: 90vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    animation: heroZoom 20s infinite alternate linear;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(17, 17, 17, 0.95) 0%, rgba(17, 17, 17, 0.4) 60%, rgba(17, 17, 17, 0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    max-width: 800px;
    z-index: 2;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.05;
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Section Styling */
section {
    padding: var(--section-spacing) 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-muted);
}

/* Card Grids and Carousels */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none;
    /* Firefox */
}

.carousel::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Video Card Refined */
.video-card {
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.video-thumb-container {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.video-card:hover {
    transform: translateY(-10px);
}

.video-card:hover .video-thumbnail {
    transform: scale(1.1);
}

.video-card:hover .video-thumb-container {
    box-shadow: var(--shadow-lg);
}

.video-info {
    padding: 1rem 0.5rem;
}

.video-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Channel Card Refined */
.channel-card-new {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.channel-card-new:hover {
    background: var(--surface-light);
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.channel-card-new .avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--primary);
}

.badge-verified {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
}

/* Channel Card */
.channel-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.channel-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.channel-banner {
    width: 100%;
    height: 120px;
    background-color: #444;
    object-fit: cover;
}

.channel-content {
    padding: 1.5rem;
    text-align: center;
    margin-top: -40px;
}

.channel-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--surface);
    background-color: #555;
    margin: 0 auto 1rem;
    object-fit: cover;
}

.channel-name {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.channel-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}

/* Footer */
footer {
    padding: 4rem 0;
    background-color: #0d0d0d;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Video Player Page */
.watch-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    padding-top: calc(var(--nav-height) + 2rem);
}

.video-main {
    width: 100%;
}

.player-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: black;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.video-details {
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--border-radius);
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.video-channel-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Auth Pages */
.auth-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 3rem;
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: white;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Dashboard */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--surface);
    padding: 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.dash-main {
    padding: 2rem;
}

/* Donation Modal & Flow */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: var(--transition);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.donation-modal {
    width: 100%;
    max-width: 500px;
    background: var(--surface);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .donation-modal {
    transform: translateY(0);
}

.donation-step {
    display: none;
}

.donation-step.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

.donation-opts {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.opt-btn {
    flex: 1;
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.opt-btn.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.payment-method:hover,
.payment-method.active {
    background: rgba(10, 138, 138, 0.05);
    border-color: var(--primary);
}

.method-icon {
    width: 40px;
    height: 40px;
    background: #222;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Success Components */
.success-check {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    animation: checkPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes checkPop {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 2px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .watch-container {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .footer-links {
        gap: 2rem;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}