/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
}

/* 顶部用户操作栏 */
.top-user-bar {
    position: fixed;
    top: 15px;
    right: 25px;
    z-index: 1100;
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 20px;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
}

.top-user-bar a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95em;
}

.top-user-bar a:hover {
    color: #3498db;
}

.logout-link {
    color: #e74c3c !important;
}

.welcome-text {
    color: #7f8c8d;
    margin-right: 10px;
    font-size: 0.9em;
}

/* 调整主内容边距 */
.main-content {
    margin-left: 240px;
    padding-top: 70px; /* 新增顶部内边距 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .top-user-bar {
        right: 15px;
        padding: 6px 15px;
        gap: 15px;
    }
    
    .main-content {
        margin-left: 60px;
        padding-top: 60px;
    }
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}


/* 垂直导航栏样式 */
.vertical-nav {
    width: 240px;
    background: #2c3e50;
    position: fixed;
    height: 100vh;
}

.nav-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
    text-align: center;
}

.nav-header .logo {
    width: 80px;
    margin-bottom: 15px;
}

.nav-header p {
    font-size: 1.1em;
    color: #ecf0f1;
    margin: 0;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block; /* 关键属性 */
}

/* 列表项样式 */
.nav-links li {
    display: block; /* 强制垂直排列 */
    margin: 8px 15px;
}

/* 导航链接基础样式 */
.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* 图标样式 */
.nav-link i {
    width: 25px;
    font-size: 1.1em;
    margin-right: 15px;
}

/* 悬停效果 */
.nav-link:hover {
    background: #34495e;
    transform: translateX(5px);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

/* 用户区域 */
.user-section {
    border-top: 1px solid #34495e;
    padding: 20px;
}

.logged-in {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.username {
    margin-bottom: 10px;
    color: #ecf0f1;
}

.logout-btn {
    color: #e74c3c;
    text-decoration: none;
    transition: color 0.3s;
}

.logout-btn:hover {
    color: #c0392b;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-btn, .register-btn {
    display: block;
    padding: 12px;
    text-align: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.login-btn {
    background: #3498db;
    color: white;
}

.login-btn:hover {
    background: #2980b9;
}

.register-btn {
    background: #27ae60;
    color: white;
}

.register-btn:hover {
    background: #219a52;
}

/* 主内容区域偏移 */
.main-content {
    margin-left: 240px;
    min-height: 100vh;
}

/* 响应式处理 */
@media (max-width: 768px) {
    .vertical-nav {
        width: 60px;
        overflow: hidden;
        transition: width 0.3s;
    }

    .vertical-nav:hover {
        width: 240px;
    }

    .nav-header p {
        display: none;
    }

    .nav-link span {
        display: none;
    }

    .nav-link i {
        margin-right: 0;
    }

    .main-content {
        margin-left: 60px;
    }
}

/* 隐藏原生复选框但保持可访问 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* 自定义复选框样式 */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-checkbox {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #666;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

input:checked + .custom-checkbox::after {
    content: "✓";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #2196F3;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-right {
    display: flex;
    gap: 1.5rem;
    margin-left: auto; /* 新增右对齐关键属性 */
}

.nav-links a:hover {
    color: #ff4d4d;
}

/* 轮播图样式 */
.carousel-container {
    position: relative;
    overflow: hidden;
    height: 70vh;
    margin-top: 60px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-item {
    flex: 0 0 100%;
    min-width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-content {
    position: absolute;
    bottom: 20%;
    left: 10%;
    color: white;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    cursor: pointer;
    z-index: 10;
    font-size: 2rem;
}

.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

/* 视频网格布局 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 2rem 5%;
}

.video-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    max-width: 200px;
}

.video-card:hover {
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        margin: 1rem 0;
    }
}
/* style.css 追加 */
.site-footer {
    background: #2a2a2a;
    color: rgba(255,255,255,0.8);
    padding: 40px 5%;
    margin-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin: 8px 0;
    line-height: 1.6;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ff4d4d;
}

.copyright {
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}


/* 追加到style.css */
.about-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.company-intro {
    text-align: center;
    margin-bottom: 3rem;
}

/* 添加到static/css/style.css文件 */
.highlight-text {
    text-indent: 2em;     /* 首行缩进2个中文字符 */
    text-align: justify;  /* 两端对齐文本 */
    text-justify: inter-ideograph; /* 优化中文排版 */
    line-height: 1.8;     /* 增加行距提升可读性 */
    margin: 15px 0;       /* 增加段落间距 */
}

.feature-list {
    columns: 2;
    list-style: square;
    margin: 2rem 0;
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.business-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .feature-list {
        columns: 1;
    }
}
/* style.css 新增样式 */
.bg-gray {
    background: #f8f9fa;
    padding: 2rem 0;
}

.bg-dark {
    background: #2a2a2a;
    color: white;
    padding: 2rem 0;
}

.movie-card {
    position: relative;
    overflow: visible;
}

.ribbon {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4d4d;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    z-index: 2;
}

.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding: 1rem 5%;
    scrollbar-width: thin;
}

.original-card {
    flex: 0 0 280px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 调整图片尺寸并保持比例 */
.video-card img,
.original-card img {
    width: 100%;
    height: 109px;
    object-fit: cover;
    object-position: center;
}

/* 认证页面样式 */
.auth-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
}

.register-btn {
    background: #ff4d4d;
    color: white!important;
    padding: 0.5rem 1rem!important;
    border-radius: 20px;
}


/* static/css/style.css 恢复导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    padding: 1rem 5%;
    background: #2a2a2a;
}

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

.nav-link {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.register-btn {
    background: #ff4d4d;
    padding: 8px 20px;
    border-radius: 4px;
}
/* 添加搜索框样式 */
.nav-search {
    flex: 0 1 500px;
    margin: 0 2rem;
}

.search-input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    background: rgba(0,0,0,0.3);
    color: white;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #ff4d4d;
    box-shadow: 0 0 8px rgba(255,77,77,0.3);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-search {
        order: 3;
        width: 100%;
        margin: 1rem 0;
    }
}

/* 添加邮箱验证样式 */
input:invalid {
    border-color: #ff4d4d;
    animation: shake 0.5s ease-in-out;
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

/* 增强分类导航样式 */
.category-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0;
    margin: 0 -0.5rem;
}

.category-nav {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    padding: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid #007bff;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,123,255,0.1);
    background: #007bff;
    color: white;
    border-color: transparent;
}

@media (max-width: 768px) {
    .category-nav {
        padding: 1rem 0;
    }
    
    .category-links {
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* 新增分类专属样式 */
.category-btn {
    /* 公共样式 */
    border: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    min-width: 100px;
    font-family: 'Microsoft YaHei', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.category-btn:hover::before {
    left: 100%;
}

.category-all { 
    background-image: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
    font-size: 1.1em; 
}

.category-tv { 
    background-image: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
    letter-spacing: 0.8px; 
}

.category-movie { 
    background-image: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    font-weight: 700; 
}

.category-show { 
    background-image: linear-gradient(135deg, #fcc419 0%, #fab005 100%);
    text-transform: capitalize; 
}

.category-anime { 
    background-image: linear-gradient(135deg, #be4bdb 0%, #ae3ec9 100%);
    text-transform: capitalize;
}

/* 响应式网格布局 */
.category-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    padding: 0 5%;
}

@media (max-width: 768px) {
    .category-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
    }
    
    .category-btn {
        min-width: 80px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .category-container {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
}

/* 用户状态样式 */
.user-status {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    display: flex;
    gap: 15px;
}

.user-status a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s;
}

.user-status a:hover {
    opacity: 0.8;
}


/* 在style.css中添加图片尺寸限制 */
.responsive-img {
    max-width: 500px;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}