/* ============================================================
   Steam Export — Liquid Glass / чёрно-фиолетовая тема
   ============================================================ */

/* ---------- Сброс ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

:root {
  /* Палитра */
  --bg-0: #08060f;
  --bg-1: #0d0a1a;
  --violet-1: #8b5cf6;
  --violet-2: #a855f7;
  --violet-3: #c084fc;
  --violet-deep: #4c1d95;
  --pink: #e879f9;

  --text: #ece9f5;
  --text-dim: #9d94b8;
  --text-mute: #6b6385;

  /* Стекло */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-strong: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-hi: rgba(168, 85, 247, 0.35);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.08);

  /* Радиусы */
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  /* Анимация */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  line-height: 1.5;
}

/* ---------- Фон ---------- */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(232, 121, 249, 0.10), transparent 60%),
    var(--bg-0);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}

.orb-1 {
  width: 520px; height: 520px;
  top: -160px; left: -120px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  animation: float1 22s ease-in-out infinite;
}
.orb-2 {
  width: 600px; height: 600px;
  bottom: -200px; right: -160px;
  background: radial-gradient(circle, #a855f7 0%, transparent 70%);
  animation: float2 28s ease-in-out infinite;
}
.orb-3 {
  width: 400px; height: 400px;
  top: 40%; left: 55%;
  background: radial-gradient(circle, #e879f9 0%, transparent 70%);
  opacity: 0.35;
  animation: float3 34s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(80px, 60px) scale(1.15); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-90px, -70px) scale(1.1); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-60px, 90px) scale(1.2); }
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Контейнер ---------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  position: relative;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  margin-bottom: 48px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, #8b5cf6, #e879f9);
  box-shadow:
    0 12px 40px rgba(139, 92, 246, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  margin-bottom: 24px;
  animation: pulseGlow 4s ease-in-out infinite;
}
.logo svg { width: 32px; height: 32px; }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 12px 40px rgba(139, 92, 246, 0.45), inset 0 1px 0 rgba(255,255,255,0.35); }
  50%      { box-shadow: 0 12px 60px rgba(168, 85, 247, 0.75), inset 0 1px 0 rgba(255,255,255,0.35); }
}

h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #d8c7ff 50%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-dim);
  font-size: 16px;
  margin: 0 auto;
  max-width: 520px;
  line-height: 1.5;
}

/* ---------- Стекло ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), var(--inner-glow);
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.14) 0%,
    rgba(255,255,255,0.02) 40%,
    rgba(168,85,247,0.25) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Поиск ---------- */
.search-panel {
  padding: 24px;
  margin-bottom: 24px;
}

.search-row {
  display: flex;
  gap: 12px;
}

.input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 18px;
  width: 18px;
  height: 18px;
  color: var(--text-mute);
  pointer-events: none;
  transition: color 0.25s var(--ease);
}

input[type="text"] {
  width: 100%;
  padding: 16px 18px 16px 48px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all 0.25s var(--ease);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

input[type="text"]::placeholder { color: var(--text-mute); }

input[type="text"]:focus {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(0, 0, 0, 0.5);
  box-shadow:
    0 0 0 4px rgba(139, 92, 246, 0.14),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.input-wrap:focus-within .input-icon { color: var(--violet-3); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #e879f9 100%);
  box-shadow:
    0 8px 24px rgba(139, 92, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease);
}
.btn-primary:hover:not(:disabled)::after { transform: translateX(100%); }

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px rgba(168, 85, 247, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: var(--glass-border-hi);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
}

.btn svg { width: 18px; height: 18px; }

/* ---------- Статус ---------- */
.status {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 14px;
  color: var(--text-dim);
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  animation: slideIn 0.4s var(--ease);
}
.status.visible { display: flex; }
.status.error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.status .spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(168, 85, 247, 0.2);
  border-top-color: var(--violet-2);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Профиль ---------- */
.profile {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  margin-bottom: 20px;
  animation: slideIn 0.5s var(--ease);
}

.profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
  background: linear-gradient(135deg, #4c1d95, #1a1030);
}

.profile-info { flex: 1; min-width: 0; }

.profile-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-meta {
  color: var(--text-mute);
  font-size: 13px;
  font-family: 'SF Mono', 'Consolas', monospace;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-weight: 600;
}
.stat-value { font-size: 17px; font-weight: 700; color: var(--text); }
.stat-value .accent {
  background: linear-gradient(135deg, #a855f7, #e879f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Действия ---------- */
.actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  animation: slideIn 0.5s var(--ease) 0.05s backwards;
}

/* ---------- Таблица ---------- */
.table-panel {
  animation: slideIn 0.5s var(--ease) 0.1s backwards;
}

.table-head {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-title { font-size: 15px; font-weight: 600; color: var(--text); }

.table-count {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: var(--violet-3);
  font-weight: 600;
}

.table-scroll {
  max-height: 620px;
  overflow-y: auto;
  overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 14px 24px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  background: rgba(13, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s var(--ease);
}
tbody tr:hover { background: rgba(168, 85, 247, 0.06); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 14px 24px;
  color: var(--text-dim);
  vertical-align: middle;
}
tbody td.name { color: var(--text); font-weight: 500; }
tbody td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 13px;
}

.appid {
  color: var(--text-mute);
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 12px;
}

.hours-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(232, 121, 249, 0.2));
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #d8c7ff;
  font-weight: 600;
  font-size: 12px;
}

.recent-badge { color: var(--pink); font-weight: 600; }

/* ---------- Скроллбар ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.5), rgba(232, 121, 249, 0.4));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.8), rgba(232, 121, 249, 0.6));
  background-clip: padding-box;
}

/* ---------- Пустое состояние ---------- */
.empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-mute);
}
.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: 0.4;
}

/* ---------- Футер ---------- */
.footer {
  margin-top: 48px;
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer a { color: var(--text-dim); text-decoration: none; border-bottom: 1px dashed rgba(168,85,247,0.4); }
.footer a:hover { color: var(--violet-3); }
.footer .dot { color: var(--text-mute); }

/* ---------- Адаптив ---------- */
@media (max-width: 720px) {
  .container { padding: 48px 16px 64px; }
  .search-row { flex-direction: column; }
  .btn { width: 100%; }
  .profile { flex-direction: column; text-align: center; }
  .profile-stats { justify-content: center; }
  .profile-name { white-space: normal; }
  .actions { justify-content: stretch; }
  .actions .btn { flex: 1; }
  thead th, tbody td { padding: 12px 16px; }
  .hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}