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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

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

/* Header Styles */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: bold;
}

.logo h1 {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.stats {
  font-size: 13px;
  color: #666;
  background: #f5f5f5;
  padding: 5px 12px;
  border-radius: 15px;
}

.admin-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.admin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Hero Section */
.hero-section {
  padding: 20px 0 30px;
  text-align: center;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  color: white;
  margin-bottom: 10px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
}

/* Search Section */
.search-section {
  max-width: 700px;
  margin: 0 auto;
}

.hot-tags-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.hot-tag-inline {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.hot-tag-inline:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.search-box {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 50px;
  padding: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: relative;
}

.search-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  padding: 2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.search-input {
  flex: 1;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  outline: none;
  background: transparent;
  color: #333;
}

.search-input::placeholder {
  color: #999;
}

.search-btn {
  background: transparent;
  color: #764ba2;
  border: none;
  padding: 10px 24px;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.search-btn:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

/* Announcement Bar */
.announcement-bar {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  padding: 12px 20px;
  text-align: center;
  color: white;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  animation: announcement-pulse 2s ease-in-out infinite;
}

.announcement-bar::before {
  content: '📢';
  margin-right: 10px;
  font-size: 18px;
}

@keyframes announcement-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.01);
  }
}

.announcement-bar a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}

.announcement-bar a:hover {
  color: #fff9c4;
}
}

/* Results Section */
.results-wrapper {
  margin-top: 50px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.results-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: white;
}

.results-count {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
}

/* Movie Grid */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.movie-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

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

.movie-title {
  font-size: 22px;
  font-weight: 800;
  color: #333;
  margin-bottom: 0;
  line-height: 1.4;
}

/* Hot Search */
.hot-search {
  margin-top: 20px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.hot-search h3 {
  font-size: 15px;
  font-weight: 600;
  color: white;
  margin-bottom: 10px;
}

.hot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hot-tag {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.hot-tag:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* Messages */
.message-box {
  max-width: 600px;
  margin: 30px auto;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  font-weight: 500;
}

.message-error {
  background: rgba(255, 67, 54, 0.95);
  color: white;
}

.message-success {
  background: rgba(76, 175, 80, 0.95);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
  }
  
  .header-content {
    flex-direction: row;
    gap: 10px;
    padding: 8px 0;
  }
  
  .logo h1 {
    font-size: 16px;
  }
  
  .logo-icon {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  
  .stats {
    padding: 3px 8px;
    font-size: 11px;
    line-height: 1.2;
  }
  
  .search-box {
    padding: 3px;
  }
  
  .search-input {
    padding: 10px 16px;
    font-size: 15px;
  }
  
  .search-btn {
    padding: 8px 18px;
    font-size: 15px;
  }
  
  .hot-tags-inline {
    gap: 6px;
    margin-top: 10px;
  }
  
  .hot-tag-inline {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 12px;
  }
}

/* Watch Button Styles */
.movie-action {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.watch-btn {
  display: block;
  text-align: center;
  padding: 10px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.watch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Featured & Recent Sections */
.home-sections {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
}

.featured-section, .recent-section {
  flex: 1;
  min-width: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.view-more-btn {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 14px;
}

.view-more-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(4px);
}

.featured-grid, .recent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.featured-card, .recent-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.featured-card:hover, .recent-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.featured-content, .recent-content {
  padding: 18px 16px 12px;
  text-align: center;
}

.featured-title, .recent-title {
  font-size: 18px;
  font-weight: 800;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.4;
}

.recent-date {
  font-size: 12px;
  color: #888;
}

.featured-action, .recent-action {
  padding: 10px 16px 16px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

.featured-btn, .recent-btn {
  display: block;
  text-align: center;
  padding: 10px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.featured-btn:hover, .recent-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.no-data {
  padding: 30px;
  text-align: center;
  color: #888;
  background: white;
  border-radius: 12px;
}

@media (max-width: 992px) {
  .home-sections {
    flex-direction: column;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .movie-action {
    padding: 10px 12px;
  }
  
  .watch-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .featured-grid, .recent-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  
  .section-title {
    font-size: 20px;
  }
  
  .featured-title, .recent-title {
    font-size: 16px;
  }
  
  .featured-content, .recent-content {
    padding: 12px 12px 8px;
  }
  
  .featured-action, .recent-action {
    padding: 8px 12px 12px;
  }
  
  .featured-btn, .recent-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* Popup Modal */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.popup-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.popup-title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.popup-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover {
  background: #f5f5f5;
  color: #333;
}

.popup-content {
  padding: 24px;
  color: #555;
  line-height: 1.8;
}

.popup-content p {
  margin-bottom: 12px;
}

.popup-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.popup-no-today {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  user-select: none;
}

.popup-no-today input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #667eea;
}

.popup-no-today:hover {
  color: #333;
}

.popup-close-btn {
  padding: 12px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.popup-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

@media (max-width: 768px) {
  .popup-modal {
    max-width: 100%;
    margin: 0;
  }
  
  .popup-header {
    padding: 16px 20px;
  }
  
  .popup-title {
    font-size: 18px;
  }
  
  .popup-content {
    padding: 20px;
  }
  
  .popup-footer {
    padding: 12px 20px 20px;
    flex-direction: column;
    align-items: stretch;
  }
  
  .popup-no-today {
    justify-content: center;
  }
  
  .popup-close-btn {
    padding: 10px 28px;
    font-size: 14px;
    width: 100%;
  }
}

/* Ad Carousel */
.ad-carousel-container {
  margin-top: 24px;
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.ad-carousel-wrapper {
  overflow: hidden;
}

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

.ad-carousel-slide {
  min-width: 100%;
  padding: 20px;
  text-align: center;
}

.ad-carousel-image {
  max-width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
}

.ad-carousel-content {
  display: block;
  padding: 20px;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.6;
}

.ad-carousel-content:hover {
  color: #667eea;
}

.ad-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s;
  z-index: 10;
}

.ad-carousel-btn:hover {
  background: white;
  color: #667eea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ad-carousel-prev {
  left: 10px;
}

.ad-carousel-next {
  right: 10px;
}

.ad-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.ad-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}

.ad-carousel-dot.active {
  background: #667eea;
  transform: scale(1.2);
}

.ad-carousel-dot:hover {
  background: #667eea;
}

@media (max-width: 768px) {
  .ad-carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .ad-carousel-prev {
    left: 5px;
  }
  
  .ad-carousel-next {
    right: 5px;
  }
  
  .ad-carousel-slide {
    padding: 15px;
  }
  
  .ad-carousel-image {
    max-height: 150px;
  }
}

@media (max-width: 768px) {
  .ad-banner {
    margin-top: 20px;
    padding: 16px;
  }
}

/* Cloud Disk Buttons */
.movie-actions, .featured-actions, .recent-actions {
  padding: 10px 16px 16px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.baidu-btn {
  background: linear-gradient(135deg, #2979ff 0%, #2962ff 100%) !important;
  box-shadow: 0 4px 12px rgba(41, 121, 255, 0.3) !important;
}

.baidu-btn:hover {
  background: linear-gradient(135deg, #2962ff 0%, #2979ff 100%) !important;
  box-shadow: 0 6px 16px rgba(41, 121, 255, 0.5) !important;
}

.quark-btn {
  background: linear-gradient(135deg, #00c853 0%, #00e676 100%) !important;
  box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3) !important;
}

.quark-btn:hover {
  background: linear-gradient(135deg, #00e676 0%, #00c853 100%) !important;
  box-shadow: 0 6px 16px rgba(0, 200, 83, 0.5) !important;
}

.xunlei-btn {
  background: linear-gradient(135deg, #ff5722 0%, #ff7043 100%) !important;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3) !important;
}

.xunlei-btn:hover {
  background: linear-gradient(135deg, #ff7043 0%, #ff5722 100%) !important;
  box-shadow: 0 6px 16px rgba(255, 87, 34, 0.5) !important;
}

.feedback-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #999;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-left: 10px;
}

.feedback-link:hover {
  color: #e74c3c;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .movie-actions, .featured-actions, .recent-actions {
    padding: 8px 12px 12px;
  }
  
  .movie-actions .watch-btn,
  .featured-actions .featured-btn,
  .recent-actions .recent-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
}

