/* ============================================ 文件: css/style.css 说明: 全局样式 - 支持 Grid 网格瀑布流 ============================================ */ :root { --primary: #e67e22; --primary-dark: #d35400; --primary-light: #f39c12; --bg-primary: #f0f2f5; --bg-secondary: #e8eaed; --card-bg: #ffffff; --text-primary: #1a1a2e; --text-secondary: #6b7280; --border-color: #e5e7eb; --shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04); --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.12); --radius: 12px; --radius-lg: 16px; --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: var(--font); background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; min-height: 100vh; } ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 8px; } ::-webkit-scrollbar-thumb:hover { background: #b0b4ba; } /* ===== 导航栏 ===== */ .navbar { background: var(--card-bg); border-bottom: 1px solid var(--border-color); padding: 0 24px; height: 64px; display: flex; align-items: center; position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px); background: rgba(255, 255, 255, 0.92); } .nav-container { max-width: 1280px; width: 100%; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; } .nav-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--text-primary); text-decoration: none; } .nav-brand .brand-icon { font-size: 26px; } .nav-brand .brand-name { background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .nav-actions { display: flex; align-items: center; gap: 12px; } .nav-user { font-size: 14px; color: var(--text-secondary); padding: 4px 12px; background: var(--bg-secondary); border-radius: 20px; } /* ===== 按钮 ===== */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; text-decoration: none; transition: var(--transition); font-family: inherit; } .btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; box-shadow: 0 4px 14px rgba(230, 126, 34, 0.25); } .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(230, 126, 34, 0.35); } .btn-primary:active { transform: translateY(0); } .btn-outline { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-color); } .btn-outline:hover { background: var(--bg-secondary); color: var(--text-primary); } .btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; } .btn-danger { background: #e74c3c; color: #fff; } .btn-danger:hover { background: #c0392b; } /* ===== 主内容 ===== */ .main-content { max-width: 1280px; margin: 0 auto; padding: 24px 20px 60px; } .page-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; } .page-header h2 { font-size: 26px; font-weight: 700; margin: 0; } .page-header .subtitle { color: var(--text-secondary); font-size: 15px; margin: 4px 0 0; } /* ===== 网格瀑布流(按行排列) ===== */ .waterfall { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; padding: 4px 0; } .movie-card { background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: var(--transition); border: 1px solid var(--border-color); display: flex; flex-direction: column; } .movie-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); } .card-image { width: 100%; aspect-ratio: 2/3; background: var(--bg-secondary); overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; } .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; } .movie-card:hover .card-image img { transform: scale(1.03); } .placeholder-poster { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, #2d2d44, #1a1a2e); color: rgba(255, 255, 255, 0.5); font-size: 42px; gap: 6px; } .placeholder-poster .placeholder-title { font-size: 14px; text-align: center; padding: 0 12px; color: rgba(255, 255, 255, 0.7); font-weight: 500; } .card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; } .card-title { font-size: 16px; font-weight: 600; margin: 0 0 4px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .card-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--text-secondary); } .card-meta span { display: inline-flex; align-items: center; gap: 3px; } /* ===== 空状态 ===== */ .empty-state { text-align: center; padding: 80px 20px; background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border-color); } .empty-state .empty-icon { font-size: 64px; display: block; margin-bottom: 16px; } .empty-state h3 { font-size: 24px; margin: 0 0 8px; } .empty-state p { color: var(--text-secondary); margin-bottom: 24px; } /* ===== 响应式调整 ===== */ @media (max-width: 900px) { .main-content { padding: 16px 14px 40px; } .navbar { padding: 0 16px; height: 58px; } .nav-brand .brand-name { font-size: 18px; } } @media (max-width: 600px) { .waterfall { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } .movie-card { border-radius: 10px; } .card-body { padding: 10px 12px 12px; } .card-title { font-size: 14px; } .card-meta { font-size: 11px; gap: 4px 10px; } .page-header h2 { font-size: 20px; } .nav-actions .btn-sm { font-size: 12px; padding: 4px 10px; } .nav-user { font-size: 12px; padding: 2px 10px; } .navbar { padding: 0 12px; height: 52px; } .nav-brand .brand-name { font-size: 16px; } } @media (max-width: 420px) { .waterfall { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; } .nav-actions .btn-sm { font-size: 11px; padding: 3px 8px; } .nav-user { font-size: 11px; padding: 2px 8px; } } /* ===== 下拉菜单 ===== */ .nav-dropdown { position: relative; display: inline-block; } .nav-dropdown .dropbtn { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-color); padding: 6px 14px; border-radius: 8px; font-size: 14px; cursor: pointer; transition: all 0.2s; font-weight: 500; display: flex; align-items: center; gap: 4px; } .nav-dropdown .dropbtn:hover { background: var(--bg-secondary); color: var(--text-primary); } .nav-dropdown .dropbtn .arrow { font-size: 10px; margin-left: 2px; transition: transform 0.2s; } .nav-dropdown:hover .dropbtn .arrow { transform: rotate(180deg); } .nav-dropdown .dropdown-content { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: var(--card-bg); min-width: 180px; border-radius: 12px; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15); border: 1px solid var(--border-color); padding: 6px 0; z-index: 200; overflow: hidden; animation: dropdownFade 0.2s ease; } .nav-dropdown:hover .dropdown-content, .nav-dropdown .dropdown-content.show { display: block; } @keyframes dropdownFade { from { opacity: 0; transform: translateY(-8px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } } .nav-dropdown .dropdown-content a { display: flex; align-items: center; gap: 10px; padding: 10px 18px; color: var(--text-primary); text-decoration: none; font-size: 14px; transition: background 0.15s; border-left: 3px solid transparent; } .nav-dropdown .dropdown-content a:hover { background: var(--bg-secondary); border-left-color: var(--primary); } .nav-dropdown .dropdown-content a .icon { font-size: 16px; width: 24px; text-align: center; } .nav-dropdown .dropdown-content .divider { height: 1px; background: var(--border-color); margin: 4px 12px; } /* 移动端适配 */ @media (max-width: 600px) { .nav-dropdown .dropdown-content { right: -8px; min-width: 160px; } .nav-dropdown .dropbtn { padding: 4px 10px; font-size: 13px; } } /* 下拉菜单 - 高亮当前页面 */ .nav-dropdown .dropdown-content a.active { background: var(--bg-secondary); border-left-color: var(--primary); font-weight: 600; } .avatar-circle { border-radius: 50%; object-fit: cover; vertical-align: middle; }