/* ==========================================
   🎌 ANIME SITE - MAIN STYLESHEET - CZĘŚĆ 1
   ========================================== */

/* CSS Variables */
:root {
    --primary-color: #4ecdc4;
    --secondary-color: #ff6b6b;
    --accent-color: #45b7d1;
    --background-dark: #0a0a0a;
    --background-medium: #1a1a2e;
    --background-light: #16213e;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-medium: rgba(255, 255, 255, 0.7);
    --text-dark: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(78, 205, 196, 0.5);
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.1);
}

/* ==========================================
   GLOBAL STYLES
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    /* Najważniejsze - eliminuje pixelację */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    
    /* Alternatywnie dla lepszej jakości */
    image-rendering: auto;
    image-rendering: optimizeQuality;
    
    /* Smooth scaling */
    -ms-interpolation-mode: bicubic;
    
    /* Hardware acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
    
    /* Anti-aliasing */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-medium) 50%, var(--background-light) 100%);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ==========================================
   SCROLLBAR STYLING
   ========================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--secondary-color), var(--primary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--primary-color), var(--accent-color));
}

/* ==========================================
   HEADER
   ========================================== */

.header {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(78, 205, 196, 0.5));
}

.quick-search {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.quick-search input {
    width: 100%;
    padding: 12px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.quick-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.quick-search input::placeholder {
    color: var(--text-dark);
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-medium);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(78, 205, 196, 0.1);
}

/* ==========================================
   MAIN LAYOUT WITH SIDEBAR
   ========================================== */

.main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    margin-top: 100px;
}

.main-content {
    min-width: 0; /* Prevents overflow */
}

.sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero-section {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(255, 107, 107, 0.1));
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { 
        filter: drop-shadow(0 0 20px rgba(78, 205, 196, 0.5)); 
    }
    to { 
        filter: drop-shadow(0 0 30px rgba(255, 107, 107, 0.5)); 
    }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 500px;
    margin: 0 auto;
}

/* ==========================================
   CONTENT SECTIONS
   ========================================== */

.content-section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.content-section:nth-child(1) { animation-delay: 0.1s; }
.content-section:nth-child(2) { animation-delay: 0.2s; }
.content-section:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    border-radius: 2px;
}

.section-footer {
    text-align: center;
    margin-top: 2rem;
}

.view-more-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

.no-content {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-dark);
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

/* ==========================================
   FLOATING PARTICLES
   ========================================== */

.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(78, 205, 196, 0.3);
    border-radius: 50%;
    animation: float 25s infinite linear;
}

@keyframes float {
    0% { 
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { 
        opacity: 1;
    }
    90% { 
        opacity: 1;
    }
    100% { 
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}
/* ==========================================
   🎌 ANIME SITE - MAIN STYLESHEET - CZĘŚĆ 2
   ========================================== */

/* ==========================================
   EPISODES GRID
   ========================================== */

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.episode-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.4s ease forwards;
}

.episode-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.episode-image-container {
    position: relative;
    overflow: hidden;
    /* Ustaw stały aspect ratio 16:9 */
    aspect-ratio: 16/9;
    background: var(--background-dark);
}

.episode-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    
    /* KLUCZOWE dla jakości obrazków */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: auto;
    
    /* Smooth scaling */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    
    /* Eliminuje pixelację przy skalowaniu */
    -ms-interpolation-mode: bicubic;
    
    /* Lepsze renderowanie */
    image-orientation: from-image;
}

/* Hover effect bez nadmiernego powiększania */
.episode-card:hover .episode-image {
    transform: scale(1.05) translateZ(0);
}

.episode-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.2) 0%, 
        rgba(0, 0, 0, 0.4) 50%, 
        rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.episode-card:hover .episode-overlay {
    opacity: 1;
}

.play-icon {
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.episode-info {
    padding: 1.2rem;
}

.episode-anime-title {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    font-weight: bold;
}

.episode-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.episode-number {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-weight: bold;
    color: white;
}

.episode-types {
    display: flex;
    gap: 0.3rem;
}

.type-badge {
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: bold;
}

.type-lektor {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.5);
    color: var(--secondary-color);
}

.type-napisy {
    background: rgba(69, 183, 209, 0.2);
    border: 1px solid rgba(69, 183, 209, 0.5);
    color: var(--accent-color);
}

/* ==========================================
   ANIME GRID
   ========================================== */

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.anime-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: scale(0.8);
    animation: scaleIn 0.4s ease forwards;
}

.anime-card:hover .anime-poster {
    transform: scale(1.03) translateZ(0);
}

.anime-image-container {
    position: relative;
    overflow: hidden;
}

.anime-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
    
    /* KLUCZOWE dla jakości obrazków */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
    image-rendering: optimizeQuality;
    
    /* Hardware acceleration */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    
    /* Smooth scaling */
    -ms-interpolation-mode: bicubic;
    
    /* Eliminuje rozmycie przy skalowaniu */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.anime-card:hover .anime-poster {
    transform: scale(1.05);
}

.anime-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.anime-card:hover .anime-overlay {
    opacity: 1;
}

.anime-info {
    padding: 1rem;
}

.anime-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: white;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.anime-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-medium);
}

.anime-rating {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-weight: bold;
    color: white;
    font-size: 0.7rem;
}

.anime-episodes,
.anime-year,
.anime-status {
    background: var(--glass-bg);
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
}

.anime-description {
    font-size: 0.8rem;
    color: var(--text-medium);
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

.anime-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.genre-tag {
    background: rgba(78, 205, 196, 0.2);
    border: 1px solid rgba(78, 205, 196, 0.4);
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-size: 0.6rem;
    color: var(--primary-color);
}

/* ==========================================
   ONGOING ANIME SLIDER - COMPLETE STYLES
   ========================================== */

/* Ongoing Anime Slider Container */
.ongoing-slider {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--card-bg);
}

.ongoing-slider-wrapper {
    display: flex;
    transition: transform 0.6s ease-in-out;
    will-change: transform;
}

.ongoing-slide {
    min-width: 100%;
    padding: 1.5rem;
}

/* Ongoing Anime Grid - Desktop */
.ongoing-anime-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Anime Card Styles for Ongoing Section */
.ongoing-anime-grid .anime-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: scale(0.8);
    animation: scaleIn 0.4s ease forwards;
}

.ongoing-anime-grid .anime-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Anime Image Container */
.ongoing-anime-grid .anime-image-container {
    position: relative;
    overflow: hidden;
    height: 280px;
    flex-shrink: 0;
}

.ongoing-anime-grid .anime-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
    
    /* KLUCZOWE dla jakości obrazków */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
    image-rendering: optimizeQuality;
    
    /* Hardware acceleration */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    
    /* Smooth scaling */
    -ms-interpolation-mode: bicubic;
    
    /* Eliminuje rozmycie przy skalowaniu */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.ongoing-anime-grid .anime-card:hover .anime-poster {
    transform: scale(1.05);
}

/* Anime Overlay */
.ongoing-anime-grid .anime-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ongoing-anime-grid .anime-card:hover .anime-overlay {
    opacity: 1;
}

/* Ongoing Status Badge - specjalne dla sekcji wychodzące */
.ongoing-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    animation: pulse 2s infinite;
    z-index: 10;
}

@keyframes pulse {
    0% { box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 2px 16px rgba(76, 175, 80, 0.6); }
    100% { box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3); }
}

/* Anime Info Section */
.ongoing-anime-grid .anime-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ongoing-anime-grid .anime-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: white;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em; /* Stała wysokość dla 2 linii */
}

.ongoing-anime-grid .anime-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-medium);
}

.ongoing-anime-grid .anime-rating {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-weight: bold;
    color: white;
    font-size: 0.7rem;
}

.ongoing-anime-grid .anime-episodes,
.ongoing-anime-grid .anime-year {
    background: var(--glass-bg);
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
}

.ongoing-anime-grid .anime-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    margin-top: auto; /* Przesuwa gatunki na dół */
    min-height: 20px; /* Minimalna wysokość dla spójności */
}

.ongoing-anime-grid .genre-tag {
    background: rgba(78, 205, 196, 0.2);
    border: 1px solid rgba(78, 205, 196, 0.4);
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-size: 0.6rem;
    color: var(--primary-color);
    white-space: nowrap;
}

/* Card Animations */
.ongoing-anime-grid .anime-card:nth-child(1) { animation-delay: 0.1s; }
.ongoing-anime-grid .anime-card:nth-child(2) { animation-delay: 0.2s; }
.ongoing-anime-grid .anime-card:nth-child(3) { animation-delay: 0.3s; }
.ongoing-anime-grid .anime-card:nth-child(4) { animation-delay: 0.4s; }

/* Slider Controls */
.ongoing-slider-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.ongoing-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ongoing-slider-dot.active {
    background: var(--accent-color);
    transform: scale(1.2);
}

.ongoing-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.ongoing-slider-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.ongoing-slider-nav.prev {
    left: 15px;
}

.ongoing-slider-nav.next {
    right: 15px;
}

/* ==========================================
   ONGOING ANIME RESPONSIVE STYLES
   ========================================== */

/* Tablet - Large (max-width: 1200px) */
@media screen and (max-width: 1200px) {
    .ongoing-anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.2rem;
    }
    
    .ongoing-anime-grid .anime-image-container {
        height: 260px;
    }
}

/* Tablet (max-width: 768px) */
@media screen and (max-width: 768px) {
    .ongoing-anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .ongoing-slide {
        padding: 1rem;
    }
    
    .ongoing-anime-grid .anime-image-container {
        height: 220px;
    }
    
    .ongoing-anime-grid .anime-info {
        padding: 0.8rem;
    }
    
    .ongoing-anime-grid .anime-title {
        font-size: 0.9rem;
        min-height: 2.4em;
    }
    
    /* Ukryj nawigację strzałkami na mobile */
    .ongoing-slider-nav {
        display: none;
    }
}

/* Mobile Large (max-width: 600px) */
@media screen and (max-width: 600px) {
    .ongoing-anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.8rem;
    }
    
    .ongoing-slide {
        padding: 0.8rem;
    }
    
    .ongoing-anime-grid .anime-image-container {
        height: 200px;
    }
    
    .ongoing-anime-grid .genre-tag {
        font-size: 0.55rem;
        padding: 0.05rem 0.3rem;
    }
}

/* Mobile (max-width: 480px) */
@media screen and (max-width: 480px) {
    .ongoing-anime-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .ongoing-slide {
        padding: 0.5rem;
    }
    
    .ongoing-anime-grid .anime-image-container {
        height: 180px;
    }
    
    .ongoing-anime-grid .anime-title {
        font-size: 0.8rem;
        min-height: 2.2em;
    }
    
    .ongoing-anime-grid .anime-meta {
        font-size: 0.7rem;
        margin-bottom: 0.6rem;
    }
    
    .ongoing-anime-grid .anime-rating,
    .ongoing-anime-grid .anime-episodes,
    .ongoing-anime-grid .anime-year {
        font-size: 0.6rem;
        padding: 0.1rem 0.3rem;
    }
}

/* Mobile Small (max-width: 360px) */
@media screen and (max-width: 360px) {
    .ongoing-anime-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .ongoing-slide {
        padding: 0.5rem;
    }
    
    .ongoing-anime-grid .anime-image-container {
        height: 160px;
    }
    
    .ongoing-anime-grid .anime-title {
        font-size: 0.75rem;
        min-height: 2em;
    }
    
    .ongoing-anime-grid .genre-tag {
        font-size: 0.5rem;
        padding: 0.05rem 0.25rem;
    }
    
    .ongoing-status-badge {
        font-size: 9px;
        padding: 4px 8px;
    }
}

/* ==========================================
   CARD ANIMATIONS
   ========================================== */

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stagger delays for cards */
.anime-card:nth-child(1), .episode-card:nth-child(1) { animation-delay: 0.1s; }
.anime-card:nth-child(2), .episode-card:nth-child(2) { animation-delay: 0.2s; }
.anime-card:nth-child(3), .episode-card:nth-child(3) { animation-delay: 0.3s; }
.anime-card:nth-child(4), .episode-card:nth-child(4) { animation-delay: 0.4s; }
.anime-card:nth-child(5), .episode-card:nth-child(5) { animation-delay: 0.5s; }
.anime-card:nth-child(6), .episode-card:nth-child(6) { animation-delay: 0.6s; }
.anime-card:nth-child(7), .episode-card:nth-child(7) { animation-delay: 0.7s; }
.anime-card:nth-child(8), .episode-card:nth-child(8) { animation-delay: 0.8s; }

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.full-width {
    width: 100%;
    text-align: center;
}

/* ==========================================
   NO RESULTS
   ========================================== */

.no-results {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-dark);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h2,
.no-results h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.no-results p {
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto;
}
/* ==========================================
   🎌 ANIME SITE - MAIN STYLESHEET - CZĘŚĆ 3
   ========================================== */

/* ==========================================
   SEARCH FILTERS
   ========================================== */

.search-filters {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-size: 0.8rem;
    color: var(--text-medium);
    margin-bottom: 0.4rem;
    font-weight: bold;
}

.filter-input,
.filter-select {
    padding: 0.6rem 0.8rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.2);
    transform: scale(1.02);
}

.filter-select option {
    background: var(--background-medium);
    color: white;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ==========================================
   RESULTS SECTION
   ========================================== */

.search-results {
    margin-top: 2rem;
}

.results-header {
    margin-bottom: 1.5rem;
}

.results-info {
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* ==========================================
   PAGINATION
   ========================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
}

.page-btn.active {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-color: transparent;
}

.page-btn:hover {
    border-color: var(--primary-color);
}

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

/* ==========================================
   SIDEBAR WIDGETS
   ========================================== */

.widget {
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    overflow: hidden;
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.6s ease forwards;
}

.widget:nth-child(1) { animation-delay: 0.4s; }
.widget:nth-child(2) { animation-delay: 0.6s; }
.widget:nth-child(3) { animation-delay: 0.8s; }
.widget:nth-child(4) { animation-delay: 1.0s; }

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.widget-title {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
}

.widget-content {
    padding: 1.5rem;
}

.widget-description {
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.4;
}

/* ==========================================
   STATS WIDGET
   ========================================== */

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* ==========================================
   POPULAR ANIME WIDGET
   ========================================== */

.popular-item {
    display: flex;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item:hover {
    background: rgba(78, 205, 196, 0.1);
    border-radius: 8px;
    padding: 0.8rem;
    margin: 0 -1rem;
}

.popular-thumb {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.popular-info {
    flex: 1;
    min-width: 0;
}

.popular-title {
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.7rem;
}

.popular-rating {
    color: var(--primary-color);
    font-weight: bold;
}

.popular-episodes {
    color: var(--text-dark);
}

/* ==========================================
   GENRES WIDGET
   ========================================== */

.genre-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.genre-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: var(--glass-bg);
    border-radius: 8px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.genre-item:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.genre-name {
    font-size: 0.9rem;
}

.genre-count {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: rgba(0, 0, 0, 0.9);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    color: var(--text-medium);
}

.footer-content p {
    margin-bottom: 0.5rem;
}

/* ==========================================
   SCROLL TO TOP BUTTON
   ========================================== */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}
/* ==========================================
   📱 RESPONSIVE STYLES - ANIME SITE
   ========================================== */

/* Tablet - Large (max-width: 1200px) */
@media screen and (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Tablet (max-width: 768px) */
@media screen and (max-width: 768px) {
    /* Header & Navigation */
    .header {
        padding: 0.8rem 0;
    }
    
    .nav-container {
        flex-wrap: wrap;
        padding: 0 1rem;
        gap: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .quick-search {
        order: 3;
        flex: 1 1 100%;
        max-width: none;
        margin: 0;
    }
    
    .nav-menu {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Main Layout */
    .main-layout {
        padding: 1rem;
        margin-top: 120px;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Grids */
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .episodes-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Search Filters */
    .filters-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    
    .filter-group:first-child {
        grid-column: 1 / -1;
    }
    
    /* Sidebar */
    .sidebar {
        grid-template-columns: 1fr;
    }
}

/* Mobile Large (max-width: 600px) */
@media screen and (max-width: 600px) {
    /* Typography */
    .section-header {
        font-size: 1.5rem;
    }
    
    /* Cards */
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .anime-poster {
        height: 220px;
    }
    
    .anime-title {
        font-size: 0.9rem;
    }
    
    .anime-info {
        padding: 0.8rem;
    }
    
    /* Episode Cards */
    .episode-image {
        height: 140px;
    }
    
    .episode-info {
        padding: 1rem;
    }
    
    .episode-title {
        font-size: 0.9rem;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
    }
    
    .page-btn {
        padding: 0.5rem 0.8rem;
        min-width: 40px;
        font-size: 0.9rem;
    }
}

/* Mobile (max-width: 480px) */
@media screen and (max-width: 480px) {
    /* Header */
    .header {
        position: static;
    }
    
    .main-layout {
        margin-top: 0;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
        order: 2;
    }
    
    .nav-link {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Hero */
    .hero-section {
        padding: 1.5rem 0.5rem;
        margin-bottom: 2rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    /* Content Sections */
    .content-section {
        margin-bottom: 3rem;
    }
    
    /* Grids */
    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .anime-poster {
        height: 200px;
    }
    
    /* Search Filters */
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    /* Sidebar Widgets */
    .widget {
        margin-bottom: 1.5rem;
    }
    
    .widget-title {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .widget-content {
        padding: 1rem;
    }
    
    /* Popular Items */
    .popular-item:hover {
        margin: 0 -0.5rem;
        padding: 0.8rem 0.5rem;
    }
    
    .popular-thumb {
        width: 40px;
        height: 56px;
    }
    
    /* Footer */
    .footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }
    
    .footer-content {
        padding: 0 1rem;
        font-size: 0.8rem;
    }
    
    /* Scroll to Top */
    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 1rem;
        right: 1rem;
    }
}

/* Mobile Small (max-width: 360px) */
@media screen and (max-width: 360px) {
    /* Main padding */
    .main-layout {
        padding: 0.5rem;
    }
    
    /* Cards text */
    .anime-title,
    .episode-title {
        font-size: 0.8rem;
    }
    
    .anime-meta,
    .episode-meta {
        font-size: 0.7rem;
    }
    
    /* Smaller badges */
    .anime-rating,
    .episode-number {
        font-size: 0.6rem;
        padding: 0.1rem 0.3rem;
    }
    
    .genre-tag {
        font-size: 0.55rem;
    }
    
    /* View more button */
    .view-more-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Landscape Mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 0.5rem 0;
    }
    
    .main-layout {
        margin-top: 80px;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .anime-poster {
        height: 180px;
    }
    
    .hero-section {
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
}

/* Hover effects dla urządzeń dotykowych */
@media (hover: none) {
    .anime-card:hover,
    .episode-card:hover {
        transform: none;
    }
    
    .anime-card:active,
    .episode-card:active {
        transform: scale(0.98);
    }
    
    .episode-overlay,
    .anime-overlay {
        opacity: 1;
    }
    
    .nav-link:hover,
    .genre-item:hover,
    .popular-item:hover {
        background: none;
    }
}

/* Ukrywanie particles na małych ekranach */
@media screen and (max-width: 768px) {
    .bg-particles {
        display: none;
    }
}

/* Dostosowanie animacji */
@media screen and (max-width: 768px) {
    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes slideInRight {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    .content-section {
        transform: translateY(20px);
    }
    
    .widget {
        transform: translateX(0);
    }
}

/* Hamburger Menu (opcjonalnie) */
@media screen and (max-width: 600px) {
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        padding: 1rem;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 998;
    }
    
    .nav-menu.active {
        transform: translateY(0);
    }
}
