/* ============================================================
   SmartVefur Torrent — Pro Full Page UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

:root {
  --c-bg:        #080b11;
  --c-surface:   #0d1117;
  --c-surface2:  #161b24;
  --c-surface3:  #1e2530;
  --c-border:    rgba(255,255,255,.07);
  --c-border2:   rgba(255,255,255,.12);
  --c-accent:    #ff3c5a;
  --c-accent2:   #ff6b35;
  --c-green:     #00e887;
  --c-red:       #ff4d6a;
  --c-blue:      #4d9fff;
  --c-gold:      #ffd166;
  --c-text:      #e8edf5;
  --c-muted:     #6b7a96;
  --c-muted2:    #8a9ab8;
  --c-mono:      'Space Mono', monospace;
  --c-sans:      'DM Sans', sans-serif;
  --sidebar-w:   240px;
  --topbar-h:    58px;
  --radius:      8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body.svt-fullpage-body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--c-sans);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.svt-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-areas: "topbar topbar" "sidebar main";
  min-height: 100vh;
}

/* TOPBAR */
.svt-topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.svt-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.svt-logo-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent2));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 0 16px rgba(255,60,90,.4);
}

.svt-logo-text {
  font-family: var(--c-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
}
.svt-logo-text span { color: var(--c-accent); }

.svt-topbar-search {
  flex: 1;
  max-width: 520px;
  position: relative;
  display: flex;
  gap: 0;
}

.svt-topbar-search input {
  flex: 1;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-right: none;
  color: var(--c-text);
  padding: 9px 14px 9px 14px;
  border-radius: var(--radius) 0 0 var(--radius);
  font-family: var(--c-sans);
  font-size: 13px;
  transition: border-color .2s;
}
.svt-topbar-search input:focus { outline: none; border-color: var(--c-accent); }
.svt-topbar-search input::placeholder { color: var(--c-muted); }

.svt-topbar-search button {
  background: var(--c-accent);
  border: none;
  color: #fff;
  padding: 9px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--c-sans);
  transition: opacity .2s;
}
.svt-topbar-search button:hover { opacity: .85; }

.svt-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.svt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--c-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  border: none;
}
.svt-btn-primary {
  background: var(--c-accent);
  color: #fff;
  box-shadow: 0 0 20px rgba(255,60,90,.3);
}
.svt-btn-primary:hover { opacity: .85; transform: translateY(-1px); }
.svt-btn-ghost {
  background: transparent;
  color: var(--c-muted2);
  border: 1px solid var(--c-border);
}
.svt-btn-ghost:hover { border-color: var(--c-border2); color: var(--c-text); }

/* SIDEBAR */
.svt-sidebar {
  grid-area: sidebar;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  padding: 20px 0;
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--c-border) transparent;
}

.svt-sidebar-section { padding: 0 12px; margin-bottom: 24px; }

.svt-sidebar-label {
  font-family: var(--c-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--c-muted);
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 6px;
}

.svt-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--c-muted2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  gap: 8px;
}
.svt-sidebar-link:hover { background: var(--c-surface2); color: var(--c-text); }
.svt-sidebar-link.active { background: rgba(255,60,90,.1); color: var(--c-accent); }
.svt-sidebar-link-icon { font-size: 14px; width: 18px; text-align: center; }

.svt-sidebar-count {
  background: var(--c-surface3);
  color: var(--c-muted);
  font-family: var(--c-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
}

.svt-sidebar-divider {
  height: 1px;
  background: var(--c-border);
  margin: 4px 12px 20px;
}

.svt-sidebar-stats {
  margin: 0 12px;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.svt-sidebar-stats-header {
  padding: 8px 14px;
  font-family: var(--c-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--c-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--c-border);
}
.svt-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--c-border);
}
.svt-stat-row:last-child { border-bottom: none; }
.svt-stat-label { color: var(--c-muted); font-size: 12px; }
.svt-stat-val { font-family: var(--c-mono); font-size: 12px; color: var(--c-text); font-weight: 700; }
.svt-stat-val.green { color: var(--c-green); }
.svt-stat-val.red   { color: var(--c-red); }

/* MAIN */
.svt-main { grid-area: main; overflow-x: hidden; }

.svt-statsbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--c-border);
}
.svt-statsbar-item {
  padding: 16px 24px;
  border-right: 1px solid var(--c-border);
}
.svt-statsbar-item:last-child { border-right: none; }
.svt-statsbar-val {
  font-family: var(--c-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1;
  margin-bottom: 4px;
}
.svt-statsbar-val.accent { color: var(--c-accent); }
.svt-statsbar-label {
  font-size: 11px;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
}

.svt-content { padding: 24px; }

.svt-table-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.svt-table-title { font-family: var(--c-mono); font-size: 12px; color: var(--c-muted2); }
.svt-table-title strong { color: var(--c-text); }

.svt-sort-controls { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.svt-sort-btn {
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  color: var(--c-muted);
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--c-sans);
  transition: all .15s;
}
.svt-sort-btn:hover, .svt-sort-btn.active { border-color: var(--c-accent); color: var(--c-accent); }

/* TABLE */
.svt-table-container {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.svt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.svt-table thead { background: var(--c-surface2); border-bottom: 1px solid var(--c-border2); }
.svt-table th {
  padding: 12px 16px;
  text-align: left;
  font-family: var(--c-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--c-muted);
  white-space: nowrap;
}
.svt-table th a { color: inherit; text-decoration: none; transition: color .15s; }
.svt-table th a:hover { color: var(--c-text); }
.svt-table tbody tr { border-bottom: 1px solid var(--c-border); transition: background .15s; }
.svt-table tbody tr:last-child { border-bottom: none; }
.svt-table tbody tr:hover { background: rgba(255,255,255,.025); }
.svt-table td { padding: 12px 16px; vertical-align: middle; }

.svt-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--c-mono);
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.svt-badge-video   { background: rgba(77,159,255,.15); color: var(--c-blue); }
.svt-badge-audio   { background: rgba(0,232,135,.15);  color: var(--c-green); }
.svt-badge-apps    { background: rgba(255,209,102,.15); color: var(--c-gold); }
.svt-badge-games   { background: rgba(255,60,90,.15);   color: var(--c-accent); }
.svt-badge-other   { background: rgba(255,255,255,.06); color: var(--c-muted2); }

.svt-torrent-link {
  color: var(--c-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: color .15s;
  display: block;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.svt-torrent-link:hover { color: var(--c-accent); }

.svt-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-family: var(--c-mono);
  font-weight: 700;
  letter-spacing: .5px;
}
.svt-pill-vip     { background: var(--c-gold); color: #000; }
.svt-pill-trusted { background: rgba(0,232,135,.2); color: var(--c-green); border: 1px solid rgba(0,232,135,.4); }

.svt-cell-num { font-family: var(--c-mono); font-size: 12px; white-space: nowrap; }
.svt-cell-num.green { color: var(--c-green); font-weight: 700; }
.svt-cell-num.red   { color: var(--c-red);   font-weight: 700; }
.svt-cell-num.muted { color: var(--c-muted2); }
.svt-cell-date, .svt-cell-uploader { color: var(--c-muted); font-size: 12px; white-space: nowrap; }
.svt-empty-row td { text-align: center; padding: 60px; color: var(--c-muted); }

/* PAGINATION */
.svt-pagination { display: flex; justify-content: center; gap: 4px; padding: 20px; }
.svt-page-btn {
  min-width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-muted2);
  text-decoration: none;
  font-size: 13px;
  font-family: var(--c-mono);
  padding: 0 8px;
  transition: all .15s;
}
.svt-page-btn:hover { border-color: var(--c-border2); color: var(--c-text); }
.svt-page-btn.active { background: var(--c-accent); border-color: var(--c-accent); color: #fff; box-shadow: 0 0 16px rgba(255,60,90,.35); }

/* DETAIL */
.svt-detail-page { max-width: 860px; }
.svt-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 12px; color: var(--c-muted); }
.svt-breadcrumb a { color: var(--c-muted2); text-decoration: none; }
.svt-breadcrumb a:hover { color: var(--c-text); }
.svt-detail-title { font-size: 20px; font-weight: 700; color: var(--c-text); line-height: 1.3; margin-bottom: 14px; }
.svt-detail-layout { display: grid; grid-template-columns: 1fr 250px; gap: 20px; margin-bottom: 24px; }
@media (max-width: 700px) { .svt-detail-layout { grid-template-columns: 1fr; } }
.svt-detail-desc-box { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; color: var(--c-muted2); font-size: 13px; line-height: 1.7; white-space: pre-wrap; margin-bottom: 16px; }
.svt-action-bar { display: flex; gap: 10px; flex-wrap: wrap; }

.svt-meta-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; }
.svt-meta-card-header { background: var(--c-surface2); padding: 10px 16px; font-family: var(--c-mono); font-size: 10px; letter-spacing: 1px; color: var(--c-muted); text-transform: uppercase; border-bottom: 1px solid var(--c-border); }
.svt-meta-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--c-border); gap: 12px; }
.svt-meta-row:last-child { border-bottom: none; }
.svt-meta-key { color: var(--c-muted); font-size: 12px; flex-shrink: 0; }
.svt-meta-val { color: var(--c-text); font-size: 12px; text-align: right; font-family: var(--c-mono); }
.svt-meta-val a { color: var(--c-blue); text-decoration: none; }
.svt-meta-val.green { color: var(--c-green); }
.svt-meta-val.red   { color: var(--c-red); }
.svt-meta-hash { word-break: break-all; font-size: 10px; color: var(--c-muted); }

/* COMMENTS */
.svt-comments-section { border-top: 1px solid var(--c-border); padding-top: 24px; margin-top: 6px; }
.svt-section-title { font-family: var(--c-mono); font-size: 11px; letter-spacing: 1px; color: var(--c-muted); text-transform: uppercase; margin-bottom: 16px; }
.svt-comment { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.svt-comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.svt-comment-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--c-accent), var(--c-accent2)); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.svt-comment-user { font-weight: 600; font-size: 13px; color: var(--c-text); }
.svt-comment-date { font-size: 11px; color: var(--c-muted); font-family: var(--c-mono); margin-left: auto; }
.svt-comment-body { font-size: 13px; color: var(--c-muted2); line-height: 1.6; }
.svt-comment-form { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.svt-comment-form textarea { background: var(--c-surface2); border: 1px solid var(--c-border); color: var(--c-text); padding: 12px; border-radius: 6px; font-family: var(--c-sans); font-size: 13px; resize: vertical; min-height: 80px; width: 100%; transition: border-color .2s; }
.svt-comment-form textarea:focus { outline: none; border-color: var(--c-accent); }
.svt-login-notice { color: var(--c-muted); font-size: 13px; padding: 14px 16px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); margin-top: 12px; }
.svt-login-notice a { color: var(--c-accent); text-decoration: none; }

/* UPLOAD */
.svt-upload-page { max-width: 680px; }
.svt-page-header { margin-bottom: 24px; }
.svt-page-header h2 { font-size: 20px; font-weight: 700; color: var(--c-text); margin-bottom: 4px; }
.svt-page-header p { color: var(--c-muted); font-size: 13px; }
.svt-form-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.svt-form-card-header { background: var(--c-surface2); padding: 11px 20px; font-family: var(--c-mono); font-size: 10px; letter-spacing: 1px; color: var(--c-muted); text-transform: uppercase; border-bottom: 1px solid var(--c-border); }
.svt-form-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.svt-form-group { display: flex; flex-direction: column; gap: 6px; }
.svt-form-label { font-size: 12px; font-weight: 600; color: var(--c-muted2); }
.svt-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.svt-input { background: var(--c-surface2); border: 1px solid var(--c-border); color: var(--c-text); padding: 10px 14px; border-radius: 6px; font-family: var(--c-sans); font-size: 13px; width: 100%; transition: border-color .2s, box-shadow .2s; }
.svt-input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(255,60,90,.1); }
.svt-input::placeholder { color: var(--c-muted); }
.svt-input option { background: var(--c-surface2); }
.svt-dropzone { border: 2px dashed var(--c-border); border-radius: var(--radius); padding: 36px; text-align: center; cursor: pointer; transition: all .2s; position: relative; background: var(--c-surface2); }
.svt-dropzone:hover, .svt-dropzone.drag-over { border-color: var(--c-accent); background: rgba(255,60,90,.04); }
.svt-dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.svt-dropzone-icon { font-size: 28px; margin-bottom: 10px; opacity: .6; }
.svt-dropzone-text { color: var(--c-muted); font-size: 13px; }
.svt-dropzone-text strong { color: var(--c-accent); }
.svt-dropzone-hint { font-size: 11px; color: var(--c-muted); margin-top: 6px; }
.svt-dropzone-filename { display: none; color: var(--c-green); font-size: 13px; font-family: var(--c-mono); margin-top: 10px; }
.svt-dropzone-filename.show { display: block; }
.svt-form-submit { display: flex; justify-content: flex-end; padding: 14px 20px; background: var(--c-surface2); border-top: 1px solid var(--c-border); }

.svt-alert { border-radius: var(--radius); padding: 12px 16px; font-size: 13px; margin-bottom: 16px; border: 1px solid; }
.svt-alert-error   { background: rgba(255,77,106,.08); border-color: rgba(255,77,106,.3); color: var(--c-red); }
.svt-alert-success { background: rgba(0,232,135,.08); border-color: rgba(0,232,135,.3); color: var(--c-green); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .svt-wrap { grid-template-areas: "topbar" "main"; grid-template-columns: 1fr; grid-template-rows: var(--topbar-h) 1fr; }
  .svt-sidebar { display: none; }
  .svt-statsbar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) { .svt-content { padding: 14px; } }

/* ANIMATIONS */
@keyframes svt-fadeup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.svt-table tbody tr { animation: svt-fadeup .3s ease both; }
.svt-table tbody tr:nth-child(1) { animation-delay: .03s; }
.svt-table tbody tr:nth-child(2) { animation-delay: .06s; }
.svt-table tbody tr:nth-child(3) { animation-delay: .09s; }
.svt-table tbody tr:nth-child(4) { animation-delay: .12s; }
.svt-table tbody tr:nth-child(5) { animation-delay: .15s; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border2); border-radius: 10px; }
