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

body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: #000000;
  color: #f0f0f0;
  min-height: 100vh;
}

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

/* 导航栏 */
.navbar {
  background: #111;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
  margin-bottom: 30px;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar h1 {
  color: #ff6b6b;
  font-size: 24px;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  color: #f0f0f0;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 5px;
  transition: all 0.3s;
}

.nav-links a:hover {
  background: #ff6b6b;
  color: #000;
}

.logout-btn {
  background: #e74c3c;
  color: white !important;
}

/* 登录/注册表单 */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.auth-box {
  background: #121212;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
  width: 100%;
  max-width: 400px;
}

.auth-box h2 {
  text-align: center;
  color: #ff6b6b;
  margin-bottom: 30px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #333;
  background: #1b1b1b;
  color: #f0f0f0;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #ff6b6b;
}

/* 按钮 */
.episode-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.episode-table th,
.episode-table td {
  border: 1px solid #e0e0e0;
  padding: 10px;
  text-align: left;
}
.episode-table th {
  background: #000000;
  font-weight: bold;
}
.episode-table input {
  width: 100%;
  padding: 7px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.remove-episode-btn {
  background: #ff7070;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
}
.remove-episode-btn:hover {
  background: #ff4a4a;
}

.add-btn {
  background: #ff6b6b;
  color: #fff;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 10px;
}

.btn {
  width: 100%;
  padding: 12px;
  background: #ff6b6b;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn:hover {
  background: #ff4d4d;
}

.switch-form {
  text-align: center;
  margin-top: 20px;
  color: #666;
}
.switch-form a {
  color: #667eea;
  text-decoration: none;
}

/* 电影卡片 */
.movies-grid {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Khoảng cách giữa các phim */
}

.movie-card {
  display: flex;
  background: #121212;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s;
}

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

.movie-card img {
  width: 200px; /* Chiều rộng cố định bên trái */
  height: 300px; /* Chiều cao cố định */
  object-fit: cover;
  flex-shrink: 0; /* Không bị co lại */
}

.movie-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1; /* Chiếm phần còn lại của hàng */
}

.movie-info h3 {
  color: #ff6b6b;
  margin-bottom: 10px;
}

.movie-info p {
  color: #ccc;
  font-size: 14px;
  line-height: 1.6;
}

.watch-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 20px;
  background: #ff6b6b;
  color: #000;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}

.watch-btn:hover {
  background: #ff8585;
}

/* 视频播放器 */
.video-container {
  background: #121212;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.video-container video {
  width: 100%;
  border-radius: 5px;
  background: #000;
}

.video-details {
  background: #121212;
  border-radius: 10px;
  padding: 20px;
}

.video-details h2 {
  color: #ff6b6b;
  margin-bottom: 15px;
}

.video-details p {
  color: #ccc;
  line-height: 1.8;
}

/* 管理面板 */
.admin-section {
  background: #121212;
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 30px;
}

.admin-section h2 {
  color: #ff6b6b;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #333;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  color: #f0f0f0;
}

table th,
table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #333;
}

table th {
  background: #1b1b1b;
  color: #ff6b6b;
  font-weight: 600;
}

table tr:hover {
  background: #1f1f1f;
}

.action-btns {
  display: flex;
  gap: 10px;
}

.btn-edit {
  background: #ff9f43;
  color: #000;
}

.btn-delete {
  background: #ff4d4d;
  color: #fff;
}

.btn-edit,
.btn-delete,
.btn-add {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

.btn-add {
  background: #4cd137;
  color: #000;
  margin-bottom: 20px;
}

/* Tabs */
.tabs {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

.tab-btn {
  padding: 8px 16px;
  cursor: pointer;
  border: none;
  background-color: #222;
  color: #fff;
  border-radius: 5px 5px 0 0;
  font-weight: bold;
}

.tab-btn.active {
  background-color: #ff6b6b;
  color: #000;
}

.tab-content {
  border: 1px solid #333;
  padding: 15px;
  border-radius: 0 5px 5px 5px;
  background-color: #121212;
}

/* 通用提示 */
.alert {
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.alert-success {
  background: #0e6655;
  color: #d1f2eb;
  border: 1px solid #1abc9c;
}

.alert-error {
  background: #641e16;
  color: #f9e0e0;
  border: 1px solid #e74c3c;
}

/* Responsive Navbar */
.nav-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    margin-top: 10px;
  }

  .nav-links a,
  .nav-links span {
    margin: 10px 0;
  }

  .nav-links.active {
    display: flex;
  }
}

@media (max-width: 768px) {
  .movies-grid {
    flex-direction: column;
    gap: 15px;
  }

  .movie-card {
    flex-direction: column; /* chuyển layout sang cột */
    align-items: center;
  }

  .movie-card img {
    width: 100%; /* ảnh full width trên mobile */
    height: auto; /* chiều cao tự động */
    border-radius: 10px 10px 0 0;
  }

  .movie-info {
    padding: 10px;
    text-align: center;
  }

  .movie-info h3 {
    font-size: 18px;
  }

  .movie-info p {
    font-size: 14px;
  }

  .watch-btn {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
  }
}

/* admin style */
.tabs {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

.tab-btn {
  padding: 8px 16px;
  cursor: pointer;
  border: none;
  background-color: #ddd;
  border-radius: 5px 5px 0 0;
  font-weight: bold;
}

.tab-btn.active {
  background-color: rgba(255, 250, 240, 0.95);
  /* color: #ff6b6b; */
}

.tab-content {
  border: 1px solid #ccc;
  padding: 15px;
  border-radius: 0 5px 5px 5px;
  /* background-color: #fff; */
}
