/* Responsive Design Styles */

/* Mobile-first approach with progressive enhancement */

/* Extra Small devices (phones, 0px and up) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 var(--space-3);
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: var(--space-6);
        padding: var(--space-8) 0;
        transform: translateX(-100%);
        transition: var(--transition-normal);
        box-shadow: var(--shadow-xl);
        z-index: var(--z-dropdown);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .nav-link {
        font-size: var(--font-size-lg);
        padding: var(--space-3) var(--space-4);
    }
    
    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        text-align: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .title-decoration {
        display: none;
    }
    
    /* Video Grid */
    .video-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .video-filters {
        gap: var(--space-1);
    }
    
    .filter-btn {
        font-size: var(--font-size-xs);
        padding: var(--space-1) var(--space-3);
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        text-align: center;
    }
    
    .character-showcase {
        flex-direction: row;
        justify-content: center;
        gap: var(--space-4);
    }
    
    .character {
        width: 70px;
        height: 70px;
    }
    
    /* Contact Section */
    .social-links {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .social-link {
        padding: var(--space-4);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-6);
    }
    
    .footer-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* Typography adjustments */
    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .section-subtitle {
        font-size: var(--font-size-base);
    }
    
    /* Spacing adjustments */
    .videos-section,
    .about-section,
    .contact-section {
        padding: var(--space-16) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-8);
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .profile-image {
        width: 250px;
        height: 250px;
    }
    
    .social-links {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .nav-menu {
        display: flex;
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        flex-direction: row;
        transform: none;
        box-shadow: none;
        padding: 0;
    }
    
    .nav-toggle {
        display: none;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-12);
        text-align: left;
    }
    
    .hero-image {
        order: 0;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        grid-template-columns: 2fr 1fr;
        text-align: left;
    }
    
    .character-showcase {
        flex-direction: column;
    }
    
    .social-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        text-align: left;
    }
    
    .footer-links {
        flex-direction: column;
    }
    
    .footer-social {
        justify-content: flex-start;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: none;
    }
    
    .hero-title {
        font-size: var(--font-size-5xl);
    }
    
    .profile-image {
        width: 280px;
        height: 280px;
    }
    
    .character {
        width: 90px;
        height: 90px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: var(--container-xl);
    }
    
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: none;
    }
    
    .hero-title {
        font-size: var(--font-size-6xl);
    }
    
    .title-decoration {
        display: block;
    }
    
    .profile-image {
        width: 300px;
        height: 300px;
    }
}

/* Ultra-wide screens (1536px and up) */
@media (min-width: 1536px) {
    .container {
        max-width: var(--container-2xl);
    }
    
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-8);
    }
    
    .hero-content {
        gap: var(--space-20);
    }
}

/* Portrait orientation adjustments */
@media (orientation: portrait) and (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: var(--space-16) 0;
    }
    
    .hero-content {
        gap: var(--space-6);
    }
    
    .floating-shapes {
        display: none;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        min-height: auto;
        padding: var(--space-12) 0;
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
    }
    
    .nav {
        min-height: 60px;
        padding: var(--space-2) 0;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo,
    .footer-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support (if user prefers) */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #1F2937;
        --gray-100: #374151;
        --gray-200: #4B5563;
        --gray-800: #F9FAFB;
        --gray-900: #FFFFFF;
    }
    
    .header {
        background: rgba(31, 41, 55, 0.95);
        border-bottom-color: var(--gray-200);
    }
    
    .hero-background {
        background: linear-gradient(135deg, #1F2937 0%, #374151 50%, #4B5563 100%);
    }
    
    .videos-section {
        background: var(--gray-100);
    }
    
    .video-card {
        background: var(--gray-200);
    }
}

/* Print styles */
@media print {
    .header,
    .nav-toggle,
    .back-to-top,
    .loading-screen {
        display: none !important;
    }
    
    .hero,
    .videos-section,
    .about-section,
    .contact-section {
        page-break-inside: avoid;
    }
    
    .video-card {
        break-inside: avoid;
    }
    
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    a {
        text-decoration: underline;
    }
    
    .gradient-text {
        background: none !important;
        color: black !important;
        -webkit-text-fill-color: black !important;
    }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
    .floating-shapes,
    .particles {
        display: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .btn-primary {
        background: black;
        color: white;
        border: 2px solid black;
    }
    
    .btn-secondary {
        background: white;
        color: black;
        border: 2px solid black;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: black;
        color: white;
    }
}
    .footer-links a:hover {
        color: var(--gray-700);
    }
    


/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .social-link,
    .video-card,
    .filter-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .hover-lift:hover,
    .hover-scale:hover,
    .hover-rotate:hover {
        transform: none;
    }
    
    .video-card:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .btn:hover::before {
        display: none;
    }
}

/* Custom scrollbar for webkit browsers */
@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
    }
    
    ::-webkit-scrollbar-track {
        background: var(--gray-100);
    }
    
    ::-webkit-scrollbar-thumb {
        background: var(--primary-purple);
        border-radius: var(--radius-full);
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: var(--primary-purple-dark);
    }
}