/* ==========================================
   Multi-Site Video CMS - Frontend Stylesheet
   Mobile-first, responsive, video-focused
   ========================================== */

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

:root {
    --primary: #1a73e8;
    --primary-dark: #174ea6;
    --bg: #f8f9fa;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #5f6368;
    --text-light: #9aa0a6;
    --border: #e8eaed;
    --radius: 10px;
    --shadow: 0 1px 4px rgba(0,0,0,0.06);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    padding-bottom: 64px;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.site-logo { text-decoration: none; display: flex; align-items: center; }
.site-logo img { height: 32px; }
.logo-text { font-size: 18px; font-weight: 700; color: var(--primary); }
.menu-btn { display: flex; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-btn span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.2s; }
.nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 8px 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.nav-menu.open { display: block; }
.nav-menu a { display: block; padding: 10px 0; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--border); }
.nav-menu a:last-child { border: none; }
.nav-menu a:hover { color: var(--primary); }

.site-main { padding: 16px 0; }

/* Category Pills */
.category-pills { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.category-pills::-webkit-scrollbar { display: none; }
.pill {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    background: var(--bg-card);
    transition: all 0.15s;
}
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill.active { background: var(--text); color: #fff; border-color: var(--text); }

/* Featured Section */
.featured-section { margin-bottom: 20px; }
.featured-card { display: block; text-decoration: none; color: var(--text); border-radius: var(--radius); overflow: hidden; background: var(--bg-card); box-shadow: var(--shadow); }
.featured-thumb { position: relative; padding-bottom: 56.25%; background: #111; }
.featured-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.15); opacity: 0; transition: 0.2s; }
.featured-card:hover .play-overlay { opacity: 1; }
.play-btn { width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,0.6); position: relative; }
.play-btn::after { content: ''; position: absolute; left: 22px; top: 16px; border-left: 18px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.duration { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.8); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.featured-badge { position: absolute; top: 8px; left: 8px; background: var(--primary); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 4px; font-weight: 600; }
.featured-info { padding: 14px 16px; }
.featured-info h2 { font-size: 17px; font-weight: 600; margin-bottom: 6px; line-height: 1.35; }

/* Video List */
.video-list { display: flex; flex-direction: column; gap: 12px; }
.video-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.15s;
    padding: 10px;
}
.video-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.video-thumb { position: relative; width: 140px; min-width: 140px; border-radius: 8px; overflow: hidden; background: #e0e0e0; }
.video-thumb::before { content: ''; display: block; padding-bottom: 56.25%; }
.video-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.video-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.video-info h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--text-light); align-items: center; }
.cat-badge { background: #e8f0fe; color: var(--primary); padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.cat-name { color: var(--primary); font-weight: 500; }

/* Video Player Page */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-light); margin-bottom: 12px; flex-wrap: wrap; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb .current { color: var(--text); }

.video-player-wrapper { margin: 0 -16px 16px; }
.video-responsive { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; background: #000; }
.video-responsive iframe, .video-responsive video, .video-responsive embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

.video-detail { margin-bottom: 16px; }
.video-title { font-size: 19px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.video-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--text-light); margin-bottom: 12px; }

.share-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.share-btn { padding: 7px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; text-decoration: none; color: #fff; }
.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-wa { background: #25d366; }
.share-tg { background: #0088cc; }
.share-btn:hover { opacity: 0.9; }

.video-description { background: var(--bg-card); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; font-size: 14px; color: var(--text-secondary); line-height: 1.7; box-shadow: var(--shadow); }

.video-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tag { padding: 4px 12px; border-radius: 20px; font-size: 12px; background: var(--bg-card); border: 1px solid var(--border); color: var(--primary); text-decoration: none; }
.tag:hover { background: #e8f0fe; }

.faq-section { margin: 20px 0; }
.faq-section h2 { font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.faq-item { background: var(--bg-card); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px; box-shadow: var(--shadow); }
.faq-q { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.faq-a { font-size: 13px; color: var(--text-secondary); }

.related-section { margin-top: 24px; }
.related-section h2 { font-size: 17px; font-weight: 600; margin-bottom: 12px; }

/* Search */
.search-form { display: flex; gap: 8px; margin-bottom: 20px; }
.search-form input { flex: 1; padding: 10px 16px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 15px; }
.search-form input:focus { outline: none; border-color: var(--primary); }
.search-form button { padding: 10px 20px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius); font-weight: 600; cursor: pointer; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 4px; padding: 20px 0; }
.pagination a { padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; text-decoration: none; border: 1px solid var(--border); color: var(--text); background: var(--bg-card); }
.pagination a:hover, .pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.empty-msg { text-align: center; padding: 48px 16px; color: var(--text-light); }
.empty-msg h2 { font-size: 18px; color: var(--text); margin-bottom: 8px; }

/* Footer */
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 24px 0; margin-bottom: 64px; }
.footer-inner { display: flex; flex-direction: column; gap: 12px; font-size: 13px; color: var(--text-secondary); }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-links a, .footer-social a { color: var(--primary); text-decoration: none; }
.footer-social { display: flex; gap: 12px; }

/* Bottom Navigation */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-card); border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 6px 0; z-index: 100; box-shadow: 0 -2px 8px rgba(0,0,0,0.06); }
.bottom-nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--text-light); font-size: 10px; padding: 4px 12px; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item svg { width: 20px; height: 20px; }

/* Desktop */
@media (min-width: 768px) {
    .container { padding: 0 24px; }
    body { padding-bottom: 0; }
    .bottom-nav { display: none; }
    .menu-btn { display: none; }
    .nav-menu { display: flex !important; position: static; background: none; border: none; padding: 0; box-shadow: none; gap: 4px; }
    .nav-menu a { display: inline-block; padding: 6px 12px; border: none; font-size: 13px; border-radius: 6px; }
    .nav-menu a:hover { background: #f0f0f0; }
    
    .video-player-wrapper { margin: 0 0 16px; border-radius: var(--radius); overflow: hidden; }
    .video-title { font-size: 22px; }
    
    .video-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .video-item { flex-direction: column; padding: 0; }
    .video-thumb { width: 100%; min-width: unset; border-radius: 0; }
    .video-info { padding: 12px 14px; }
    .video-info h3 { font-size: 15px; }
    
    .featured-info h2 { font-size: 20px; }
    .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 1024px) {
    .video-list { grid-template-columns: 1fr 1fr 1fr; }
}
