/* Minimal, fast CSS with refined spacing and grid */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #1e1e1e;
  background: #fafafa;
}

:root {
  --primary: #0b6cff;
  --primary-hover: #095ad6;
  --text: #1e1e1e;
  --muted: #666;
  --border: #e5e5e5;
  --card: #fff;
  --header-bg: #111;
  --header-text: #fff;
  --radius: 10px;
}

.container { max-width: 1000px; margin: 0 auto; padding: 18px; }

.site-header { background: var(--header-bg); color: var(--header-text); position: sticky; top: 0; z-index: 10; }
.site-header .header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.brand img { display: block; height: 28px; }
.nav a { color: var(--header-text); text-decoration: none; margin-left: 14px; }
.nav a:hover { text-decoration: underline; }

/* Flash messages */
.flash { list-style: none; padding: 0; margin: 14px 0; }
.flash li { padding: 10px 12px; border-radius: var(--radius); margin-bottom: 8px; font-size: 14px; }
.flash-success { background: #e6ffed; border: 1px solid #b7f5c8; }
.flash-warning { background: #fff9e6; border: 1px solid #f5e2b7; }
.flash-error   { background: #ffe6e6; border: 1px solid #f5b7b7; }

/* Forms */
.form { display: grid; gap: 12px; max-width: 640px; }
.form-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form input[type="text"],
.form input[type="password"],
.form input[type="file"],
.form input[type="url"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}
.btn { padding: 10px 14px; border: none; border-radius: 6px; background: var(--primary); color: #fff; cursor: pointer; }
.btn:hover { background: var(--primary-hover); }
.btn-link { color: var(--primary); text-decoration: none; }
.btn-link:hover { text-decoration: underline; }
.hint { color: var(--muted); font-size: 13px; }
.badge { font-size: 12px; background: #eee; border-radius: 999px; padding: 2px 8px; margin-left: 8px; }

/* Cards & grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s ease;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.thumb { display: block; width: 100%; height: 150px; object-fit: cover; background: #f0f0f0; }
.thumb-empty { display: flex; align-items: center; justify-content: center; width: 100%; height: 150px; color: #888; }
.card-body { padding: 12px; }
.title { margin: 0 0 10px; font-size: 16px; }

.video-player { width: 100%; max-width: 960px; height: auto; border-radius: var(--radius); }
.auth-card { max-width: 520px; }
