* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background:#f5f5f7; color:#222; }
a { color:#005bbb; text-decoration:none; }
a:hover { text-decoration:underline; }

.container { max-width: 1100px; margin:0 auto; padding:1rem; }

/* Header */
.site-header { background:#fff; border-bottom:1px solid #ddd; position:sticky; top:0; z-index:10; }
.header-inner { display:flex; flex-wrap:wrap; align-items:center; gap:1rem; }
.logo { font-weight:700; font-size:1.2rem; }
.search-bar { display:flex; flex-wrap:wrap; gap:0.5rem; margin-left:auto; }
.search-bar input[type="text"], .search-bar select { padding:0.4rem 0.6rem; border:1px solid #ccc; border-radius:999px; font-size:0.9rem; }
.search-bar button { padding:0.4rem 0.9rem; border:none; background:#005bbb; color:#fff; border-radius:999px; cursor:pointer; font-size:0.9rem; }

/* Footer */
.site-footer { margin-top:3rem; padding:1rem 0; border-top:1px solid #ddd; font-size:0.9rem; color:#666; }

/* Video grid */
.video-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1rem; margin-top:1rem; }
.video-card { background:#fff; border-radius:16px; padding:0.75rem; box-shadow:0 10px 25px rgba(15,23,42,0.08); transition:transform 0.15s ease, box-shadow 0.15s ease; }
.video-card .thumb { background:linear-gradient(135deg,#0f766e,#2563eb); height:140px; border-radius:12px; position:relative; overflow:hidden; }
.thumb-label { position:absolute; bottom:8px; left:8px; background:rgba(15,23,42,0.8); color:#fff; padding:2px 6px; font-size:0.75rem; border-radius:999px; }
.video-card h3 { font-size:1rem; margin:0.75rem 0 0.25rem; }
.video-card p { font-size:0.85rem; color:#555; margin:0; }
.video-card:hover { transform:translateY(-3px); box-shadow:0 16px 35px rgba(15,23,42,0.16); }

/* Video detail */
.video-detail h1 { margin-top:1rem; }
.video-player-wrapper { margin-top:1rem; background:#000; border-radius:16px; overflow:hidden; }
.video-player-wrapper video { width:100%; height:auto; display:block; border-radius:16px; }
.btn { display:inline-block; padding:0.5rem 1rem; background:#005bbb; color:#fff; border-radius:999px; margin-top:0.75rem; }

/* Tabs */
.tabs { margin-top:1.5rem; }
.tab-buttons { display:flex; flex-wrap:wrap; gap:0.5rem; border-bottom:1px solid #e5e7eb; padding-bottom:0.5rem; }
.tab-button { padding:0.4rem 0.9rem; border-radius:999px; border:none; background:#e5e7eb; cursor:pointer; font-size:0.9rem; }
.tab-button.active { background:#111827; color:#fff; }
.tab-panels { margin-top:1rem; }
.tab-panel { display:none; }
.tab-panel.active { display:block; }

/* Admin */
.admin-header { background:#111827; color:#fff; }
.admin-header .container { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; }
.admin-header nav a { color:#e5e7eb; margin-right:0.75rem; font-size:0.9rem; }
.admin-main { padding-top:1rem; }
table { width:100%; border-collapse:collapse; margin-top:1rem; background:#fff; }
th, td { border:1px solid #ddd; padding:0.5rem; font-size:0.9rem; }
th { background:#f3f4f6; text-align:left; }
label { display:block; margin-top:0.5rem; font-size:0.9rem; }
input[type="text"], input[type="password"], textarea, select { width:100%; padding:0.4rem 0.5rem; border:1px solid #ccc; border-radius:6px; font-size:0.9rem; }
button { padding:0.45rem 0.9rem; border:none; background:#005bbb; color:#fff; border-radius:999px; cursor:pointer; margin-top:0.5rem; font-size:0.9rem; }
button:hover { background:#00408a; }

.login-page { display:flex; align-items:center; justify-content:center; min-height:100vh; background:#111827; }
.login-box { background:#fff; padding:2rem; border-radius:12px; width:100%; max-width:360px; box-shadow:0 16px 40px rgba(15,23,42,0.4); }
.alert-error { background:#fee2e2; color:#b91c1c; padding:0.5rem; border-radius:4px; margin-bottom:0.5rem; }

/* Upload */
.upload-area { background:#fff; padding:2rem; border:2px dashed #9ca3af; border-radius:8px; text-align:center; cursor:pointer; }
.upload-area.dragover { border-color:#005bbb; background:#eff6ff; }
#upload-status { margin-top:1rem; font-size:0.9rem; }

/* Search results */
.search-results { list-style:none; padding-left:0; }
.search-results li { background:#fff; margin-top:0.5rem; padding:0.5rem; border-radius:6px; }

/* Responsive */
@media (max-width: 640px) {
  .header-inner { flex-direction:column; align-items:flex-start; }
  .search-bar { width:100%; }
  .search-bar input[type="text"] { flex:1; }
}
