* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #101013; color: #f7f2eb; font-family: Arial, Helvetica, sans-serif; }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.site-shell { min-height: 100vh; background: linear-gradient(180deg, #121217 0%, #101013 42%, #0d0e12 100%); }
.wrap { width: min(1320px, calc(100% - 32px)); margin: 0 auto; }
.wrap-narrow { width: min(1320px, calc(100% - 56px)); margin: 0 auto; }
.surface-card { background: linear-gradient(180deg, rgba(28, 29, 35, 0.96), rgba(22, 23, 29, 0.96)); border: 1px solid rgba(255,255,255,0.06); box-shadow: 0 18px 48px rgba(0,0,0,0.24); }
.site-header { position: relative; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: calc(18px + env(safe-area-inset-top)) 0 14px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo { width: 44px; height: 44px; border-radius: 8px; background: #0d0e12; object-fit: cover; }
.brand-logo.large { width: 64px; height: 64px; }
.brand-name { font-size: 22px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-link { width: 42px; height: 42px; border-radius: 8px; background: #1a1b20; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #f1e4d4; }
.site-main { padding-bottom: 94px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); background: #101013; border-top: 1px solid rgba(255,255,255,0.08); }
.tabbar-inner { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tabbar-link { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 56px; border-radius: 8px; color: #877b81; }
.tabbar-link.is-active { color: #c29f76; }
.tabbar-icon { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.tabbar-icon-image { width: 22px; height: 22px; display: block; }
.tabbar-label { font-size: 12px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.page-block { padding: 28px 0 40px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; letter-spacing: 0; color: #c29f76; }
.section-head { margin-bottom: 20px; }
.section-head.compact { margin-bottom: 18px; }
.section-head h1, .section-head h2 { margin: 0; font-size: 30px; }
.section-desc, .muted-text { color: #877b81; line-height: 1.7; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; padding: 0 18px; border: 0; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, #f2d1a8 0%, #c29f76 100%); color: #101013; font-weight: 700; }
.btn-secondary { background: #22242d; color: #f1e4d4; }
.chip { display: inline-flex; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.04); }
.hero-carousel { position: relative; min-height: 380px; }
.hero-slide { display: none; min-height: 380px; border-radius: 8px; overflow: hidden; padding: 28px; gap: 20px; align-items: center; justify-content: space-between; }
.hero-slide.is-active { display: flex; }
.hero-copy { flex: 1; min-width: 0; }
.hero-title { margin: 0 0 18px; font-size: clamp(30px, 5vw, 46px); line-height: 1.15; }
.hero-meta { margin-bottom: 22px; }
.hero-cover { width: min(280px, 32vw); aspect-ratio: 16 / 9; border-radius: 8px; object-fit: cover; background: #0d0e12; }
.section-block { margin-top: 28px; }
.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.recommend-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.media-card { border-radius: 8px; overflow: hidden; }
.media-cover, .series-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0d0e12; }
.series-cover-wrap { width: 100%; aspect-ratio: 16 / 9; padding: 10px; background: #0d0e12; }
.series-cover { object-fit: contain; }
.media-info { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.media-tag, .media-duration { color: #877b81; font-size: 13px; }
.media-title { line-height: 1.5; font-size: 16px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.pill { padding: 10px 16px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.05); }
.pill.is-active { background: #c29f76; color: #101013; }
.search-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 8px; }
.search-icon { color: #877b81; font-size: 22px; }
.search-input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; outline: none; }
.player-page { padding: 24px 0 40px; }
.player-video { width: 100%; max-height: 56vw; min-height: 340px; background: #000; border-radius: 8px; }
.player-content { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }
.player-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 22px; border-radius: 8px; }
.player-heading h1 { margin: 0 0 8px; font-size: 30px; }
.history-list { display: flex; flex-direction: column; gap: 16px; }
.history-item { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 8px; }
.history-cover { width: 220px; aspect-ratio: 16 / 9; object-fit: contain; background: #0d0e12; border-radius: 8px; padding: 8px; }
.history-copy { flex: 1; min-width: 0; }
.history-meta { display: flex; gap: 12px; color: #877b81; font-size: 13px; margin-top: 10px; flex-wrap: wrap; }
.history-play { width: 42px; height: 42px; border-radius: 999px; background: rgba(194,159,118,0.16); display: inline-flex; align-items: center; justify-content: center; color: #c29f76; }
.help-card, .profile-panel, .empty-panel { padding: 24px; border-radius: 8px; }
.help-text { color: #f1e4d4; line-height: 1.8; white-space: pre-wrap; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.profile-head h1 { margin: 0 0 6px; }
.language-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.lang-pill { padding: 10px 14px; border-radius: 8px; background: #1a1b20; }
.lang-pill.is-active { background: #c29f76; color: #101013; font-weight: 700; }
.profile-links { display: grid; gap: 12px; }
.menu-link { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-radius: 8px; background: rgba(255,255,255,0.04); }
.page-feed .site-header { display: none; }
.page-feed .site-main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.page-feed .site-shell { background: #000; }
.feed-track { height: calc(100vh - 76px - env(safe-area-inset-bottom)); overflow-y: auto; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
.feed-frame { position: relative; height: calc(100vh - 76px - env(safe-area-inset-bottom)); scroll-snap-align: start; background: #000; }
.feed-video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.feed-overlay { position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0)); pointer-events: none; }
.feed-copy { position: absolute; left: 28px; right: 160px; bottom: 120px; z-index: 2; color: #fff; }
.feed-title { margin: 0; font-size: clamp(28px, 5vw, 42px); font-weight: 700; line-height: 1.35; }
.feed-actions { position: absolute; right: 24px; bottom: 120px; z-index: 3; display: flex; flex-direction: column; gap: 20px; }
.action-pill { min-width: 92px; padding: 18px 16px; border: 0; border-radius: 8px; background: rgba(255,255,255,0.14); color: #fff; text-align: center; font: inherit; }
.feed-spinner { position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.18); border-top-color: #fff; animation: spin .9s linear infinite; opacity: 0; pointer-events: none; }
.feed-frame.is-loading .feed-spinner { opacity: 1; }
.feed-frame.is-paused::after { content: '▌▌'; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0,0,0,0.34); color: #fff; font-size: 28px; z-index: 2; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@media (max-width: 1080px) {
	.media-grid, .recommend-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
	.header-inner { gap: 12px; }
	.media-grid, .recommend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hero-slide.is-active { flex-direction: column; align-items: flex-start; }
	.hero-cover { width: 100%; }
	.player-heading { flex-direction: column; }
	.history-item { align-items: flex-start; }
	.history-cover { width: 160px; }
}

@media (max-width: 560px) {
	.wrap { width: min(100% - 24px, 1320px); }
	.wrap-narrow { width: min(100% - 24px, 1320px); }
	.media-grid, .recommend-grid { grid-template-columns: 1fr; }
	.feed-copy { left: 28px; right: 112px; bottom: 96px; }
	.feed-actions { right: 16px; bottom: 96px; }
	.player-video { min-height: 220px; }
	.brand-name { font-size: 18px; }
	.tabbar-link { min-height: 52px; }
	.tabbar-icon-image { width: 20px; height: 20px; }
}
