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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

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

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

.logo h1 {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.nav-list a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 10px 0;
    position: relative;
}

.nav-list a:hover,
.nav-list a:focus {
    color: #2c3e50;
    outline: none;
}

.nav-list a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #2c3e50;
}

.search-box {
    display: flex;
    position: relative;
}

.search-box input {
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 25px 0 0 25px;
    outline: none;
    width: 250px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #2c3e50;
}

.search-box button {
    padding: 12px 25px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.search-box button:hover,
.search-box button:focus {
    background: #34495e;
    outline: none;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    background: none;
    border: none;
    padding: 10px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s ease;
    border-radius: 2px;
}

.breadcrumb {
    background: #f1f2f6;
    padding: 10px 0;
    border-bottom: 1px solid #e1e5e9;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
    margin: 0;
    font-size: 14px;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '>';
    margin-left: 10px;
    color: #666;
}

.breadcrumb-list a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-list a:hover {
    color: #2c3e50;
}

.breadcrumb-list span {
    color: #333;
    font-weight: 500;
}

.main {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
    display: flex;
    gap: 30px;
}

.main-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.article-header h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 14px;
    color: #666;
}

.article-meta time {
    color: #2c3e50;
    font-weight: 500;
}

.featured-section {
    margin-bottom: 40px;
}

.featured-image {
    margin-bottom: 25px;
}

.featured-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.featured-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #555;
    text-align: justify;
}

.movie-categories {
    margin-bottom: 40px;
}

.movie-categories h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 25px;
    border-left: 5px solid #2c3e50;
    padding-left: 20px;
    font-weight: 600;
}

.category-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 25px;
    background: #ecf0f1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.tab-btn:hover,
.tab-btn:focus {
    background: #d5dbdb;
    outline: none;
}

.tab-btn.active {
    background: #2c3e50;
    color: white;
    box-shadow: 0 3px 10px rgba(44, 62, 80, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.movie-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

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

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

.movie-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.movie-item-content {
    padding: 15px;
}

.movie-item h4 {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.movie-item p {
    color: #7f8c8d;
    font-size: 12px;
    font-weight: 500;
}

.article-content h3 {
    font-size: 22px;
    color: #2c3e50;
    margin: 30px 0 15px 0;
    font-weight: 600;
}

.article-content h4 {
    font-size: 18px;
    color: #2c3e50;
    margin: 25px 0 12px 0;
    font-weight: 600;
}

.article-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #555;
    text-align: justify;
}

.recommend-section,
.tags-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.recommend-section h3,
.tags-section h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 20px;
    border-left: 4px solid #2c3e50;
    padding-left: 15px;
    font-weight: 600;
}

.recommend-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommend-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.recommend-item:hover {
    background: #f8f9fa;
}

.recommend-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 12px;
    width: 100%;
}

.recommend-item img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.recommend-item-content h5 {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 600;
    line-height: 1.3;
}

.recommend-item-content p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-cloud a {
    display: inline-block;
    padding: 6px 12px;
    background: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.tags-cloud a:hover {
    background: #2c3e50;
    color: white;
}

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

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

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

.footer-links a:hover,
.footer-links a:focus {
    color: white;
    outline: none;
}

.footer-text {
    text-align: center;
    color: #95a5a6;
    font-size: 14px;
    line-height: 1.6;
}

.footer-text a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-text a:hover {
    color: white;
}

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

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

.back-to-top:hover,
.back-to-top:focus {
    background: #34495e;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(44, 62, 80, 0.4);
    outline: none;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .main {
        flex-direction: column;
        gap: 20px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .main-content {
        padding: 30px 25px;
    }

    .search-box input {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .nav, .search-box {
        display: none;
    }

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

    .nav.mobile-active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .nav.mobile-active .nav-list {
        flex-direction: column;
        gap: 15px;
    }

    .header-content {
        padding: 10px 0;
    }

    .main-content {
        padding: 25px 20px;
    }

    .container {
        padding: 0 15px;
    }

    .category-tabs {
        justify-content: center;
    }

    .tab-btn {
        flex: 1;
        min-width: 100px;
        font-size: 13px;
        padding: 10px 15px;
    }

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

    .movie-item img {
        height: 220px;
    }

    .movie-item-content {
        padding: 12px;
    }

    .footer-links {
        justify-content: center;
        text-align: center;
        gap: 20px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .breadcrumb-list {
        font-size: 13px;
        flex-wrap: wrap;
    }

    .article-header h2 {
        font-size: 24px;
    }

    .recommend-section,
    .tags-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 22px;
    }

    .article-header h2 {
        font-size: 20px;
    }

    .article-meta {
        font-size: 13px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .movie-categories h3 {
        font-size: 18px;
        padding-left: 15px;
    }

    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .movie-item img {
        height: 200px;
    }

    .movie-item h4 {
        font-size: 13px;
    }

    .movie-item p {
        font-size: 11px;
    }

    .article-content h3 {
        font-size: 18px;
    }

    .article-content h4 {
        font-size: 16px;
    }

    .article-content p {
        font-size: 14px;
        line-height: 1.6;
    }

    .footer {
        padding: 30px 0;
    }

    .footer-links {
        gap: 15px;
        font-size: 13px;
    }

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

    .recommend-item img {
        width: 50px;
        height: 70px;
    }

    .recommend-item-content h5 {
        font-size: 13px;
    }

    .recommend-item-content p {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }

    .main-content {
        padding: 20px 15px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .article-header h2 {
        font-size: 18px;
    }

    .movie-grid {
        gap: 10px;
    }

    .movie-item img {
        height: 180px;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

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

    .article-header h2 {
        font-size: 36px;
    }

    .search-box input {
        width: 300px;
    }
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

img {
    max-width: 100%;
    height: auto;
}

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

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
