* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; }
body { background: #f0f2f5; }

/* Header */
.header { background: #fff; padding: 1rem 2rem; box-shadow: 0 2px 4px rgba(0,0,0,0.1); display: flex; justify-content: space-between; align-items: center; }
.header h1 { font-size: 1.5rem; color: #333; }
.btn-view { padding: 0.5rem 1.5rem; background: #333; color: #fff; text-decoration: none; border-radius: 4px; }
.btn-view:hover { background: #555; }

/* Container */
.admin-container { max-width: 1400px; margin: 2rem auto; display: grid; grid-template-columns: 320px 1fr; gap: 2rem; padding: 0 1rem; }

/* Sidebar */
.sidebar { background: #fff; padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.sidebar h2 { font-size: 1.25rem; margin-bottom: 1.5rem; color: #333; border-bottom: 2px solid #eee; padding-bottom: 0.5rem; }

/* Category Form */
.category-form { background: #f8f9fa; padding: 1rem; border-radius: 6px; margin-bottom: 1.5rem; }
.category-form h3 { font-size: 0.95rem; margin-bottom: 0.75rem; color: #555; }
.form-input { width: 100%; padding: 0.6rem; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 0.75rem; font-size: 0.9rem; }
.form-input:focus { outline: none; border-color: #333; }
.form-buttons { display: flex; gap: 0.5rem; }
.btn-save { flex: 1; padding: 0.6rem; background: #28a745; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; }
.btn-save:hover { background: #218838; }
.btn-cancel { padding: 0.6rem 1rem; background: #dc3545; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.btn-cancel:hover { background: #c82333; }

/* Category Tree */
.category-tree { max-height: 500px; overflow-y: auto; }
.cat-parent { margin-bottom: 0.75rem; }
.cat-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem; background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; margin-bottom: 0.5rem; }
.cat-item.sub { margin-left: 1.5rem; background: #f8f9fa; }
.cat-btn { flex: 1; text-align: left; padding: 0.4rem 0.8rem; background: transparent; border: none; cursor: pointer; font-size: 0.9rem; color: #333; }
.cat-btn:hover { color: #000; font-weight: 600; }
.cat-actions button { padding: 0.3rem 0.5rem; background: #fff; border: 1px solid #ddd; border-radius: 3px; cursor: pointer; font-size: 0.85rem; }
.cat-actions button:hover { background: #f0f0f0; }

/* Main Content */
.main-content { background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.empty-state { text-align: center; padding: 4rem 2rem; color: #999; }
.empty-icon { font-size: 4rem; margin-bottom: 1rem; }

/* Movie Form */
.movie-section h2 { font-size: 1.5rem; margin-bottom: 1.5rem; color: #333; }
.movie-form { background: #f8f9fa; padding: 1.5rem; border-radius: 6px; margin-bottom: 2rem; }
.movie-form h3 { font-size: 1.1rem; margin-bottom: 1rem; color: #555; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-control { width: 100%; padding: 0.7rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.9rem; }
.form-control:focus { outline: none; border-color: #333; }
.form-control.readonly { background: #e9ecef; cursor: not-allowed; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }
.btn-submit { flex: 1; padding: 0.8rem; background: #007bff; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 0.95rem; }
.btn-submit:hover { background: #0056b3; }

/* Movies Table */
.movies-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.movies-table th { background: #f8f9fa; padding: 0.8rem; text-align: left; font-weight: 600; color: #555; border-bottom: 2px solid #dee2e6; font-size: 0.9rem; }
.movies-table td { padding: 0.8rem; border-bottom: 1px solid #dee2e6; }
.movie-row:hover { background: #f8f9fa; }
.movie-info { display: flex; align-items: center; gap: 1rem; }
.movie-thumb { width: 60px; height: 80px; object-fit: cover; border-radius: 4px; background: #e9ecef; }
.movie-details h4 { font-size: 0.95rem; margin-bottom: 0.3rem; color: #333; }
.movie-details p { font-size: 0.8rem; color: #666; }
.movie-details .short-link { color: #28a745; font-size: 0.75rem; }
.action-buttons { display: flex; gap: 0.5rem; justify-content: flex-end; }
.btn-edit, .btn-delete { padding: 0.4rem 0.8rem; border: none; border-radius: 4px; cursor: pointer; font-size: 0.85rem; }
.btn-edit { background: #ffc107; color: #000; }
.btn-edit:hover { background: #e0a800; }
.btn-delete { background: #dc3545; color: #fff; }
.btn-delete:hover { background: #c82333; }

/* Responsive */
@media (max-width: 1024px) {
    .admin-container { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}