/* ==========================================================================
   1. GLOBAL IMPORTS & CONFIGURATION
   ========================================================================== */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@3.4.1/src/css/preflight.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Strict Design Tokens matching Nerd Tutorials branding */
:root {
    --brand-dark: #0b1329;
    --brand-lime: #c6ff00;
    --brand-gray: #f8f9fa;
    --brand-dark-alt: #0e1b2e;
}

/* Apply unified premium font and default smooth behavior across all views */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--brand-gray);
    color: var(--brand-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   2. CUSTOM UTILITY & BRAND LAYER MAPPING
   ========================================================================== */
/* Brand Dark Utilities (Deep Navy/Slate) */
.bg-brandDark { background-color: var(--brand-dark); }
.text-brandDark { color: var(--brand-dark); }
.border-brandDark { border-color: var(--brand-dark); }

/* Brand Lime Utilities (Vibrant Neon Accent) */
.bg-brandLime { background-color: var(--brand-lime); }
.text-brandLime { color: var(--brand-lime); }
.border-brandLime { border-color: var(--brand-lime); }

/* Brand Gray Utilities (Clean Backgrounds) */
.bg-brandGray { background-color: var(--brand-gray); }

/* Custom Focus States used across interactive elements/inputs */
.focus-brand:focus {
    outline: none;
    border-color: var(--brand-dark);
    box-shadow: 0 0 0 2px rgba(198, 255, 0, 0.4);
}

/* Custom premium selection accents */
::selection {
    background-color: var(--brand-lime);
    color: var(--brand-dark);
}

/* ==========================================================================
   3. SECURITY & DRM STREAM PROTECTION OVERLAYS
   ========================================================================== */
/* Safely blocks users from highlighting, dragging, or selecting video player rows */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* ==========================================================================
   4. SHARED COMPONENT STYLES (DASHBOARD & GRID INTERFACES)
   ========================================================================== */
/* Layout structure for course lists */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 32px 0;
}

/* Shared Premium Course Interactive Card Blocks */
.course-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -8px rgba(11, 19, 41, 0.12);
}

/* Card Header/Banner Segment */
.card-banner {
    background-color: var(--brand-dark-alt);
    height: 140px;
    position: relative;
    padding: 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.card-banner-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 64px;
    color: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.card-tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--brand-lime);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-demo-badge {
    background: #f59e0b;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    position: absolute;
    top: 16px;
    left: 16px;
}

/* Card Content Area */
.card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.card-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Card Footer Actions */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    border-t: 1px solid #f1f5f9;
    padding-top: 14px;
    margin-top: auto;
}

.card-lessons {
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.watch-link {
    color: #0284c7;
    font-weight: 700;
    transition: color 0.15s ease;
}

.course-card:hover .watch-link {
    color: var(--brand-dark);
}