@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap');

:root {
  --bg:           #1a1a2e;
  --bg-panel:     #16213e;
  --bg-inner:     #1f2b47;
  --bg-input:     #263352;
  --border:       #2e4070;
  --border-light: #3a5080;
  --green:        #00e054;
  --green-dark:   #00a83c;
  --yellow:       #f5c518;
  --red:          #e63228;
  --red-bg:       #2e1a1a;
  --text:         #e8eaf0;
  --text-dim:     #8899bb;
  --font:         'Courier Prime', 'Courier New', monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  min-height: 100vh;
}

/* ===== НАВБАР ===== */
.topnav {
  display: flex;
  align-items: center;
  background: var(--bg-panel);
  border-bottom: 2px solid var(--border);
  height: 36px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-logo {
  text-decoration: none;
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: 13px;
  padding: 0 18px;
  height: 100%;
  display: flex;
  align-items: center;
  letter-spacing: 0.5px;
  border-right: 2px solid var(--green-dark);
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.15s;
}
.nav-logo:hover { background: var(--green-dark); color: #fff; }
.nav-links {
  display: flex;
  height: 100%;
  flex: 1;
  overflow: hidden;
}
.nav-link {
  text-decoration: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border-light);
  white-space: nowrap;
  transition: background 0.1s;
}
.nav-link:hover { background: var(--bg-inner); }
.nav-link.active {
  background: var(--bg-inner);
  font-weight: 700;
  border-bottom: 2px solid var(--green);
  margin-bottom: -2px;
}
.nav-link.admin-link { color: var(--red); font-weight: 700; }
.nav-auth {
  display: flex;
  gap: 8px;
  padding: 0 14px;
  align-items: center;
  border-left: 2px solid var(--border);
  height: 100%;
  flex-shrink: 0;
}
.nav-username {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.nav-username:hover { text-decoration: underline; }

/* ===== ПОИСК В НАВБАРЕ ===== */
.nav-search {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 12px;
  max-width: 340px;
  position: relative;
}
.nav-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: 12px;
  padding: 3px 28px 3px 8px;
  color: var(--text);
  outline: none;
  height: 24px;
  transition: border-color 0.1s;
}
.nav-search-input:focus { border-color: var(--green); }
.nav-search-btn {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-dim);
  padding: 0;
  line-height: 1;
}

/* ===== КНОПКИ ===== */
.btn-green {
  background: var(--green);
  color: #000;
  border: 2px solid var(--green-dark);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 16px;
  cursor: pointer;
  letter-spacing: 0.3px;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
}
.btn-green:hover { background: var(--green-dark); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}
.btn-outline:hover { background: var(--bg-inner); }

.btn-red {
  background: var(--red);
  color: #fff;
  border: 2px solid #991100;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}
.btn-red:hover { background: #991100; }

.btn-tiny {
  background: var(--bg-inner);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: 11px;
  padding: 3px 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  transition: background 0.1s;
}
.btn-tiny:hover  { background: var(--green); color: #000; border-color: var(--green-dark); }
.btn-tiny.active { background: var(--green); color: #000; border-color: var(--green-dark); }
.btn-tiny.danger { background: var(--red-bg); color: #ff6666; border-color: var(--red); }
.btn-tiny.danger:hover { background: var(--red); color: #fff; }
.btn-liked { background: var(--red-bg) !important; border-color: var(--red) !important; color: #ff6666 !important; }

/* ===== СТАТУС БАР ===== */
.statusbar {
  margin: 12px 16px 0;
  background: var(--bg-inner);
  border: 2px solid var(--border);
  border-left: 4px solid var(--green-dark);
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}

/* ===== ПАНЕЛИ ===== */
.panel {
  margin: 12px 16px 0;
  background: var(--bg-inner);
  border: 2px solid var(--border);
}
.panel-title {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-light);
}

/* ===== ЗАГРУЗКА ===== */
.upload-locked {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-light);
  background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0,0,0,0.03) 6px, rgba(0,0,0,0.03) 12px);
}
.upload-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px 12px;
  flex-wrap: wrap;
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 150px;
}
.field-group label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.req { color: var(--red); }
.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="password"],
.field-group input[type="file"],
.field-group select,
.field-group textarea {
  background: var(--bg-input);
  border: 2px solid var(--border);
  font-family: var(--font);
  font-size: 13px;
  padding: 5px 9px;
  color: var(--text);
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}
.field-group textarea { resize: vertical; min-height: 60px; }
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus { border-color: var(--green); }
.upload-btn { flex-shrink: 0; align-self: flex-end; padding: 7px 20px; margin-top: 20px; }
.upload-meta {
  font-size: 11px;
  color: var(--text-dim);
  padding: 7px 16px 10px;
  border-top: 1px solid var(--border-light);
}

/* ПРЕВЬЮ ФАЙЛА */
.upload-preview-wrap {
  padding: 0 16px 14px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.upload-preview-box {
  width: 180px;
  aspect-ratio: 16/9;
  background: #111;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.upload-preview-box canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.upload-preview-box .preview-placeholder {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  font-family: var(--font);
  padding: 8px;
}
.upload-file-info {
  flex: 1;
  min-width: 160px;
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.upload-file-info strong { color: var(--text); font-size: 13px; }
.upload-file-ok  { color: var(--green); font-weight: 700; }
.upload-file-err { color: var(--red); font-weight: 700; }

/* ПРОГРЕСС */
.progress-area {
  margin: 0 16px 12px;
  padding: 10px 14px 12px;
  background: var(--bg-panel);
  border: 2px solid var(--border);
  border-top: none;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 700;
}
.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  transition: width 0.35s ease;
  width: 0%;
}
.progress-status {
  font-size: 11px;
  color: var(--green);
  margin-top: 5px;
  font-weight: 700;
}

/* ===== ЦВЕТНЫЕ ПЛЕЙСХОЛДЕРЫ ===== */
.thumb-purple { background: linear-gradient(135deg, #2a1a4e 0%, #3d2870 100%); }
.thumb-green  { background: linear-gradient(135deg, #0a2e14 0%, #145a28 100%); }
.thumb-blue   { background: linear-gradient(135deg, #0a1a3e 0%, #1a3a6e 100%); }
.thumb-teal   { background: linear-gradient(135deg, #0a2e2e 0%, #0f5050 100%); }
.thumb-red    { background: linear-gradient(135deg, #3e0a0a 0%, #6e1a1a 100%); }
.thumb-dark   { background: linear-gradient(135deg, #111118 0%, #222230 100%); }

/* ===== ПРЕВЬЮ ИЗ КАДРА ===== */
.thumb-canvas-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-canvas-wrap canvas { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ===== СЕТКА КАРТОЧЕК ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: transparent;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.card-thumb-link {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d1020;
  text-decoration: none;
}

.card-thumb-img,
.thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
  min-width: 0;
}

.card-title {
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.card-title:hover {
  color: var(--green);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

.card-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.info-author {
  margin: 10px 0 14px;
  font-size: 14px;
  color: var(--text-dim);
}

.comments-panel {
  margin-top: 16px;
}

.comments-box {
  padding: 16px;
}

.comment-form textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  border: 2px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
}
.comment-form textarea:focus { border-color: var(--green); }

.comment-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.comments-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.comment-item {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 12px;
}

.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.comment-author {
  color: var(--green);
  font-weight: 700;
}

.comment-date {
  color: var(--text-dim);
}

.comment-body {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 13px;
  color: var(--text);
}

.comment-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.follow-btn {
  min-width: 150px;
}

.notifications-list,
#notifications-list {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
}

.notification-item {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 12px;
}

.notification-item.unread {
  border-color: var(--green);
  background: rgba(0, 224, 84, 0.06);
}

.notification-text {
  font-size: 13px;
  margin-bottom: 5px;
  color: var(--text);
}

.notification-date {
  font-size: 12px;
  color: var(--text-dim);
}

.telegram-login-entry {
  padding: 0 18px 14px;
}

.telegram-login-btn,
.telegram-login-link {
  width: 100%;
  text-align: center;
}

.telegram-modal-box {
  max-width: 430px;
}

.telegram-login-body {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.telegram-login-text {
  color: var(--text);
  line-height: 1.5;
}

.telegram-login-code {
  border: 2px dashed var(--green);
  background: var(--bg-panel);
  color: var(--green);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 4px;
  text-align: center;
  padding: 14px 10px;
}

.telegram-login-help {
  color: var(--text-dim);
  line-height: 1.5;
  white-space: pre-wrap;
}

.telegram-register-note {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.45;
}
.vcard {
  display: block;
  text-decoration: none;
  color: var(--text);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.vcard:hover { background: rgba(255,255,255,0.04); }
.vcard:hover .thumb-play { opacity: 1; transform: scale(1.12); }
.vcard-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vcard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard-thumb canvas { width: 100%; height: 100%; display: block; }
.thumb-play {
  position: absolute;
  font-size: 28px;
  color: rgba(255,255,255,0.85);
  opacity: 0.45;
  transition: opacity 0.15s, transform 0.15s;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 0 8px rgba(0,0,0,0.5);
}
.vcard-duration {
  position: absolute;
  bottom: 6px; right: 8px;
  font-size: 10px;
  font-family: var(--font);
  font-weight: 700;
  background: rgba(0,0,0,0.78);
  color: #fff;
  padding: 2px 6px;
  letter-spacing: 0.5px;
}
.vcard-body { padding: 9px 11px 11px; }
.vcard-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.vcard-meta { font-size: 11px; color: var(--text-dim); }
.green       { color: var(--green); font-weight: 700; }
.grid-footer {
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text-dim);
  border-top: 2px solid var(--border);
  background: var(--bg-panel);
}
.green-link { color: var(--green); font-weight: 700; text-decoration: none; }
.green-link:hover { text-decoration: underline; }
.empty-state { padding: 32px 20px; text-align: center; font-size: 13px; color: var(--text-dim); font-style: italic; }

/* ===== СТРАНИЦА ПОИСКА ===== */
.search-header {
  margin: 12px 16px 0;
  padding: 10px 14px;
  background: var(--bg-panel);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.search-header-q {
  font-size: 13px;
  font-weight: 700;
}
.search-header-count { font-size: 12px; color: var(--text-dim); }
.search-full-input {
  background: var(--bg-input);
  border: 2px solid var(--border);
  font-family: var(--font);
  font-size: 13px;
  padding: 6px 10px;
  color: var(--text);
  outline: none;
  flex: 1;
  min-width: 200px;
  transition: border-color 0.1s;
}
.search-full-input:focus { border-color: var(--green); }

/* ===== ТАБЛИЦА ===== */
.video-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.video-table thead tr { background: var(--bg-panel); border-bottom: 2px solid var(--border); }
.video-table th {
  padding: 7px 12px;
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.video-table tbody tr { border-bottom: 1px solid var(--border-light); transition: background 0.1s; }
.video-table tbody tr:hover { background: rgba(0,0,0,0.05); }
.video-table td { padding: 7px 12px; vertical-align: middle; }
.td-thumb { padding: 5px 10px !important; width: 96px; }
.list-thumb {
  width: 80px; height: 45px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: rgba(255,255,255,0.6);
  overflow: hidden;
}
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.table-link { color: var(--text); text-decoration: none; font-weight: 700; }
.table-link:hover { text-decoration: underline; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.green-dot  { background: var(--green); }
.yellow-dot { background: var(--yellow); }
.red-dot    { background: var(--red); }
.table-footer { padding: 8px 14px; font-size: 11px; color: var(--text-dim); border-top: 2px solid var(--border); background: var(--bg-panel); }

/* ===== МОДАЛКИ ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,15,0.82); align-items: center; justify-content: center; z-index: 200; backdrop-filter: blur(2px); }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--bg-inner); border: 3px solid var(--border); width: 400px; max-width: 94vw; max-height: 90vh; overflow-y: auto; }
.modal-box.wide { width: 540px; }
.modal-title { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); background: var(--bg-panel); border-bottom: 2px solid var(--border); padding: 9px; }
.modal-field { padding: 11px 18px 3px; display: flex; flex-direction: column; gap: 5px; }
.modal-field label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-dim); }
.modal-field input,
.modal-field select,
.modal-field textarea {
  background: var(--bg-input);
  border: 2px solid var(--border);
  font-family: var(--font);
  font-size: 13px;
  padding: 6px 10px;
  color: var(--text);
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}
.modal-field textarea { resize: vertical; min-height: 70px; }
.modal-field input:focus, .modal-field select:focus, .modal-field textarea:focus { border-color: var(--green); }
.modal-error { margin: 6px 18px 0; font-size: 11px; color: var(--red); min-height: 14px; font-weight: 700; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px 16px; border-top: 1px solid var(--border-light); margin-top: 12px; }

/* ===== ТУЛБАР BROWSE ===== */
.browse-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 12px 16px 0; padding: 8px 14px;
  background: var(--bg-panel); border: 2px solid var(--border);
  flex-wrap: wrap; gap: 8px;
}
.browse-left  { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.toolbar-sep  { color: var(--border-light); }
.browse-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-input {
  background: var(--bg-input); border: 2px solid var(--border);
  font-family: var(--font); font-size: 12px; padding: 4px 9px;
  color: var(--text); outline: none; width: 200px; transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--green); }
.sort-select {
  background: var(--bg-input); border: 2px solid var(--border);
  font-family: var(--font); font-size: 11px; padding: 3px 7px;
  color: var(--text); outline: none; cursor: pointer;
}
.browse-panel { border-top: none; }

/* ===== СТРАНИЦА ПРОСМОТРА ===== */
.watch-layout { display: flex; align-items: flex-start; margin: 12px 16px 20px; gap: 12px; }
.watch-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.watch-sidebar { width: 270px; flex-shrink: 0; }
.player-panel  { margin: 0; }
.player-wrap { position: relative; width: 100%; aspect-ratio: 16/9; background: #08080f; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.player-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-nophoto { display: flex; align-items: center; justify-content: center; text-align: center; width: 100%; height: 100%; padding: 20px; pointer-events: none; }
.player-nofile { font-size: 12px; color: rgba(255,255,255,0.3); line-height: 1.8; font-family: var(--font); }
.player-controls { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-panel); border-top: 2px solid var(--border); }
.ctrl-btn { background: var(--bg-inner); color: var(--text); border: 1px solid var(--border); font-family: var(--font); font-size: 11px; padding: 4px 12px; cursor: pointer; flex-shrink: 0; white-space: nowrap; transition: background 0.1s; }
.ctrl-btn:hover { background: var(--green); color: #000; border-color: var(--green-dark); }
.progress-bar { flex: 1; height: 3px; accent-color: var(--green); cursor: pointer; min-width: 60px; }
.vol-bar { width: 70px; height: 3px; accent-color: var(--green); cursor: pointer; flex-shrink: 0; }
.time-label { font-size: 11px; color: var(--text-dim); flex-shrink: 0; min-width: 32px; font-variant-numeric: tabular-nums; }
.vol-label { font-size: 12px; flex-shrink: 0; color: var(--text-dim); }
.info-panel { margin: 0; }
.info-body  { padding: 13px 16px 15px; }
.info-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.info-row { display: flex; flex-wrap: wrap; gap: 5px 18px; font-size: 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); align-items: baseline; }
.info-label { color: var(--text-dim); font-weight: 700; font-size: 11px; text-transform: uppercase; }
.info-desc { font-size: 12px; line-height: 1.75; color: var(--text-dim); margin-bottom: 13px; }
.info-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sidebar-panel { margin: 0; }
.scard { display: flex; gap: 10px; padding: 9px 10px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border-light); align-items: center; transition: background 0.1s; }
.scard:last-child { border-bottom: none; }
.scard:hover { background: rgba(0,0,0,0.06); }
.scard:hover .scard-play { opacity: 1; }
.scard-thumb { position: relative; flex-shrink: 0; width: 80px; height: 45px; border: 1px solid var(--border-light); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.scard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.scard-play { font-size: 16px; color: rgba(255,255,255,0.75); opacity: 0.45; transition: opacity 0.15s; pointer-events: none; user-select: none; }
.scard-dur { position: absolute; bottom: 2px; right: 3px; font-size: 9px; font-family: var(--font); font-weight: 700; background: rgba(0,0,0,0.78); color: #fff; padding: 1px 4px; }
.scard-info { flex: 1; min-width: 0; }
.scard-title { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.scard-meta  { font-size: 11px; color: var(--text-dim); }

/* ===== СТРАНИЦА ПРОФИЛЯ ===== */
.profile-header {
  margin: 12px 16px 0;
  background: var(--bg-inner);
  border: 2px solid var(--border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.profile-avatar {
  width: 60px; height: 60px;
  background: var(--green-dark);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.profile-info h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.profile-info .profile-email { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.profile-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.profile-stat { font-size: 12px; color: var(--text-dim); }
.profile-stat strong { color: var(--green); font-size: 14px; }

/* ===== АДМИН ПАНЕЛЬ ===== */
.admin-tabs {
  margin: 12px 16px 0;
  display: flex;
  border-bottom: 2px solid var(--border);
  background: var(--bg-panel);
  border: 2px solid var(--border);
  border-bottom: none;
}
.admin-tab {
  padding: 8px 18px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  border-right: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-dim);
  letter-spacing: 0.3px;
  transition: background 0.1s;
}
.admin-tab:hover { background: var(--bg-inner); color: var(--text); }
.admin-tab.active { background: var(--bg-inner); color: var(--text); border-bottom: 2px solid var(--green); margin-bottom: -2px; }
.admin-panel { margin: 0 16px 16px; background: var(--bg-inner); border: 2px solid var(--border); border-top: none; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.admin-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap; gap: 8px;
}
.admin-bar-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; border-bottom: 1px solid var(--border-light); }
.stat-card { padding: 16px 18px; border-right: 1px solid var(--border-light); }
.stat-card:last-child { border-right: none; }
.stat-card-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 6px; }
.stat-card-value { font-size: 22px; font-weight: 700; color: var(--green); }
.admin-actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.badge-status { display: inline-block; font-size: 10px; padding: 2px 7px; font-weight: 700; letter-spacing: 0.5px; }
.badge-pending  { background: #2a2000; color: #f5c518; border: 1px solid #7a6000; }
.badge-reviewed { background: #002200; color: #00e054; border: 1px solid #005500; }
.badge-dismissed{ background: #1a1a2a; color: #8899bb; border: 1px solid #3a5080; }

/* ===== ТОСТ ===== */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--bg-panel); color: var(--text); font-family: var(--font); font-size: 12px; font-weight: 700; padding: 10px 22px; border: 2px solid var(--green); opacity: 0; transition: transform 0.25s, opacity 0.25s; z-index: 999; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.toast-error { border-color: var(--red); color: #ffcccc; }

/* ===== АДАПТИВ ===== */
@media (max-width: 800px) {
  .watch-layout  { flex-direction: column; margin: 10px 10px 16px; }
  .watch-sidebar { width: 100%; }
}
@media (max-width: 600px) {
  .nav-links a:nth-child(n+3) { display: none; }
  .nav-search { max-width: 120px; }
  .upload-row { flex-direction: column; }
  .browse-toolbar { flex-direction: column; align-items: flex-start; }
  .player-controls { flex-wrap: wrap; }
  .profile-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .nav-links { display: none; }
  .nav-search { display: none; }
}
