/* assets/css/responsive.css */

/* TABLET */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* HEADER */
    .header-content {
        height: 60px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        padding: 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-right: 1px solid var(--border-color);
        overflow-y: auto;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .nav-item {
        width: 100%;
        text-align: left;
        padding: 15px 20px;
        border-radius: 8px;
        margin-bottom: 5px;
        font-size: 1rem;
    }

    /* DROPDOWN MOBILE */
    .nav-dropdown .dropdown-menu {
        position: static;
        display: block;
        background: var(--bg-input);
        margin-top: 10px;
        border-radius: 8px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    .dropdown-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .dropdown-item {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .user-dropdown .dropdown-menu {
        position: static;
        min-width: auto;
        margin-top: 10px;
    }

    /* SEARCH */
    .search-container {
        order: -1;
        width: 100%;
        margin-bottom: 15px;
    }

    .search-input {
        width: 100%;
    }

    .search-suggestions {
        position: fixed;
        left: 15px;
        right: 15px;
        width: auto;
    }

    /* HERO SLIDER */
    .hero-slider {
        height: 50vh;
        margin-top: 60px;
    }

    .slide-content {
        padding: 0 20px;
        text-align: center;
    }

    .slide-content h1 {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }

    .anime-info {
        justify-content: center;
        font-size: 0.8rem;
    }

    .description {
        font-size: 1rem;
        margin: 15px 0;
    }

    .slide-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 200px;
        justify-content: center;
    }

    .slider-btn {
        padding: 12px 15px;
        font-size: 1.2rem;
    }

    .slider-btn.prev {
        left: 15px;
    }

    .slider-btn.next {
        right: 15px;
    }

    .slider-dots {
        bottom: 20px;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    /* CONTENT SECTIONS */
    .content-section {
        padding: 40px 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 30px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    /* ANIME GRID */
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .horizontal-scroll .anime-card {
        flex: 0 0 140px;
        margin-right: 15px;
    }

    .anime-poster {
        height: 200px;
    }

    .anime-info {
        padding: 12px;
    }

    .anime-info h3 {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .anime-meta {
        font-size: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .genres {
        font-size: 0.7rem;
    }

    /* CATEGORIES GRID */
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .category-card {
        padding: 20px 15px;
    }

    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .category-card h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .category-card p {
        font-size: 0.8rem;
    }

    /* FOOTER */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-section h3 {
        font-size: 1.2rem;
    }

    .social-links {
        justify-content: center;
    }
}

/* MOBILE */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    /* HEADER */
    .header-content {
        height: 55px;
    }

    .logo a {
        font-size: 1.5rem;
    }

    .logo img {
        width: 35px;
        height: 35px;
        margin-right: 8px;
    }

    .main-nav {
        top: 55px;
        height: calc(100vh - 55px);
        padding: 15px;
    }

    .nav-item {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    /* SEARCH */
    .search-input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .search-btn {
        padding: 10px 12px;
    }

    /* HERO SLIDER */
    .hero-slider {
        height: 45vh;
        margin-top: 55px;
    }

    .slide-content {
        padding: 0 15px;
    }

    .slide-content h1 {
        font-size: 2rem;
        line-height: 1.1;
    }

    .anime-info {
        gap: 8px;
        margin: 15px 0;
    }

    .anime-info span {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .description {
        font-size: 0.9rem;
        margin: 12px 0;
    }

    .btn-primary,
    .btn-secondary {
        padding: 8px 16px;
        font-size: 0.85rem;
        width: 180px;
    }

    .slider-btn {
        padding: 10px 12px;
        font-size: 1.1rem;
    }

    .slider-btn.prev {
        left: 10px;
    }

    .slider-btn.next {
        right: 10px;
    }

    .slider-dots {
        bottom: 15px;
    }

    .dot {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }

    /* CONTENT SECTIONS */
    .content-section {
        padding: 30px 0;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .section-header h2 i {
        font-size: 1.5rem;
    }

    .ver-mais {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    /* ANIME GRID */
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
    }

    .horizontal-scroll .anime-card {
        flex: 0 0 110px;
        margin-right: 12px;
    }

    .anime-poster {
        height: 155px;
    }

    .anime-info {
        padding: 10px;
    }

    .anime-info h3 {
        font-size: 0.8rem;
        line-height: 1.1;
        margin-bottom: 6px;
    }

    .anime-meta {
        font-size: 0.7rem;
    }

    .genres {
        font-size: 0.65rem;
        margin-top: 4px;
    }

    .play-btn {
        font-size: 2rem;
    }

    .anime-rating,
    .episode-count,
    .views-count {
        font-size: 0.65rem;
        padding: 3px 6px;
    }

    /* CATEGORIES GRID */
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .category-card {
        padding: 15px 10px;
    }

    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .category-card h3 {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .category-card p {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    /* FOOTER */
    .main-footer {
        padding: 30px 0 15px;
        margin-top: 50px;
    }

    .footer-content {
        gap: 25px;
    }

    .footer-section h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .footer-section ul li {
        margin-bottom: 8px;
    }

    .footer-section ul li a {
        font-size: 0.9rem;
    }

    .footer-section p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .social-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .footer-bottom {
        font-size: 0.8rem;
        padding-top: 15px;
    }

    /* LOADING */
    .spinner {
        width: 40px;
        height: 40px;
    }

    .loading-spinner p {
        font-size: 0.9rem;
    }
}

/* EXTRA SMALL MOBILE */
@media (max-width: 320px) {
    .slide-content h1 {
        font-size: 1.8rem;
    }

    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
        gap: 10px;
    }

    .horizontal-scroll .anime-card {
        flex: 0 0 95px;
        margin-right: 10px;
    }

    .anime-poster {
        height: 135px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
}

/* LANDSCAPE MOBILE */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slider {
        height: 80vh;
    }

    .slide-content h1 {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }

    .anime-info {
        margin: 10px 0;
    }

    .description {
        margin: 10px 0;
        font-size: 0.95rem;
    }

    .slide-buttons {
        margin-top: 15px;
    }

    .slider-dots {
        bottom: 10px;
    }
}

/* HOVER EFFECTS - DISABLED ON TOUCH DEVICES */
@media (hover: none) and (pointer: coarse) {
    .anime-card:hover {
        transform: none;
        box-shadow: none;
        border-color: var(--border-color);
    }

    .anime-card:hover .anime-poster img {
        transform: none;
    }

    .anime-overlay {
        display: none;
    }

    .category-card:hover {
        transform: none;
        box-shadow: none;
        border-color: var(--border-color);
    }

    .nav-item:hover {
        transform: none;
    }

    .btn-primary:hover {
        transform: none;
        box-shadow: none;
    }

    .slider-btn:hover {
        transform: translateY(-50%);
    }
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    :root {
        --bg-dark: #000000;
        --bg-card: #111111;
        --text-primary: #ffffff;
        --border-color: #555555;
    }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .slide {
        transition: none;
    }

    .spinner {
        animation: none;
    }
}
