/* CSS Document */

/* Resources Page Styles */
:root {
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --background-dark: #0a0f1c;
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --card-bg: rgba(17, 24, 39, 0.95);
    --hover-color: #4338ca;
    --transition: all 0.3s ease;
    --primary-color-rgb: 79, 70, 229;
    --secondary-color-rgb: 124, 58, 237;
}

/* Hero Section */
.hero-section {
    min-height: 60vh;
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    padding: 6rem 0;
    overflow: hidden;
    background-color: var(--background-dark);
}

.tech-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.gradient-mesh {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
}

.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Tutorials Section */
.tutorials-section {
    padding: 6rem 0;
    background: -webkit-gradient(linear, left top, left bottom, from(var(--background-dark)), to(rgba(17, 24, 39, 0.95)));
    background: linear-gradient(to bottom, var(--background-dark), rgba(17, 24, 39, 0.95));
    position: relative;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 2;
}

.floating-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
    -webkit-animation: iconFloat 3s ease-in-out infinite;
            animation: iconFloat 3s ease-in-out infinite;
}

.floating-icon i {
    color: white;
    font-size: 1.75rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
    position: relative;
    z-index: 2;
}

/* Hide all categories by default */
.topic-card {
    display: none;
    background: rgba(17, 24, 39, 0.8);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    -webkit-transition: all 0.4s ease;
    transition: all 0.4s ease;
}

/* Show only active category */
.topic-card.active {
    display: block;
    -webkit-animation: fadeIn 0.5s ease-out;
            animation: fadeIn 0.5s ease-out;
}

/* Show all categories when "all" is selected */
.topics-grid.show-all .topic-card {
    display: block;
}

/* Floating Navigation Buttons */
.category-nav-buttons {
    position: fixed;
    right: 2rem;
    top: 50%;
    -webkit-transform: translateY(-50%);
            transform: translateY(-50%);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 1rem;
    z-index: 1000;
    background: rgba(17, 24, 39, 0.9);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
}

.nav-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background: var(--primary-color);
    -webkit-transform: scale(1.1);
            transform: scale(1.1);
}

.nav-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tutorial Steps Container */
.tutorial-steps {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* Step Card Base Styles */
.step-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
}

/* Category Container */
.category-container {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
    background: rgba(17, 24, 39, 0.8);
    border-radius: 24px;
    padding: 2rem;
    -webkit-transition: all 0.4s ease;
    transition: all 0.4s ease;
}

/* Category Header */
.category-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0;
}

/* Navigation Buttons */
.category-nav {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 1rem;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.category-container:hover .category-nav {
    opacity: 1;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--primary-color);
    -webkit-transform: scale(1.1);
            transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Videos Grid Layout */
.videos-grid {
    display: grid;
    gap: 1.5rem;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* Default View (All Categories) */
.category-container:not(.expanded) .videos-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: 600px;
    overflow-y: auto;
    padding-right: 1rem;
}

/* Expanded Category View */
.category-container.expanded {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    margin: 0;
    padding: 2rem;
    background: var(--background-dark);
    overflow-y: auto;
}

.category-container.expanded .videos-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Large Screen Styles */
@media (min-width: 1200px) {
    .category-container:not(.expanded) .videos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .category-container.expanded .videos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Medium Screen Styles */
@media (min-width: 768px) and (max-width: 1199px) {
    .category-container.expanded .videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small Screen Styles */
@media (max-width: 767px) {
    .category-container:not(.expanded) .videos-grid,
    .category-container.expanded .videos-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .category-container {
        padding: 1rem;
    }
    
    .category-header {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        gap: 1rem;
        -webkit-box-align: start;
            -ms-flex-align: start;
                align-items: flex-start;
    }
    
    .category-nav {
        width: 100%;
        -webkit-box-pack: center;
            -ms-flex-pack: center;
                justify-content: center;
    }
}

/* Scrollbar Styles */
.videos-grid::-webkit-scrollbar {
    width: 6px;
}

.videos-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.videos-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Expansion Animation */
@-webkit-keyframes expandCategory {
    from {
        opacity: 0;
        -webkit-transform: scale(0.95);
                transform: scale(0.95);
    }
    to {
        opacity: 1;
        -webkit-transform: scale(1);
                transform: scale(1);
    }
}
@keyframes expandCategory {
    from {
        opacity: 0;
        -webkit-transform: scale(0.95);
                transform: scale(0.95);
    }
    to {
        opacity: 1;
        -webkit-transform: scale(1);
                transform: scale(1);
    }
}

.category-container.expanded {
    -webkit-animation: expandCategory 0.3s ease-out;
            animation: expandCategory 0.3s ease-out;
}

/* Close Button for Expanded View */
.category-container.expanded .close-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    z-index: 1001;
}

.category-container.expanded .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    -webkit-transform: rotate(90deg);
            transform: rotate(90deg);
}

/* Hide Categories When One is Expanded */
.category-container.hidden {
    display: none;
}

/* Video wrapper adjustments */
.video-wrapper {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
    transition: transform 0.3s ease, -webkit-transform 0.3s ease;
}

/* Content spacing */
.step-content {
    padding: 1.5rem;
    -webkit-box-flex: 1;
        -ms-flex-positive: 1;
            flex-grow: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
}

.step-content h4 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
    -webkit-box-flex: 1;
        -ms-flex-positive: 1;
            flex-grow: 1;
}

.duration {
    display: inline-block;
    background: rgba(var(--primary-color-rgb), 0.2);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    -ms-flex-item-align: start;
        align-self: flex-start;
}

/* FAQs Section */
.faqs-section {
    padding: 6rem 0;
    background: var(--background-dark);
    position: relative;
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.accordion-item {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-button {
    background: transparent;
    color: var(--text-primary);
    font-weight: 500;
    padding: 1.5rem;
    position: relative;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), rgba(var(--secondary-color-rgb), 0.1));
    color: var(--text-primary);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    padding: 1.5rem;
    line-height: 1.6;
}

/* Video Modal Styles */
.video-modal {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.98));
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

.video-modal .modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.modal-title-wrapper {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
}

.video-modal .modal-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.video-modal .modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

.video-modal .modal-body {
    padding: 0;
    background: #000;
    position: relative;
    z-index: 2;
}

.video-container {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    width: 100%;
    background: #000;
}

#videoPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-modal .modal-footer {
    padding: 1rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.video-info {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 2rem;
    width: 100%;
}

.video-duration,
.video-quality {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.video-duration i,
.video-quality i {
    color: var(--primary-color);
    font-size: 1rem;
}

.btn-close-white {
    background: transparent;
    border: none;
    padding: 0.5rem;
    opacity: 0.7;
    -webkit-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.btn-close-white:hover {
    opacity: 1;
}

/* Modal Animation */
.modal.fade .modal-dialog {
    -webkit-transform: scale(0.95) translateY(-30px);
            transform: scale(0.95) translateY(-30px);
    -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-dialog {
    -webkit-transform: scale(1) translateY(0);
            transform: scale(1) translateY(0);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .video-modal .modal-header {
        padding: 1rem 1.5rem;
    }

    .video-modal .modal-title {
        font-size: 1.25rem;
    }

    .video-modal .modal-footer {
        padding: 0.75rem 1.5rem;
    }

    .video-info {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        gap: 0.75rem;
        -webkit-box-align: start;
            -ms-flex-align: start;
                align-items: flex-start;
    }
}

/* Video Player Loading State */
.video-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.video-container.loading::before {
    opacity: 1;
}

.video-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    -webkit-animation: spin 1s linear infinite;
            animation: spin 1s linear infinite;
    z-index: 2;
}

@-webkit-keyframes spin {
    to {
        -webkit-transform: translate(-50%, -50%) rotate(360deg);
                transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes spin {
    to {
        -webkit-transform: translate(-50%, -50%) rotate(360deg);
                transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Enhanced Modal Backdrop */
.modal-backdrop.show {
    opacity: 0.8;
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
}

/* Animations */
@-webkit-keyframes iconFloat {
    0%, 100% {
        -webkit-transform: translateY(0);
                transform: translateY(0);
    }
    50% {
        -webkit-transform: translateY(-10px);
                transform: translateY(-10px);
    }
}
@keyframes iconFloat {
    0%, 100% {
        -webkit-transform: translateY(0);
                transform: translateY(0);
    }
    50% {
        -webkit-transform: translateY(-10px);
                transform: translateY(-10px);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .topics-grid {
        grid-template-columns: 1fr;
    }

    .topic-card {
        padding: 1.5rem;
    }

    .topic-icon {
        width: 60px;
        height: 60px;
    }

    .topic-icon i {
        font-size: 1.5rem;
    }

    .topic-header h3 {
        font-size: 1.5rem;
    }

    .step-content h4 {
        font-size: 1.1rem;
    }

    .gradient-text {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .floating-icon {
        width: 48px;
        height: 48px;
    }

    .floating-icon i {
        font-size: 1.25rem;
    }

    .accordion-button {
        padding: 1rem;
    }

    .accordion-body {
        padding: 1rem;
    }
}

/* Floating Badge */
.floating-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
    display: inline-block;
    position: relative;
    z-index: 2;
}

/* Hero Title and Subtitle */
.hero-title {
    color: var(--text-primary);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    opacity: 0.1;
    -webkit-animation: shapeFloat 20s infinite linear;
            animation: shapeFloat 20s infinite linear;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 40%;
    right: -100px;
    -webkit-animation-delay: -5s;
            animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: -75px;
    left: 50%;
    -webkit-animation-delay: -10s;
            animation-delay: -10s;
}

@-webkit-keyframes shapeFloat {
    0% {
        -webkit-transform: rotate(0deg) translate(0, 0) scale(1);
                transform: rotate(0deg) translate(0, 0) scale(1);
    }
    33% {
        -webkit-transform: rotate(120deg) translate(50px, 50px) scale(1.1);
                transform: rotate(120deg) translate(50px, 50px) scale(1.1);
    }
    66% {
        -webkit-transform: rotate(240deg) translate(-50px, 50px) scale(0.9);
                transform: rotate(240deg) translate(-50px, 50px) scale(0.9);
    }
    100% {
        -webkit-transform: rotate(360deg) translate(0, 0) scale(1);
                transform: rotate(360deg) translate(0, 0) scale(1);
    }
}

@keyframes shapeFloat {
    0% {
        -webkit-transform: rotate(0deg) translate(0, 0) scale(1);
                transform: rotate(0deg) translate(0, 0) scale(1);
    }
    33% {
        -webkit-transform: rotate(120deg) translate(50px, 50px) scale(1.1);
                transform: rotate(120deg) translate(50px, 50px) scale(1.1);
    }
    66% {
        -webkit-transform: rotate(240deg) translate(-50px, 50px) scale(0.9);
                transform: rotate(240deg) translate(-50px, 50px) scale(0.9);
    }
    100% {
        -webkit-transform: rotate(360deg) translate(0, 0) scale(1);
                transform: rotate(360deg) translate(0, 0) scale(1);
    }
}

/* Category Filter Styles */
.categories-filter {
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
    background: rgba(17, 24, 39, 0.6);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
}

.filter-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.filter-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.filter-buttons {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 1rem;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 0.5rem;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn i {
    font-size: 1rem;
    opacity: 0.8;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    border-color: rgba(var(--primary-color-rgb), 0.3);
    -webkit-transform: translateY(-2px);
            transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
    -webkit-box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
            box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.filter-btn.active i {
    opacity: 1;
    -webkit-transform: scale(1.1);
            transform: scale(1.1);
}

/* Animation for filtered items */
.topic-card, .accordion-item {
    -webkit-transition: all 0.4s ease-in-out;
    transition: all 0.4s ease-in-out;
}

.topic-card[style*="display: none"],
.accordion-item[style*="display: none"] {
    opacity: 0;
    -webkit-transform: scale(0.95);
            transform: scale(0.95);
}

/* Responsive adjustments for filters */
@media (max-width: 768px) {
    .categories-filter {
        padding: 1rem;
        margin-bottom: 2rem;
    }

    .filter-buttons {
        gap: 0.75rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .filter-btn i {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .filter-buttons {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        -webkit-box-align: stretch;
            -ms-flex-align: stretch;
                align-items: stretch;
    }

    .filter-btn {
        -webkit-box-pack: center;
            -ms-flex-pack: center;
                justify-content: center;
    }
}

/* Hover effects for filter buttons */
.filter-btn:hover i {
    -webkit-transform: scale(1.1) rotate(-5deg);
            transform: scale(1.1) rotate(-5deg);
}

.filter-btn:active {
    -webkit-transform: translateY(0) scale(0.98);
            transform: translateY(0) scale(0.98);
}

/* Custom scrollbar for filter container if needed */
.categories-filter::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.categories-filter::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.categories-filter::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Filter transition effects */
.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    -webkit-transform: translateX(-100%);
            transform: translateX(-100%);
    -webkit-transition: 0.5s;
    transition: 0.5s;
}

.filter-btn:hover::before {
    -webkit-transform: translateX(100%);
            transform: translateX(100%);
}

/* Category badge styles */
.filter-btn::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary-color);
    color: white;
    font-size: 0.75rem;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    opacity: 0;
    -webkit-transform: scale(0);
            transform: scale(0);
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.filter-btn:hover::after {
    opacity: 1;
    -webkit-transform: scale(1);
            transform: scale(1);
}

/* Active filter indicator */
.filter-btn.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
    width: 30%;
    height: 2px;
    background: white;
    border-radius: 1px;
}

/* Filter section transitions */
.categories-filter {
    -webkit-animation: filterFadeIn 0.5s ease-out;
            animation: filterFadeIn 0.5s ease-out;
}

@-webkit-keyframes filterFadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(-20px);
                transform: translateY(-20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
                transform: translateY(0);
    }
}

@keyframes filterFadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(-20px);
                transform: translateY(-20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
                transform: translateY(0);
    }
}

/* Animation for new videos appearing */
.step-card {
    -webkit-animation: videoAppear 0.5s ease-out;
            animation: videoAppear 0.5s ease-out;
}

@-webkit-keyframes videoAppear {
    from {
        opacity: 0;
        -webkit-transform: translateY(20px);
                transform: translateY(20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
                transform: translateY(0);
    }
}

@keyframes videoAppear {
    from {
        opacity: 0;
        -webkit-transform: translateY(20px);
                transform: translateY(20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
                transform: translateY(0);
    }
}

/* Smooth transition for filtering */
.topic-card {
    -webkit-transition: all 0.4s ease-in-out;
    transition: all 0.4s ease-in-out;
}

.topic-card[style*="display: none"] {
    opacity: 0;
    -webkit-transform: scale(0.95) translateY(-20px);
            transform: scale(0.95) translateY(-20px);
}

/* Enhanced Video Grid Layout for Larger Screens */
@media (min-width: 1200px) {
    .topics-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
        padding: 1.5rem;
    }

    .topic-card {
        background: rgba(17, 24, 39, 0.85);
        -webkit-backdrop-filter: blur(15px);
                backdrop-filter: blur(15px);
        border-radius: 30px;
        padding: 2.5rem;
        margin-bottom: 0;
    }

    .topic-header {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        gap: 1.5rem;
        margin-bottom: 2.5rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .topic-icon {
        width: 100px;
        height: 100px;
        margin: 0;
        border-radius: 25px;
    }

    .topic-icon i {
        font-size: 2.5rem;
    }

    .topic-header h3 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
        background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    .topic-header p {
        font-size: 1.1rem;
        line-height: 1.5;
        opacity: 0.9;
    }

    .tutorial-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-top: 0;
    }

    .step-card {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        -webkit-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    .step-card:hover {
        -webkit-transform: translateY(-8px) scale(1.02);
                transform: translateY(-8px) scale(1.02);
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(var(--primary-color-rgb), 0.2);
        -webkit-box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.2),
            0 0 20px rgba(var(--primary-color-rgb), 0.1);
                box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.2),
            0 0 20px rgba(var(--primary-color-rgb), 0.1);
    }

    .video-wrapper {
        border-radius: 16px 16px 0 0;
        overflow: hidden;
    }

    .video-thumbnail {
        -webkit-filter: brightness(0.9) contrast(1.1);
                filter: brightness(0.9) contrast(1.1);
    }

    .play-overlay {
        background: rgba(0, 0, 0, 0.3);
        -webkit-backdrop-filter: blur(4px);
                backdrop-filter: blur(4px);
    }

    .play-overlay i {
        font-size: 3.5rem;
        -webkit-filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
                filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    }

    .step-content {
        padding: 2rem;
    }

    .step-content h4 {
        font-size: 1.4rem;
        font-weight: 600;
        letter-spacing: -0.02em;
        margin-bottom: 1rem;
    }

    .step-content p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }

    .duration {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
        border-radius: 15px;
        background: rgba(var(--primary-color-rgb), 0.15);
        border: 1px solid rgba(var(--primary-color-rgb), 0.1);
    }

    /* Add decorative elements */
    .topic-card::before {
        content: '';
        position: absolute;
        inset: 1px;
        background: linear-gradient(135deg, 
            rgba(var(--primary-color-rgb), 0.1),
            rgba(var(--secondary-color-rgb), 0.1));
        border-radius: 29px;
        z-index: -1;
        opacity: 0;
        -webkit-transition: opacity 0.4s ease;
        transition: opacity 0.4s ease;
    }

    .topic-card:hover::before {
        opacity: 1;
    }

    /* Enhanced hover states */
    .step-card:hover .video-thumbnail {
        -webkit-transform: scale(1.08);
                transform: scale(1.08);
        -webkit-filter: brightness(1) contrast(1.15);
                filter: brightness(1) contrast(1.15);
    }

    .step-card:hover .play-overlay {
        background: rgba(0, 0, 0, 0.4);
    }

    .step-card:hover .play-overlay i {
        -webkit-transform: scale(1.15);
                transform: scale(1.15);
        -webkit-filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
                filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
    }
}

/* Ultra-wide screen optimization */
@media (min-width: 1600px) {
    .topics-grid {
        max-width: 1800px;
        margin: 0 auto;
        gap: 3rem;
    }

    .topic-card {
        padding: 3rem;
    }

    .tutorial-steps {
        gap: 2rem;
    }

    .step-content {
        padding: 2.5rem;
    }
}

/* Topic Card Expanded State */
.topic-card.expanded {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    margin: 0;
    padding: 2rem;
    background: var(--background-dark);
    overflow-y: auto;
    -webkit-animation: expandCard 0.3s ease-out;
            animation: expandCard 0.3s ease-out;
}

.topic-card.expanded .topic-header {
    position: sticky;
    top: 0;
    background: var(--background-dark);
    padding: 1rem 0;
    margin-bottom: 2rem;
    z-index: 2;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topic-card.expanded .tutorial-steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.topic-card.expanded .step-card {
    width: 100%;
    margin: 0;
}

/* Close button for expanded view */
.topic-card.expanded .close-expanded {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    z-index: 3;
}

.topic-card.expanded .close-expanded:hover {
    background: rgba(255, 255, 255, 0.2);
    -webkit-transform: rotate(90deg);
            transform: rotate(90deg);
}

/* Animation for card expansion */
@-webkit-keyframes expandCard {
    from {
        opacity: 0;
        -webkit-transform: scale(0.95);
                transform: scale(0.95);
    }
    to {
        opacity: 1;
        -webkit-transform: scale(1);
                transform: scale(1);
    }
}
@keyframes expandCard {
    from {
        opacity: 0;
        -webkit-transform: scale(0.95);
                transform: scale(0.95);
    }
    to {
        opacity: 1;
        -webkit-transform: scale(1);
                transform: scale(1);
    }
}

/* Responsive adjustments for expanded view */
@media (max-width: 768px) {
    .topic-card.expanded {
        padding: 1rem;
    }
    
    .topic-card.expanded .tutorial-steps {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .topic-card.expanded .close-expanded {
        top: 1rem;
        right: 1rem;
    }
}


