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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #e74c3c;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px 0 0 20px;
    outline: none;
    width: 250px;
}

.search-box button {
    padding: 8px 15px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #c0392b;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

.hero-slider {
    background: #fff;
    padding: 30px 0;
    margin-bottom: 30px;
}

.slider-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.slide {
    display: none;
}

.slide.active {
    display: block;
}

.slide-content {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.slide-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px;
}

.slide-info h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.slider-controls button {
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
}

.slider-controls button:hover {
    background: rgba(0,0,0,0.8);
}

.content-section {
    background: #fff;
    margin-bottom: 30px;
    padding: 30px 0;
    border-radius: 10px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e74c3c;
}

.section-header h2 {
    font-size: 24px;
    color: #333;
}

.more-link {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 500;
}

.more-link:hover {
    text-decoration: underline;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.movie-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.movie-item a {
    text-decoration: none;
    color: inherit;
}

.movie-poster {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.movie-item:hover .movie-poster img {
    transform: scale(1.05);
}

.quality {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.movie-info {
    padding: 15px;
}

.movie-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.main-footer {
    background: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
}

.footer-content a {
    color: #e74c3c;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

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

.back-to-top button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: background 0.3s;
}

.back-to-top button:hover {
    background: #c0392b;
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .main-nav {
        display: none;
        width: 100%;
        order: 3;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        padding: 20px 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .search-box {
        order: 2;
        margin-left: auto;
        margin-right: 15px;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .slide-content {
        height: 250px;
    }
    
    .slide-info {
        padding: 20px;
    }
    
    .slide-info h3 {
        font-size: 18px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .movie-poster {
        height: 200px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        padding: 10px 0;
    }
    
    .logo a {
        font-size: 20px;
    }
    
    .search-box input {
        width: 150px;
        padding: 6px 12px;
    }
    
    .search-box button {
        padding: 6px 12px;
    }
    
    .hero-slider {
        padding: 20px 0;
        margin-bottom: 20px;
    }
    
    .slide-content {
        height: 200px;
    }
    
    .slide-info {
        padding: 15px;
    }
    
    .slide-info h3 {
        font-size: 16px;
        margin-bottom: 5px;
    }
    
    .content-section {
        padding: 20px 0;
        margin-bottom: 20px;
    }
    
    .section-header {
        margin-bottom: 20px;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .movie-poster {
        height: 180px;
    }
    
    .movie-info {
        padding: 10px;
    }
    
    .movie-info h3 {
        font-size: 14px;
        height: 36px;
    }
    
    .movie-info p {
        font-size: 12px;
        height: 32px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top button {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-enter {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.slide-exit {
    animation: slideOut 0.5s ease-out;
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.movie-item.skeleton .movie-poster {
    background: #f0f0f0;
}

.movie-item.skeleton .movie-info h3,
.movie-item.skeleton .movie-info p {
    background: #f0f0f0;
    border-radius: 4px;
    color: transparent;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
