:root {
  --bg: #060a15;
  --bg-2: #0c1430;
  --card: rgba(10, 17, 36, 0.96);
  --card-2: rgba(15, 26, 54, 0.98);
  --line: rgba(98, 151, 255, 0.24);
  --blue: #4f89ff;
  --blue-2: #89bbff;
  --orange: #ff8b24;
  --orange-2: #ffbb63;
  --text: #eff4ff;
  --muted: #aeb9d7;
  --success: #29c36a;
  --danger: #ff5a66;
  --shadow: 0 20px 55px rgba(0,0,0,.42);
  --radius: 16px;
  --
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 125, 30, .08), transparent 20%),
    radial-gradient(circle at top left, rgba(79, 137, 255, .10), transparent 25%),
    linear-gradient(180deg, #081022 0%, #050811 100%);
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: min(1380px, calc(100% - 24px)); margin: 18px auto 32px; }
.topbar {
  display: grid;
  grid-template-columns: 260px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 24, 51, 0.98), rgba(8, 14, 31, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.logo-wrap { display: flex; flex-direction: column; line-height: 1; }
.logo {
  font-size: 60px; font-weight: 900; letter-spacing: 2px;
  background: linear-gradient(180deg, #ffffff 0%, #9bc9ff 55%, #4e85ff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.logo-sub { font-size: 18px; color: #eef3ff; margin-top: 2px; }
.menu { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; font-weight: 700; }
.menu a:hover, .sidebar-menu a:hover, .admin-nav a:hover { color: var(--blue-2); }
.btn, button {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 800; cursor: pointer;
  color: #fff; box-shadow: 0 10px 25px rgba(0,0,0,.22);
}
.btn-blue, button { background: linear-gradient(180deg, #527fff, #2946c7); border: 1px solid rgba(155, 201, 255, 0.25); }
.btn-orange { background: linear-gradient(180deg, #ffac43, #de6810); border: 1px solid rgba(255, 205, 139, 0.28); }
.btn-danger { background: linear-gradient(180deg, #ff6f78, #d13b48); }
.hero {
  min-height: 360px; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  background:
    linear-gradient(90deg, rgba(6, 11, 23, 0.95) 0%, rgba(8, 13, 27, 0.84) 44%, rgba(8, 13, 27, 0.42) 100%),
    url('https://images.unsplash.com/photo-1542751371-adc38448a05e?auto=format&fit=crop&w=1400&q=80') center/cover;
  display: flex; align-items: center; padding: 42px 36px; margin-bottom: 14px;
}
.hero-content { max-width: 720px; }
.hero-stat { font-size: clamp(34px, 5vw, 58px); font-weight: 900; margin-bottom: 12px; }
.hero h1 { font-size: clamp(30px, 4vw, 54px); margin: 0 0 12px; }
.hero p { margin: 0; color: var(--muted); font-size: 20px; line-height: 1.55; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.main-grid { display: grid; grid-template-columns: 240px minmax(0,1fr) 240px; gap: 14px; align-items: start; }
.panel, .card {
  background: linear-gradient(180deg, rgba(12, 20, 44, 0.98), rgba(7, 12, 28, 0.98));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.panel-title, .card-title {
  padding: 14px 16px; font-weight: 800; font-size: 18px;
  border-bottom: 1px solid rgba(120, 160, 255, 0.16);
  background: linear-gradient(180deg, rgba(17, 29, 66, 0.98), rgba(12, 20, 42, 0.98));
}
.sidebar-menu a, .admin-nav a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 16px; border-top: 1px solid rgba(255,255,255,0.05); font-weight: 700;
}
.mini-list, .quick-links { margin: 0; padding: 10px 14px 16px; list-style: none; }
.mini-list li, .quick-links li {
  display: flex; justify-content: space-between; gap: 10px; padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06); color: var(--muted); font-size: 14px; font-weight: 700;
}
.mini-list li span:first-child, .quick-links li { color: #fff; }
.category-bar {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; border-radius: 14px;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(12, 19, 42, 0.98), rgba(8, 14, 28, 0.98));
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.category-bar a { padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,0.04); font-size: 14px; color: #dae6ff; font-weight: 700; }
.category-bar a.active { background: rgba(79, 137, 255, 0.16); border: 1px solid rgba(79, 137, 255, 0.28); }
.posts { display: grid; gap: 14px; }
.post-card {
  display: grid; grid-template-columns: 1.5fr 1fr;
  background: linear-gradient(180deg, rgba(12, 20, 44, 0.98), rgba(7, 12, 28, 0.98));
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
}
.post-image { min-height: 230px; background-size: cover; background-position: center; position: relative; }
.post-image::after {
  content: 'TOP'; position: absolute; right: 18px; bottom: 12px; font-size: 46px; font-weight: 900;
  color: rgba(120, 190, 255, 0.92); text-shadow: 0 0 22px rgba(79,137,255,.35);
}
.post-body { padding: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.post-category { color: var(--blue-2); font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; }
.post-title { font-size: 30px; font-weight: 800; line-height: 1.15; margin: 0; }
.post-text, .meta, .small, .table td { color: var(--muted); line-height: 1.55; }
.stars { color: #ffbf59; letter-spacing: 4px; font-size: 22px; font-weight: 700; }
.post-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ad-box, .video-card, .inner { margin: 12px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(144,190,255,.18); background: rgba(255,255,255,0.03); }
.ad-box { padding: 18px 14px; text-align: center; background: linear-gradient(180deg, rgba(40, 90, 180, .18), rgba(255, 138, 25, .10)); }
.brand-ad { font-size: 20px; font-weight: 900; margin-bottom: 10px; }
.percent { font-size: 54px; font-weight: 900; color: #ffd066; line-height: .95; margin: 8px 0; }
.video-image { height: 160px; background: url('https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=800&q=80') center/cover; }
.video-body, .inner { padding: 16px; }
.video-title { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.pagination a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(145,190,255,.12); font-weight: 700; }
.pagination a.active { background: rgba(79, 137, 255, 0.18); }
.footer {
  margin-top: 18px; padding: 18px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 20, 44, 0.98), rgba(7, 12, 28, 0.98)); text-align: center; color: var(--muted); box-shadow: var(--shadow);
}
.flash { padding: 14px 16px; margin-bottom: 14px; border-radius: 12px; background: rgba(41,195,106,.12); color: #d8ffe7; border: 1px solid rgba(41,195,106,.25); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-box, .admin-box {
  width: min(520px, 100%); background: linear-gradient(180deg, rgba(12, 20, 44, 0.98), rgba(7, 12, 28, 0.98));
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 24px;
}
.admin-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 14px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.stat-card { padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.stat-card strong { display: block; font-size: 32px; margin-bottom: 6px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: left; }
.table th { color: #fff; background: rgba(255,255,255,.02); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 14px; }
label { display: block; margin-bottom: 6px; font-weight: 700; }
input[type=text], input[type=password], input[type=url], input[type=number], select, textarea {
  width: 100%; background: rgba(255,255,255,.04); border: 1px solid rgba(145,190,255,.18);
  color: #fff; border-radius: 12px; padding: 14px 14px; outline: none;
}
textarea { min-height: 180px; resize: vertical; }
.badge { padding: 6px 10px; border-radius: 999px; background: rgba(79,137,255,.12); border: 1px solid rgba(79,137,255,.22); font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.empty { padding: 20px; color: var(--muted); }
@media (max-width: 1200px) {
  .main-grid, .admin-layout, .stats { grid-template-columns: 1fr; }
  .topbar { grid-template-columns: 1fr; text-align: center; }
  .logo-wrap { align-items: center; }
}
@media (max-width: 900px) {
  .post-card, .form-grid { grid-template-columns: 1fr; }
  .post-title { font-size: 25px; }
  .hero { padding: 28px 20px; min-height: 300px; }
  .hero p { font-size: 17px; }
  .logo { font-size: 44px; }
  .logo-sub { font-size: 16px; }
}
