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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 5px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 10px 10px;
}

header h1 {
    font-size: 28px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s;
    font-size: 14px;
}

nav a:hover, nav a.active {
    background-color: rgba(255, 255, 255, 0.3);
}

.admin-link {
    margin-left: auto;
    background-color: rgba(255, 255, 255, 0.3);
}

.stats {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-card {
    flex: 1;
    min-width: 50px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 16px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2575fc;
}

.filters {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.filter-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-form select, .filter-form button, .reset-btn {
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.filter-form select {
    flex: 1;
    min-width: 150px;
    background-color: white;
}

.filter-form button {
    background-color: #2575fc;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.filter-form button:hover {
    background-color: #1a68e8;
}

.reset-btn {
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: inline-block;
}

.reset-btn:hover {
    background-color: #5a6268;
}

.movies-grid {
    padding: 3px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.movie-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.movie-card.completed {
    border-left: 4px solid #28a745;
}

.movie-card.watching {
    border-left: 4px solid #ffc107;
}

.movie-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.movie-category {
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.movie-id {
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
}

.movie-body {
    padding: 20px;
}

.movie-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.movie-year {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
}

.movie-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.completed-status {
    background-color: #d4edda;
    color: #155724;
}

.watching-status {
    background-color: #fff3cd;
    color: #856404;
}

.episode-progress {
    margin-top: 15px;
}

.progress-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: #2575fc;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.episode-text {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
}

.movie-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

.added-date {
    color: #6c757d;
    font-size: 13px;
}

.movie-actions {
    display: flex;
    gap: 10px;
}

.edit-btn, .delete-btn {
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.edit-btn {
    background-color: #17a2b8;
    color: white;
}

.edit-btn:hover {
    background-color: #138496;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

.delete-btn:hover {
    background-color: #c82333;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: #6c757d;
    font-size: 18px;
}

/* 后台管理样式 */
.admin-content {
    padding: 10px;
}

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

.admin-section h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.categories-form {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2575fc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.1);
}

.form-help {
    font-size: 13px;
    color: #6c757d;
    margin-top: 5px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 25px;
    border-radius: 5px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #2575fc;
    color: white;
}

.btn-primary:hover {
    background-color: #1a68e8;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* 表格样式 */
.movies-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #eee;
}

.movies-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.movies-table th {
    background-color: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.movies-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.movies-table tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.completed {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.watching {
    background-color: #fff3cd;
    color: #856404;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.action-btn.edit {
    background-color: #17a2b8;
    color: white;
}

.action-btn.edit:hover {
    background-color: #138496;
}

.action-btn.delete {
    background-color: #dc3545;
    color: white;
    margin-left: 5px;
}

.action-btn.delete:hover {
    background-color: #c82333;
}

.no-data {
    text-align: center;
    padding: 40px !important;
    color: #6c757d;
}

/* 表单容器 */
.form-container {
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
}

/* 警告框 */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 25px;
    font-weight: 600;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .movies-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-row .form-group {
        min-width: 100%;
    }
    
    nav {
        flex-direction: column;
    }
    
    .admin-link {
        margin-left: 0;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-form select, .filter-form button, .reset-btn {
        width: 100%;
    }
}





/* 用户信息样式 */
.nav-left, .nav-right {
    display: flex;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
}

.logout-btn {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 表单中的图标 */
.btn i, .action-btn i {
    margin-right: 5px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
    }
    
    .nav-left {
        display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
    }
    .nav-right {
        display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        
        
    }
    
    .user-info {
        justify-content: center;
    }
}