/* ========== 首页样式 ========== */
* { margin:0; padding:0; box-sizing:border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background:#fff; padding:0; max-width:1200px; margin:0 auto; }

/* 搜索框 */
.search-box { display:flex; align-items:center; background:#fff; border-radius:30px; padding:8px 16px; margin:10px 12px 16px; border:1px solid #eee; max-width:600px; }
@media (min-width:768px) { .search-box { margin:16px auto 20px; } }
.search-box span { font-size:16px; margin-right:8px; color:#999; }
.search-box input { border:none; outline:none; font-size:14px; width:100%; background:transparent; color:#333; }
.search-box input::placeholder { color:#aaa; }

/* 分类卡片容器 */
.filter-card { background:transparent; padding:0 12px 8px; margin-bottom:4px; }
.filter-row { margin-bottom:10px; line-height:1.4; font-size:13px; }
.filter-row:last-child { margin-bottom:0; }
.filter-items { display:flex; flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; white-space:nowrap; padding-bottom:4px; }
.filter-items::-webkit-scrollbar { display:none; }
.filter-item { flex-shrink:0; color:#333; cursor:pointer; margin-right:20px; padding:4px 0; font-size:13px; }
.filter-item:last-child { margin-right:0; }
.filter-item.active { color:#e50914; font-weight:500; }

/* 影视卡片网格 */
.movie-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin:8px 12px 0; }
@media (max-width:599px) { .movie-grid { grid-template-columns:repeat(2,1fr); gap:4px; } }
@media (max-width:379px) { .movie-grid { grid-template-columns:1fr; } }
@media (min-width:1024px) { .movie-grid { grid-template-columns:repeat(4,1fr); gap:8px; margin:15px auto; max-width:1000px; } }

.movie-card { display:flex; flex-direction:column; background:#fff; border-radius:6px; border:1px solid #f0f0f0; text-decoration:none; color:inherit; transition:0.1s; overflow:hidden; box-shadow:0 1px 3px rgba(0,0,0,0.02); }
.movie-card:hover { border-color:#ddd; background:#fafafa; }

.poster-container { position:relative; width:100%; aspect-ratio:2/3; background:#eee; }
.card-poster { width:100%; height:100%; object-fit:cover; display:block; }
.poster-overlay { position:absolute; padding:2px 5px; font-size:9px; font-weight:600; border-radius:3px; background:rgba(0,0,0,0.7); color:white; z-index:1; pointer-events:none; }
@media (min-width:768px) { .poster-overlay { font-size:10px; padding:2px 6px; } }
.card-type-overlay { top:4px; left:4px; background:rgba(240,240,240,0.9); color:#333; border-radius:12px; }
.card-year-overlay { bottom:4px; left:4px; background:rgba(0,0,0,0.7); }
.card-rating-overlay { bottom:4px; right:4px; background:rgba(229,9,20,0.9); }

.card-content { padding:5px 4px; display:flex; flex-direction:column; gap:2px; }
.card-title { font-size:11px; font-weight:600; color:#111; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (min-width:768px) { .card-title { font-size:12px; } .card-content { padding:6px 5px; } }

/* ========== 详情页样式 ========== */
.detail-container { max-width:100%; margin:0; background:#fff; padding:0 0 20px 0; }
.detail-poster-wrapper { position:relative; width:100%; aspect-ratio:2/3; background:#eee; }
.detail-poster { width:100%; height:100%; object-fit:cover; display:block; }
.back-link { position:absolute; top:12px; left:12px; z-index:10; color:white; text-decoration:none; font-size:14px; font-weight:500; background:rgba(0,0,0,0.5); padding:5px 12px; border-radius:30px; backdrop-filter:blur(2px); display:flex; align-items:center; gap:4px; }
.back-link:hover { background:rgba(0,0,0,0.7); }
.poster-gradient { position:absolute; bottom:0; left:0; width:100%; height:50%; background:linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%); pointer-events:none; }
.poster-info { position:absolute; bottom:16px; left:12px; right:12px; z-index:5; color:white; text-shadow:0 1px 4px rgba(0,0,0,0.8); }
.poster-title { font-size:22px; font-weight:700; margin-bottom:4px; line-height:1.2; }
.poster-meta { display:flex; align-items:center; flex-wrap:wrap; gap:4px 10px; font-size:13px; margin-bottom:4px; }
.poster-meta-item { display:flex; align-items:center; }
.poster-meta-item:not(:last-child)::after { content:"|"; margin-left:10px; color:rgba(255,255,255,0.5); }
.poster-rating { color:#ffcc00; font-weight:600; }
.poster-genres { display:flex; flex-wrap:wrap; gap:4px 10px; font-size:12px; }
.poster-genre { color:rgba(255,255,255,0.9); }

.detail-content { padding:16px 12px; }
.mobile-only { display:block; }
.desktop-only { display:none; }

@media (min-width:768px) {
  .detail-container { display:flex; flex-direction:row; align-items:flex-start; gap:30px; max-width:1200px; margin:20px auto; padding:0 20px; }
  .detail-poster-wrapper { flex:0 0 300px; aspect-ratio:2/3; border-radius:12px; overflow:hidden; }
  .detail-content { flex:1; padding:0; }
  .mobile-only { display:none !important; }
  .desktop-only { display:block; margin-bottom:20px; }
  .detail-title-pc { font-size:28px; font-weight:700; margin-bottom:10px; color:#111; }
  .detail-meta-pc { display:flex; flex-wrap:wrap; gap:8px 16px; font-size:16px; color:#666; margin-bottom:10px; }
  .detail-rating-pc { color:#e50914; font-weight:600; }
  .detail-genres-pc { display:flex; flex-wrap:wrap; gap:8px 16px; font-size:15px; color:#333; margin-bottom:20px; }
}

/* 网盘按钮 */
.netdisk { background:#f9f9f9; border-radius:14px; padding:14px; margin-bottom:20px; border:1px solid #eee; }
.netdisk h3 { font-size:15px; margin-bottom:8px; }
.netdisk-buttons { display:flex; gap:12px; flex-wrap:wrap; margin-top:8px; }
.netdisk-btn { display:inline-block; padding:8px 16px; border-radius:30px; font-size:14px; font-weight:500; text-decoration:none; cursor:pointer; border:none; transition:background 0.2s; }
.open-btn { background:#e50914; color:white; }
.open-btn:hover { background:#b2070f; }
.copy-btn { background:#f0f0f0; color:#333; }
.copy-btn:hover { background:#ddd; }
@media (max-width:600px) { .netdisk-buttons { flex-direction:column; gap:8px; } .netdisk-btn { text-align:center; } }

/* 演员列表 */
.cast-section { margin-bottom:20px; }
.cast-title { font-size:16px; font-weight:600; margin-bottom:10px; }
.cast-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
@media (min-width:768px) { .cast-grid { grid-template-columns:repeat(4,1fr); gap:16px; } }
@media (max-width:400px) { .cast-grid { grid-template-columns:repeat(2,1fr); } }
.cast-item { text-align:center; }
.cast-avatar { width:100%; aspect-ratio:1/1; border-radius:50%; object-fit:cover; background:#eee; margin-bottom:5px; }
.cast-name { font-size:12px; font-weight:600; color:#111; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cast-role { font-size:11px; color:#888; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (min-width:768px) { .cast-name { font-size:13px; } .cast-role { font-size:12px; } }