:root {
    --tutorial-bg: #06070d;
    --tutorial-panel: #0f111a;
    --tutorial-card: #141725;
    --tutorial-contrast: #1f2435;
    --tutorial-accent: #e50914;
    --tutorial-accent-2: #ff5f6d;
    --tutorial-text: #e5e7eb;
    --tutorial-muted: #9ca3af;
    --tutorial-border: rgba(255, 255, 255, 0.06);
    --glass: rgba(255, 255, 255, 0.04);
    --blur: blur(12px);
}

body.tutorials-page {
    background: radial-gradient(circle at 20% 20%, rgba(229, 9, 20, 0.12), transparent 40%),
                radial-gradient(circle at 80% 0%, rgba(255, 95, 109, 0.1), transparent 35%),
                var(--tutorial-bg);
    color: var(--tutorial-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

.tutorials-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.page-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.page-brand .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e50914, #ff5f6d);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.02em;
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.25);
}

.page-brand h1 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.page-brand span {
    color: var(--tutorial-muted);
    font-size: 0.95rem;
}

.video-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(20, 23, 37, 0.95), rgba(6, 7, 13, 0.9));
    border: 1px solid var(--tutorial-border);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.video-hero::before,
.video-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(229, 9, 20, 0.12), transparent 35%),
                radial-gradient(circle at 80% 0%, rgba(255, 95, 109, 0.14), transparent 35%);
    z-index: 0;
}

.video-hero::after {
    background: linear-gradient(120deg, rgba(229, 9, 20, 0.2), transparent 40%);
    mix-blend-mode: screen;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 26px;
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 2.1rem;
    color: #fff;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero-content p {
    color: var(--tutorial-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.hero-tag {
    background: var(--glass);
    color: var(--tutorial-text);
    border: 1px solid var(--tutorial-border);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: var(--blur);
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-hero {
    border: none;
    cursor: pointer;
    border-radius: 14px;
    padding: 14px 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.btn-hero.primary {
    background: linear-gradient(120deg, #e50914, #ff5f6d);
    color: #fff;
    box-shadow: 0 16px 40px rgba(229, 9, 20, 0.35);
}

.btn-hero.secondary {
    background: var(--glass);
    color: #fff;
    border: 1px solid var(--tutorial-border);
}

.btn-hero:hover {
    transform: translateY(-2px);
}

.btn-hero:active {
    transform: translateY(0);
}

.hero-video-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: var(--tutorial-card);
    border: 1px solid var(--tutorial-border);
    min-height: 260px;
    display: grid;
    place-items: center;
}

.hero-video-thumb {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.8);
    transform: scale(1.01);
    transition: transform 0.4s ease;
}

.hero-video-card:hover .hero-video-thumb {
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
}

.hero-play {
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.55);
    width: 84px;
    height: 84px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 26px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-video-card:hover .hero-play {
    transform: scale(1.04);
    box-shadow: 0 10px 28px rgba(229, 9, 20, 0.35);
}

.badge-featured {
    position: absolute;
    top: 14px;
    left: 14px;
    background: linear-gradient(135deg, #e50914, #ff5f6d);
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    z-index: 2;
}

.hero-meta {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
}

.hero-meta .title {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 1.1rem;
}

.hero-meta .chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--tutorial-border);
    color: var(--tutorial-text);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 18px 0 10px;
}

.filter-input {
    background: var(--tutorial-card);
    border: 1px solid var(--tutorial-border);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--tutorial-text);
    width: 100%;
}

.categories-grid {
    display: grid;
    gap: 26px;
}

.category-row {
    background: var(--tutorial-panel);
    border: 1px solid var(--tutorial-border);
    border-radius: 18px;
    padding: 18px 16px 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.category-sub {
    color: var(--tutorial-muted);
    font-size: 0.9rem;
}

.scrollable-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(25% - 12px);
    gap: 12px;
    overflow-x: auto;
    padding: 6px 4px 6px 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.scrollable-row::-webkit-scrollbar {
    height: 8px;
}

.scrollable-row::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.video-card {
    position: relative;
    background: var(--tutorial-card);
    border: 1px solid var(--tutorial-border);
    border-radius: 14px;
    overflow: hidden;
    min-height: 180px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

.video-thumb {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.85);
    transition: transform 0.25s ease, filter 0.25s ease;
}

.video-card:hover .video-thumb {
    transform: scale(1.04);
    filter: brightness(0.95);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
}

.video-info {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 2;
}

.video-info .title {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.01em;
    font-size: 1rem;
    margin-bottom: 6px;
}

.video-info .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--tutorial-border);
    color: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.watch-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--tutorial-border);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
}

.empty-state {
    border: 1px dashed var(--tutorial-border);
    border-radius: 14px;
    padding: 18px;
    color: var(--tutorial-muted);
    text-align: center;
    background: var(--tutorial-card);
}

.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.video-modal.show {
    display: flex;
}

.video-modal .modal-content {
    width: min(1100px, 96vw);
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    max-height: 90vh;
}

.video-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.modal-close {
    position: absolute;
    top: -48px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: 1px solid var(--tutorial-border);
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.modal-close:hover {
    background: rgba(229, 9, 20, 0.8);
    transform: scale(1.05);
}

@media (max-width: 680px) {
    .video-modal {
        padding: 12px;
    }
    
    .video-modal .modal-content {
        width: 100%;
        max-height: 50vh;
        border-radius: 12px;
    }
    
    .modal-close {
        top: -40px;
        padding: 8px 10px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .video-modal {
        padding: 8px;
    }
    
    .video-modal .modal-content {
        max-height: 45vh;
        border-radius: 10px;
    }
    
    .modal-close {
        top: -35px;
        padding: 6px 8px;
        font-size: 0.9rem;
    }
}

.legend {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--tutorial-muted);
    font-size: 0.9rem;
    margin: 12px 2px 0;
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend .dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.section-title {
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.section-title .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e50914, #ff5f6d);
    display: inline-block;
    box-shadow: 0 0 0 5px rgba(229, 9, 20, 0.1);
}

.support-actions {
    margin-top: 26px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.support-actions a {
    color: #fff;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--tutorial-card);
    border: 1px solid var(--tutorial-border);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.back-button-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
}

.back-button-container .btn-hero {
    gap: 8px;
}

.category-sub {
    color: var(--tutorial-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .scrollable-row {
        grid-auto-columns: calc(50% - 12px);
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .legend {
        flex-wrap: wrap;
        font-size: 0.85rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn-hero {
        width: 100%;
        justify-content: center;
    }
    
    .support-actions {
        flex-direction: column;
    }
    
    .support-actions a {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 680px) {
    .tutorials-wrapper {
        padding: 20px 16px 60px;
    }
    
    .back-button-container {
        margin-bottom: 16px;
    }
    
    .back-button-container .btn-hero {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .page-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .page-brand .brand-mark {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .page-brand h1 {
        font-size: 1.2rem;
    }
    
    .page-brand span {
        font-size: 0.85rem;
    }

    .hero-content h2 {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 10px;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    
    .hero-actions {
        margin-top: 16px;
    }
    
    .hero-tags {
        gap: 8px;
    }
    
    .hero-tag {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .scrollable-row {
        grid-auto-columns: 85%;
        gap: 10px;
    }
    
    .video-card {
        min-height: 160px;
    }
    
    .video-info .title {
        font-size: 0.9rem;
    }
    
    .video-info .meta {
        gap: 6px;
    }
    
    .pill {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .video-hero {
        padding: 18px;
        border-radius: 18px;
    }
    
    .hero-video-card {
        min-height: 200px;
        border-radius: 14px;
    }
    
    .hero-play {
        width: 64px;
        height: 64px;
        font-size: 20px;
    }
    
    .hero-meta .title {
        font-size: 0.95rem;
    }
    
    .chip {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .category-row {
        padding: 14px 12px 8px;
        border-radius: 14px;
    }
    
    .category-title {
        font-size: 0.95rem;
    }
    
    .category-sub {
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 0.95rem;
    }
    
}

@media (max-width: 480px) {
    .tutorials-wrapper {
        padding: 16px 12px 50px;
    }
    
    .hero-content h2 {
        font-size: 1.2rem;
        line-height: 1.25;
    }
    
    .hero-content p {
        font-size: 0.85rem;
    }
    
    .hero-actions {
        margin-top: 14px;
        gap: 10px;
    }
    
    .scrollable-row {
        grid-auto-columns: 90%;
    }
    
    .video-hero {
        padding: 14px;
    }
    
    .hero-actions .btn-hero {
        padding: 12px 14px;
        font-size: 0.85rem;
    }
    
    .support-actions a {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

