/*@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');*/

body {
  font-family: 'Noto Sans SC', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  min-height: 100vh;
  color: #e2e8f0;
  overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
  background-color: #1e293b;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .navbar {
    padding: 1rem 1.5rem;
  }
}

/* Logo区域 */
.navbar-brand {
  display: flex;
  align-items: center;
}

.navbar-brand a {
  text-decoration: none;
  color: inherit;
}

.navbar-logo {
  color: #f43f5e;
  font-size: 1.25rem;
  margin-right: 0.5rem;
}

@media (min-width: 768px) {
  .navbar-logo {
    font-size: 1.5rem;
    margin-right: 0.75rem;
  }
}

.navbar-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
}

@media (min-width: 768px) {
  .navbar-title {
    font-size: 1.25rem;
  }
}

/* PC端导航链接 */
.navbar-nav {
  display: none;
  align-items: center;
  margin-left: 1.5rem;
  gap: 1rem;
}

@media (min-width: 768px) {
  .navbar-nav {
    display: flex;
  }
}

.navbar-nav a {
  background-color: #475569;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.navbar-nav a:hover {
  background-color: #64748b;
}

.navbar-nav a.active {
  background-color: #f43f5e;
  color: white;
}

.navbar-nav a.active:hover {
  background-color: #e11d48;
}

/* 右侧操作区域 */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .navbar-actions {
    gap: 1rem;
  }
}

/* 搜索按钮 */
.navbar-search {
  display: none;
  align-items: center;
  color: #f43f5e;
  text-decoration: none;
}

@media (min-width: 768px) {
  .navbar-search {
    display: flex;
  }
}

.navbar-search i {
  margin-right: 0.25rem;
}

/* 播放记录下拉菜单 */
.dropdown {
  position: relative;
  display: none;
}

@media (min-width: 768px) {
  .dropdown {
    display: block;
  }
}

.dropdown-toggle {
  background-color: #475569;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease;
}

.dropdown-toggle:hover {
  background-color: #64748b;
}

.dropdown-toggle i:first-child {
  margin-right: 0.5rem;
}

.dropdown-toggle i:last-child {
  margin-left: 0.25rem;
  font-size: 0.75rem;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  width: 16rem;
  background-color: #1e293b;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  z-index: 50;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-header {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #475569;
}

.dropdown-header h3 {
  font-weight: 700;
  margin: 0;
  color: white;
}

.dropdown-content {
  max-height: 20rem;
  overflow-y: auto;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: white;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.dropdown-item:hover {
  background-color: #475569;
}

.dropdown-item-content {
  display: flex;
}

.dropdown-item-thumb {
  width: 4rem;
  height: 2.5rem;
  background-color: #64748b;
  border-radius: 0.25rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.dropdown-item-info {
  flex: 1;
  min-width: 0;
}

.dropdown-item-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 0.25rem 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.dropdown-item-progress {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
}

.dropdown-footer {
  padding: 0.5rem 1rem;
  border-top: 1px solid #475569;
}

.dropdown-footer a {
  color: #f43f5e;
  font-size: 0.875rem;
  text-decoration: none;
}

.dropdown-footer a:hover {
  text-decoration: underline;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  color: white;
  padding: 0.5rem;
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu-btn i {
  font-size: 1.25rem;
}

/* 移动端导航菜单 */
.mobile-nav {
  display: block;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: #1e293b;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  z-index: 40;
  max-height: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

.mobile-nav.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  max-height: 500px;
}

.mobile-nav-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mobile-nav-links a {
  background-color: #475569;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.mobile-nav-links a:hover {
  background-color: #64748b;
}

.mobile-nav-links a.active {
  background-color: #f43f5e;
  color: white;
}

.mobile-nav-links a.active:hover {
  background-color: #e11d48;
}

/* 移动端搜索框 */
.mobile-search {
  position: relative;
}

.mobile-search input {
  width: 100%;
  background-color: #475569;
  color: white;
  padding: 0.5rem 1rem;
  padding-right: 2.5rem;
  border-radius: 9999px;
  border: none;
  outline: none;
}

.mobile-search input:focus {
  ring: 2px solid #f43f5e;
}

.mobile-search button {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
}

.mobile-search button:hover {
  color: #f43f5e;
}

/* 移动端播放记录 */
.mobile-history {
  color: white;
}

.mobile-history h3 {
  font-weight: 500;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
}

.mobile-history h3 i {
  margin-right: 0.5rem;
}

.mobile-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-history-item {
  display: block;
  padding: 0.5rem;
  background-color: #475569;
  border-radius: 0.5rem;
  text-decoration: none;
  color: white;
  transition: background-color 0.3s ease;
}

.mobile-history-item:hover {
  background-color: #64748b;
}

.mobile-history-item-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 0.25rem 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.mobile-history-item-progress {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
}

/* 用户认证按钮样式 */
.auth-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* 在移动端隐藏PC端的认证按钮 */
@media (max-width: 767px) {
  .auth-buttons {
    display: none;
  }
}

.auth-btn {
  background-color: #475569;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-btn:hover {
  background-color: #64748b;
  transform: translateY(-1px);
}

.auth-btn.login-btn {
  background-color: #f43f5e;
}

.auth-btn.login-btn:hover {
  background-color: #e11d48;
}

.auth-btn.register-btn {
  background-color: #3b82f6;
}

.auth-btn.register-btn:hover {
  background-color: #2563eb;
}

/* 用户头像样式 */
.user-avatar-toggle {
  padding: 0.25rem 0.75rem;
  background-color: #475569;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-avatar-toggle:hover {
  background-color: #64748b;
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f43f5e;
}

.user-dropdown .dropdown-menu {
  width: 12rem;
}

.user-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-dropdown .dropdown-item i {
  width: 1rem;
  text-align: center;
}

/* 在移动端隐藏PC端的用户下拉菜单 */
@media (max-width: 767px) {
  .user-dropdown {
    display: none;
  }
}

/* 移动端用户认证样式 */
.mobile-auth {
  margin-bottom: 1rem;
}

.mobile-auth-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mobile-auth-btn {
  flex: 1;
  background-color: #475569;
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.mobile-auth-btn:hover {
  background-color: #64748b;
}

.mobile-auth-btn:first-child {
  background-color: #f43f5e;
}

.mobile-auth-btn:first-child:hover {
  background-color: #e11d48;
}

.mobile-auth-btn:last-child {
  background-color: #3b82f6;
}

.mobile-auth-btn:last-child:hover {
  background-color: #2563eb;
}

.mobile-user-info {
  background-color: #475569;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.mobile-user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f43f5e;
  margin-right: 0.75rem;
}

.mobile-user-name {
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
}

.mobile-logout-btn {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mobile-logout-btn:hover {
  background-color: #dc2626;
}

/* 移动端优化样式 */
@media (max-width: 768px) {
  .mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .mobile-text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }

  .mobile-text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }
}

/* Modal样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: #1e293b;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #475569;
}

.modal-header h2 {
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.modal-close:hover {
  color: white;
  background-color: #475569;
}

.modal-body {
  padding: 1.5rem;
}

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

.form-group label {
  display: block;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  background-color: #475569;
  color: white;
  border: 1px solid #64748b;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background-color: #e11d48;
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background-color: #64748b;
}

.form-footer {
  margin-top: 1rem;
  text-align: center;
}

.form-footer p {
  color: #94a3b8;
  font-size: 0.875rem;
  margin: 0;
}

.form-footer a {
  color: #f43f5e;
  text-decoration: none;
  font-weight: 500;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* 工具类 */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

  {
  % block extra_css %
}

  {
  % endblock %
}

/* Detail 页面样式 */
.movie-header {
  background: linear-gradient(to right, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.7) 100%);
  background-size: cover;
  background-position: center 25%;
  position: relative;
}

.poster-container {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease;
}

.poster-container:hover {
  transform: translateY(-5px);
}

.poster-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  pointer-events: none;
}

.type-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(244, 63, 94, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  z-index: 10;
  transition: all 0.3s ease;
}

.hd-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  z-index: 10;
  transition: all 0.3s ease;
}

.year-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
  z-index: 10;
}

.region-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(30, 41, 59, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
  z-index: 10;
}

.cast-scroll {
  scrollbar-width: thin;
  scrollbar-color: #f43f5e #1e293b;
}

.cast-scroll::-webkit-scrollbar {
  height: 6px;
}

.cast-scroll::-webkit-scrollbar-track {
  background: #1e293b;
  border-radius: 10px;
}

.cast-scroll::-webkit-scrollbar-thumb {
  background: #f43f5e;
  border-radius: 10px;
}

.play-btn {
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(244, 63, 94, 0.3);
}

.play-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(244, 63, 94, 0.4);
}

.mobile-text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.mobile-text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.mobile-text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.mobile-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  min-height: 3rem;
}

.mobile-btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  min-height: 2.6rem;
}

@media (max-width: 768px) {
  .mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .mobile-mb-4 {
    margin-bottom: 1rem;
  }

  .mobile-mb-6 {
    margin-bottom: 1.5rem;
  }

  .mobile-py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .mobile-gap-3 {
    gap: 0.75rem;
  }
}