* {
    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: #f5f5f5;
}

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

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

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

.logo h1 {
    font-size: 28px;
    font-weight: bold;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.history-btn {
    position: relative;
    cursor: pointer;
}

.history-btn .icon {
    font-size: 20px;
    color: #666;
}

.history-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 15px;
    min-width: 250px;
    display: none;
}

.history-dropdown h5 {
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-history {
    color: #e74c3c;
    text-decoration: none;
    font-size: 12px;
}

.history-list {
    list-style: none;
}

.search-box {
    flex: 1;
    max-width: 400px;
}

.search-form {
    display: flex;
    border: 2px solid #e74c3c;
    border-radius: 25px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #c0392b;
}

.nav-menu {
    border-top: 1px solid #eee;
    padding: 10px 0;
}

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

.nav-item a {
    color: #333;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-item.active a,
.nav-item a:hover {
    background: #e74c3c;
    color: white;
}

.main-content {
    padding: 30px 0;
}

.hero-section {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-bottom: 40px;
}

.hero-left {
    position: relative;
}

.hero-slider {
    position: relative;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.slide.active {
    opacity: 1;
}

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

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 40px 30px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.play-icon {
    font-size: 48px;
    opacity: 0.9;
}

.slide-overlay h3 {
    font-size: 24px;
    font-weight: bold;
}

.hero-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.category-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.category-item label {
    display: block;
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

.genre-tags {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.genre-tags a {
    background: white;
    color: #666;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 15px;
    text-align: center;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.genre-tags a:hover {
    background: #e74c3c;
    color: white;
}

.qr-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.qr-code img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
}

.qr-text h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.qr-text p {
    font-size: 14px;
    color: #666;
    margin: 3px 0;
}

.content-section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    color: #333;
    font-weight: bold;
}

.section-title a {
    color: #333;
    text-decoration: none;
}

.title-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

.section-nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.section-nav a {
    color: #666;
    text-decoration: none;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-nav a:hover {
    background: #e74c3c;
    color: white;
}

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

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

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.movie-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.movie-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.movie-poster {
    position: relative;
    aspect-ratio: 3/4;
    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.1);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.movie-item:hover .play-overlay {
    opacity: 1;
}

.play-overlay .play-icon {
    color: white;
    font-size: 48px;
}

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

.movie-info {
    padding: 15px;
}

.movie-info h4 {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.4;
}

.movie-info h4 a {
    color: #333;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-info h4 a:hover {
    color: #e74c3c;
}

.movie-info p {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.text-links a {
    color: #666;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
}

.text-links a:hover {
    background: #e74c3c;
    color: white;
}

.text-links a::after {
    content: '→';
    position: absolute;
    right: 15px;
    opacity: 0.5;
}

.section-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
}

.section-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.featured-slider {
    position: relative;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.featured-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.featured-slide.active {
    opacity: 1;
}

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

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px 20px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.featured-overlay .play-icon {
    font-size: 36px;
}

.featured-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #e74c3c;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.featured-overlay h3 {
    font-size: 18px;
    font-weight: bold;
}

.rank-section {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.rank-poster {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 8px;
    overflow: hidden;
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.rank-poster:hover .rank-overlay {
    opacity: 1;
}

.rank-overlay .play-icon {
    color: white;
    font-size: 36px;
}

.rank-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.rank-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    background: #999;
}

.rank-number.first {
    background: #ff6b6b;
}

.rank-number.second {
    background: #4ecdc4;
}

.rank-number.third {
    background: #45b7d1;
}

.rank-item a {
    flex: 1;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-item a:hover {
    color: #e74c3c;
}

.rank-status {
    font-size: 12px;
    color: #999;
}

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

.partners-section,
.links-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

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

.partner-item {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.3s;
}

.partner-item:hover {
    transform: translateY(-3px);
}

.partner-item img {
    width: 80px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
}

.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.links-list a {
    color: #666;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 15px;
    background: #f8f9fa;
    font-size: 14px;
    transition: all 0.3s;
}

.links-list a:hover {
    background: #e74c3c;
    color: white;
}

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #eee;
    z-index: 1000;
    padding: 10px 0;
}

.mobile-nav {
    display: flex;
    justify-content: space-around;
}

.mobile-nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    transition: color 0.3s;
}

.mobile-nav-item.active a,
.mobile-nav-item a:hover {
    color: #e74c3c;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-text {
    font-size: 12px;
}

.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

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

.back-to-top:hover {
    background: #c0392b;
    transform: translateY(-3px);
}

.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #e74c3c;
}

.footer-content {
    text-align: center;
    color: #bdc3c7;
    font-size: 14px;
    line-height: 1.8;
}

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

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-box {
        flex: 1;
        max-width: none;
    }
    
    .nav-list {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-item a {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hero-slider {
        height: 250px;
    }
    
    .slide-overlay {
        padding: 20px 15px 15px;
    }
    
    .slide-overlay h3 {
        font-size: 18px;
    }
    
    .play-icon {
        font-size: 36px !important;
    }
    
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .category-item {
        padding: 10px;
    }
    
    .category-item img {
        width: 30px;
        height: 30px;
    }
    
    .genre-tags {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .genre-tags a {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .qr-section {
        padding: 15px;
    }
    
    .qr-code img {
        width: 60px;
        height: 60px;
    }
    
    .qr-text h4 {
        font-size: 14px;
    }
    
    .qr-text p {
        font-size: 12px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .section-nav {
        gap: 8px;
    }
    
    .section-nav a {
        padding: 4px 10px;
        font-size: 12px;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .section-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-slider {
        height: 200px;
    }
    
    .featured-overlay {
        padding: 20px 15px 15px;
    }
    
    .featured-overlay h3 {
        font-size: 16px;
    }
    
    .rank-section {
        grid-template-columns: 120px 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .rank-item {
        padding: 6px 0;
    }
    
    .rank-item a {
        font-size: 13px;
    }
    
    .rank-status {
        font-size: 11px;
    }
    
    .section-right .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .text-links {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 15px;
    }
    
    .partner-item {
        padding: 10px;
    }
    
    .partner-item img {
        width: 60px;
        height: 45px;
    }
    
    .partners-section,
    .links-section {
        padding: 20px;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .main-content {
        padding-bottom: 80px;
    }
    
    .back-to-top {
        bottom: 120px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .footer-links {
        gap: 15px;
    }
    
    .footer-links a {
        font-size: 13px;
    }
    
    .footer-content {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 200px;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .section-right .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .movie-info {
        padding: 10px;
    }
    
    .movie-info h4 {
        font-size: 14px;
    }
    
    .movie-info p {
        font-size: 12px;
    }
    
    .movie-status {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .featured-slider {
        height: 180px;
    }
    
    .rank-section {
        grid-template-columns: 100px 1fr;
        gap: 8px;
        padding: 12px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .title-icon {
        width: 24px;
        height: 24px;
    }
}
