:root {
    --primary-color: #f7941d; /* Warm orange */
    --secondary-color: #fbd304; /* Bright yellow */
    --accent-color: #ef4136; /* Soft red */
    --joy-green: #8cc63f;
    --joy-blue: #00aeef;
    --bg-color: #fffaf5; /* Warmer creamy white */
    --text-color: #432818; /* Rich chocolate brown */
    --muted-color: #7f5539;
    --white: #ffffff;
    --shadow: 0 12px 40px rgba(67, 40, 24, 0.08);
    --border-radius: 24px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Logo --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0; /* Reduced padding to remove "air" */
}

.logo-container {
    padding: 0;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.logo-container:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 110px; /* Significantly increased height for better visibility */
    width: auto;
    display: block;
}

/* --- Hero --- */
.hero {
    padding: 40px 0; /* Reduced padding to bring content up */
    text-align: center;
    background: radial-gradient(circle at top right, #fff9f0 0%, #fff 100%);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--bg-color);
    border-radius: 50% / 100% 100% 0 0;
}

.hero h1 {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    color: var(--muted-color);
}

.hero-banner {
    width: 100%;
    max-width: 800px;
    border-radius: 30px;
    box-shadow: var(--shadow);
    margin-top: 30px;
    transition: var(--transition);
}

.hero-banner:hover {
    transform: scale(1.02);
}

/* --- Section Design --- */
section {
    padding: 100px 0;
}

.section-tag {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: inline-block;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
}

/* --- Auth & Internal Pages Unified Navigation --- */
.nav-bar {
    background: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container h3 {
    font-size: 1.2rem;
    color: var(--text-color);
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand-group img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted-color);
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.logout-btn {
    color: var(--accent-color) !important;
}

/* --- Form Elements Premium --- */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 14px 20px;
    border-radius: 16px;
    border: 2px solid #f0f0f0;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: #fafafa;
}

.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(247, 148, 29, 0.1);
}

.btn-block {
    display: block;
    width: 100%;
    border: none;
    cursor: pointer;
}

/* --- Video Gallery & Cards --- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.video-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.video-thumb {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #fdf4e3 0%, #fae8c0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-thumb svg {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.category-tag {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(0, 174, 239, 0.1);
    color: var(--joy-blue);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

/* --- List Items (Tables Alternative) --- */
.list-item {
    background: var(--white);
    padding: 15px 20px;
    border-radius: 16px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    border: 1px solid #f5f5f5;
    transition: var(--transition);
}

.list-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.05);
}

.list-item-info strong {
    display: block;
    color: var(--text-color);
}

.list-item-info small {
    color: var(--muted-color);
}

.list-item-actions a {
    margin-left: 15px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}

/* --- Alerts & Messages --- */
.error-message {
    padding: 15px 20px;
    border-radius: 16px;
    background: #fff5f5;
    color: var(--accent-color);
    border-left: 5px solid var(--accent-color);
    margin-bottom: 25px;
    font-size: 0.95rem;
    font-weight: 600;
}

.success-message {
    padding: 15px 20px;
    border-radius: 16px;
    background: #f6fff2;
    color: var(--joy-green);
    border-left: 5px solid var(--joy-green);
    margin-bottom: 25px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* --- Dashboard Sidebar Layout --- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-top: 40px;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cat-link {
    padding: 14px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
    background: var(--white);
    border: 1px solid transparent;
}

.cat-link:hover {
    background: #fdf4e3;
    color: var(--primary-color);
    transform: translateX(5px);
}

.cat-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(247, 148, 29, 0.2);
}

/* --- Video Thumbnails with Previews --- */
.video-preview-container {
    width: 100%;
    height: 180px;
    background: #000;
    overflow: hidden;
    position: relative;
}

.video-thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    background: var(--primary-color);
    padding: 12px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    pointer-events: none;
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.video-card:hover video {
    opacity: 1;
}

@media (max-width: 992px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 30px;
    }
    
    .category-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .cat-link {
        white-space: nowrap;
        padding: 6px 14px; /* Significantly reduced padding */
        font-size: 0.82rem; /* Reduced font-size */
        border-radius: 10px; /* Sharper corners for a cleaner look when small */
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .logo-img {
        max-height: 50px; /* Even smaller for mobile */
        width: auto;
    }
    
    .navbar {
        padding: 5px 0;
        flex-direction: row;
        gap: 10px;
        justify-content: space-between;
    }

    .logo-container {
        max-width: 60%;
    }

    .nav-actions {
        flex-shrink: 0;
    }

    .nav-actions .btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .nav-bar {
        padding: 20px 0;
    }

    .nav-container {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    /* Target the branding div */
    .nav-container > div:first-child {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        text-align: center;
    }

    .nav-container h3 {
        font-size: 1.1rem !important;
        margin: 0 !important;
    }

    /* Target the brand-group for internal pages */
    .brand-group {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .brand-group img {
        height: 35px !important;
        margin-bottom: 5px;
    }
    
    .nav-links {
        display: flex;
        justify-content: center;
        width: 100%;
        gap: 20px;
        border-top: 1px solid #f0f0f0;
        padding-top: 15px;
    }
    
    .nav-links a {
        font-size: 0.9rem;
    }
    
    /* Grid adjustments */
    .dashboard-layout {
        gap: 20px;
    }
    
    .sidebar-title {
        font-size: 0.8rem;
        margin-bottom: 15px;
        text-align: center;
    }

    .category-nav {
        flex-direction: row;
        flex-wrap: wrap; /* Allow buttons to wrap to new lines */
        justify-content: center;
        gap: 8px; /* Further reduced gap for mobile */
        padding: 5px;
    }
}

/* --- Redesigned Cards --- */
.card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.02);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(67, 40, 24, 0.12);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* --- Buttons --- */
.btn {
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 6px 20px rgba(247, 148, 29, 0.3);
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* --- Process Section --- */
.process-step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 20px;
    font-size: 1.2rem;
    color: var(--text-color);
    box-shadow: 0 4px 10px rgba(251, 211, 4, 0.3);
}

/* --- Footer --- */
.footer {
    background: var(--text-color);
    color: #fff;
    padding: 80px 0 40px;
    border-radius: 60px 60px 0 0;
}

.footer h3 {
    color: var(--secondary-color);
}

.footer a {
    color: var(--secondary-color);
}

/* --- Auth Pages --- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #fffaf5 0%, #fff0e0 100%);
    padding: 20px;
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    background: linear-gradient(135deg, #fffaf5 0%, #fff2e0 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 50px 40px;
    border-radius: 40px;
    box-shadow: 0 30px 60px rgba(67, 40, 24, 0.15);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.5);
    animation: fadeInUp 0.8s ease-out;
}

.login-header {
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 1.8rem;
    margin: 15px 0 5px;
    color: var(--text-color);
}

.login-header p {
    color: var(--muted-color);
    font-weight: 600;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.back-link {
    display: inline-block;
    margin-top: 25px;
    text-decoration: none;
    color: var(--muted-color);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
}

/* --- Video Player Details --- */
.video-details-card {
    margin-top: 25px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 40px;
    border: none;
}

.video-details-card h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.video-details-card p {
    font-size: 1.1rem;
    color: var(--muted-color);
    line-height: 1.8;
}

@media (max-width: 768px) {
    .video-details-card {
        padding: 25px 20px;
        margin-top: 15px;
    }
    
    .video-details-card h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .video-details-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Premium Category Cards (Dashboard) --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.category-card-premium {
    position: relative;
    background: var(--white);
    border-radius: 30px;
    padding: 50px 30px;
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
    z-index: 1;
}

.cat-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.9) 100%);
    z-index: -1;
    transition: var(--transition);
}

.category-card-premium:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
}

.category-card-premium:hover .cat-card-bg {
    background: var(--accent-color);
    opacity: 0.04;
}

.cat-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 25px;
}

.cat-icon-blob {
    width: 100px;
    height: 100px;
    border-radius: 35% 65% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    transition: var(--transition);
}

.category-card-premium:hover .cat-icon-blob {
    border-radius: 50%;
    transform: scale(1.1) rotate(5deg);
    background: var(--accent-color) !important;
    color: white !important;
}

.cat-info-premium h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 700;
}

.cat-stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.v-count {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--accent-color);
    color: var(--accent-color);
}

.category-card-premium:hover .v-count {
    color: var(--accent-color);
}

.v-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted-color);
    font-weight: 700;
}

.cat-btn-premium {
    margin-top: 10px;
    padding: 12px 30px;
    background: #f8f8f8;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-color);
    transition: var(--transition);
}

.category-card-premium:hover .cat-btn-premium {
    background: var(--accent-color);
    color: white;
}

/* --- Back Link Premium --- */
.back-link-premium {
    display: inline-block;
    margin-bottom: 15px;
    color: var(--muted-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
}

.back-link-premium:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}
