* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #060b16;
  --bg-sidebar: #0a101f;
  --bg-content: #0d1425;
  --card: #111a2e;
  --card-hover: #16203a;
  --border: rgba(96, 165, 250, 0.12);
  --border-strong: rgba(96, 165, 250, 0.28);
  --accent: #3b82f6;
  --accent-2: #06b6d4;
  --accent-3: #60a5fa;
  --accent-4: #22d3ee;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --accent-glow-soft: rgba(59, 130, 246, 0.15);
  --text: #e8eefc;
  --text-soft: #a7b8d8;
  --muted: #6b7f9f;
  --muted-2: #4a5872;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --gold: #fbbf24;
  --gold-2: #f59e0b;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --sidebar-w: 260px;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, 'Segoe UI', 'Inter', Roboto, sans-serif;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(59, 130, 246, 0.08), transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 100%, rgba(6, 182, 212, 0.06), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.app { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-header {
  padding: 22px 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--accent-glow-soft);
}
.sidebar-logo svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-brand { font-size: 18px; font-weight: 800; letter-spacing: -0.4px; color: var(--text); }

.sidebar-cta {
  margin: 6px 16px 18px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 4px 16px var(--accent-glow-soft);
  text-decoration: none;
}
.sidebar-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent-glow); }
.sidebar-cta svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0 12px 12px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

.nav-section { margin-bottom: 18px; }
.nav-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted-2);
  font-weight: 800;
  padding: 8px 12px 6px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  margin-bottom: 2px;
  transition: all 0.15s;
  position: relative;
  text-decoration: none;
}
.nav-item:hover { background: rgba(59, 130, 246, 0.08); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(6, 182, 212, 0.12));
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: linear-gradient(180deg, var(--accent-3), var(--accent-2));
  border-radius: 0 3px 3px 0;
}
.nav-item svg {
  width: 18px; height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
}
.user-card:hover { background: var(--card-hover); border-color: var(--border-strong); }
.user-card-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.user-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-card-info { flex: 1; min-width: 0; }
.user-card-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card-balance {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 4px;
}
.user-card-balance svg { width: 12px; height: 12px; fill: currentColor; }

.sidebar-actions { display: flex; gap: 6px; }
.sidebar-action {
  flex: 1;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-family: inherit;
}
.sidebar-action:hover { background: var(--card-hover); color: var(--text); }
.sidebar-action svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-action.danger:hover { color: #fda4af; border-color: rgba(239, 68, 68, 0.4); }

/* ===== MAIN ===== */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 32px 40px 60px;
  min-width: 0;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -0.6px; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-xs);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-family: inherit;
}
.icon-btn:hover { background: var(--card-hover); color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.dropdown-wrap { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  animation: dropdownIn 0.15s;
}
@keyframes dropdownIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.15s;
}
.dropdown-item:hover { background: rgba(59, 130, 246, 0.1); color: var(--text); }
.dropdown-item svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.dropdown-item.danger { color: #fda4af; }
.dropdown-item.danger:hover { background: rgba(239, 68, 68, 0.12); color: #fecdd3; }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* ===== GRID/CARDS ===== */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all 0.15s;
}
.card.clickable { cursor: pointer; text-decoration: none; color: inherit; display: block; }
.card.clickable:hover { background: var(--card-hover); border-color: var(--border-strong); }
.card-title { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.card-sub { color: var(--muted); font-size: 12px; line-height: 1.5; }

/* ===== WELCOME ===== */
.welcome {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.35), var(--card));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.welcome::after {
  content: "";
  position: absolute;
  top: -60%; right: -20%;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25), transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}
.welcome > * { position: relative; z-index: 1; }
.welcome-text .welcome-hi { font-size: 24px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 4px; }
.welcome-text .welcome-sub { color: var(--muted); font-size: 13px; }
.welcome-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
}
.stat:hover { border-color: var(--border-strong); background: var(--card-hover); }
.stat-info .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.stat-info .stat-value {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}
.stat-info .stat-value.gold { color: var(--gold); }
.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-xs);
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon.gold { background: rgba(251, 191, 36, 0.12); color: var(--gold); }
.stat-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== BUTTONS ===== */
.btn {
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-family: inherit;
  line-height: 1.1;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow-soft);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn-secondary {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-3);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover:not(:disabled) { background: rgba(59, 130, 246, 0.2); }
.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--card-hover); color: var(--text); }
.btn-coin {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #1a1300;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.25);
}
.btn-coin:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(251, 191, 36, 0.4); }
.btn-tg { background: linear-gradient(135deg, #229ED9, #1c8fc4); color: #fff; }
.btn-tg:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(34, 158, 217, 0.4); }
.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.btn-danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.22); }
.btn-block { width: 100%; }

/* ===== INPUTS ===== */
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
.field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
}
.hero h1 {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 14px;
  letter-spacing: -1.2px;
  background: linear-gradient(135deg, #fff, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.hero-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ===== AUTH ===== */
.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.auth-card h2 { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.auth-card .subtitle { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.auth-toggle { text-align: center; color: var(--muted); font-size: 13px; margin-top: 16px; }
.auth-toggle a { color: var(--accent-3); cursor: pointer; font-weight: 600; }
.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  margin-bottom: 12px;
}
.smart-captcha { margin: 12px 0; display: flex; justify-content: center; min-height: 100px; }

/* ===== PROFILE ===== */
.profile-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}
.profile-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.2), transparent 60%);
}
.profile-hero > * { position: relative; z-index: 1; }
.profile-hero.bg-purple::before { background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.3), transparent 60%), radial-gradient(circle at bottom left, rgba(109, 40, 217, 0.2), transparent 55%); }
.profile-hero.bg-pink::before { background: radial-gradient(circle at top right, rgba(236, 72, 153, 0.3), transparent 60%), radial-gradient(circle at bottom left, rgba(190, 24, 93, 0.2), transparent 55%); }
.profile-hero.bg-blue::before { background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.35), transparent 60%), radial-gradient(circle at bottom left, rgba(30, 64, 175, 0.25), transparent 55%); }
.profile-hero.bg-cyan::before { background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.3), transparent 60%), radial-gradient(circle at bottom left, rgba(14, 116, 144, 0.2), transparent 55%); }
.profile-hero.bg-gold::before { background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.25), transparent 60%), radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.18), transparent 55%); }
.profile-hero.bg-emerald::before { background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.25), transparent 60%), radial-gradient(circle at bottom left, rgba(5, 150, 105, 0.18), transparent 55%); }

.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(6, 182, 212, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-3);
  overflow: hidden;
  position: relative;
}
.avatar svg { width: 44px; height: 44px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-frame-none { border: 2px solid var(--border-strong); }
.avatar-frame-glow { border: 2px solid var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 0 30px rgba(59, 130, 246, 0.5); }
.avatar-frame-gold { border: 3px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, #fde68a, #fbbf24, #f59e0b) border-box; box-shadow: 0 0 24px rgba(251, 191, 36, 0.45); }
.avatar-frame-rainbow { border: 3px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, #f43f5e, #fbbf24, #4ade80, #22d3ee, #8b5cf6, #f43f5e) border-box; background-size: 100% 100%, 400% 400%; animation: rainbowShift 4s linear infinite; }
@keyframes rainbowShift { 0% { background-position: 0% 50%, 0% 50%; } 100% { background-position: 0% 50%, 400% 50%; } }
.avatar-frame-fire { border: 3px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, #fbbf24, #ef4444, #f97316) border-box; box-shadow: 0 0 28px rgba(239, 68, 68, 0.5); }
.avatar-frame-ice { border: 3px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, #a5f3fc, #22d3ee, #3b82f6) border-box; box-shadow: 0 0 28px rgba(34, 211, 238, 0.5); }

.profile-info { flex: 1; min-width: 0; }
.profile-nickname {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.6px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  word-break: break-all;
  background: linear-gradient(135deg, #fff, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.profile-nickname.nick-pink { background: linear-gradient(135deg, #fbcfe8, #ec4899); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.profile-nickname.nick-blue { background: linear-gradient(135deg, #bae6fd, #3b82f6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.profile-nickname.nick-cyan { background: linear-gradient(135deg, #a5f3fc, #06b6d4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.profile-nickname.nick-gold { background: linear-gradient(135deg, #fde68a, #f59e0b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.profile-nickname.nick-emerald { background: linear-gradient(135deg, #a7f3d0, #10b981); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.profile-nickname.nick-red { background: linear-gradient(135deg, #fecdd3, #f43f5e); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.profile-nickname.nick-rainbow { background: linear-gradient(135deg, #f43f5e, #fbbf24, #4ade80, #22d3ee, #8b5cf6, #f43f5e); background-size: 400% 400%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: rainbowShift 6s linear infinite; }
.profile-nickname .nick-icon { width: 22px; height: 22px; -webkit-text-fill-color: initial; background: none; color: var(--accent-3); flex-shrink: 0; display: inline-flex; }
.profile-nickname .nick-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.profile-meta { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.profile-meta svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.profile-bio { color: var(--text-soft); font-size: 13px; line-height: 1.5; max-width: 480px; font-style: italic; opacity: 0.85; margin-bottom: 8px; }
.profile-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-free { background: rgba(107, 127, 159, 0.15); color: var(--muted); border: 1px solid var(--border); }
.badge-active { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.35); }
.badge-permanent { background: rgba(251, 191, 36, 0.12); color: var(--gold); border: 1px solid rgba(251, 191, 36, 0.35); box-shadow: 0 0 16px rgba(251, 191, 36, 0.15); }
.badge-banned { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }

/* ===== SUBSCRIPTION ===== */
.sub-card {
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
}
.sub-card::after {
  content: "";
  position: absolute;
  top: -40%; right: -20%;
  width: 280px; height: 280px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  pointer-events: none;
}
.sub-card > * { position: relative; z-index: 1; }
.sub-card-free { background: linear-gradient(135deg, #131c33, #0f1626); }
.sub-card-free::after { background: radial-gradient(circle, rgba(107, 127, 159, 0.5), transparent 70%); }
.sub-card-pro { background: linear-gradient(135deg, rgba(30, 58, 138, 0.75), rgba(12, 30, 70, 0.7)); border-color: rgba(59, 130, 246, 0.55); box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2); }
.sub-card-pro::after { background: radial-gradient(circle, rgba(59, 130, 246, 0.6), transparent 70%); }
.sub-card-ltd { background: linear-gradient(135deg, rgba(120, 80, 10, 0.75), rgba(70, 45, 5, 0.7)); border-color: rgba(251, 191, 36, 0.5); }
.sub-card-ltd::after { background: radial-gradient(circle, rgba(251, 191, 36, 0.5), transparent 70%); }
.sub-card-family { background: linear-gradient(135deg, rgba(6, 78, 59, 0.75), rgba(4, 47, 36, 0.7)); border-color: rgba(16, 185, 129, 0.5); }
.sub-card-family::after { background: radial-gradient(circle, rgba(16, 185, 129, 0.5), transparent 70%); }
.sub-card-friend { background: linear-gradient(135deg, rgba(14, 116, 144, 0.75), rgba(8, 51, 68, 0.7)); border-color: rgba(6, 182, 212, 0.5); }
.sub-card-friend::after { background: radial-gradient(circle, rgba(6, 182, 212, 0.5), transparent 70%); }
.sub-card-banned { background: linear-gradient(135deg, rgba(120, 20, 35, 0.75), rgba(60, 10, 20, 0.7)); border-color: rgba(239, 68, 68, 0.5); }
.sub-card-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.sub-card-title { display: flex; align-items: center; gap: 12px; }
.sub-card-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sub-card-icon svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sub-card-name { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; line-height: 1.1; color: #fff; }
.sub-card-label { font-size: 10px; color: rgba(255, 255, 255, 0.65); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; margin-top: 4px; }
.sub-card-badge { padding: 5px 12px; border-radius: 20px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; flex-shrink: 0; }
.sub-card-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sub-card-info { background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-sm); padding: 10px 12px; }
.sub-card-info-label { color: rgba(255, 255, 255, 0.55); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 5px; }
.sub-card-info-value { color: #fff; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; word-break: break-all; }
.sub-card-progress-text { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255, 255, 255, 0.7); font-weight: 600; margin-bottom: 6px; }
.sub-card-progress-bar { height: 6px; background: rgba(0, 0, 0, 0.3); border-radius: 3px; overflow: hidden; }
.sub-card-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-3), var(--accent-2)); border-radius: 3px; transition: width 0.5s ease; }

/* ===== INFO LIST ===== */
.info-list { display: flex; flex-direction: column; gap: 0; }
.info-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.info-item:last-child { border-bottom: none; }
.info-item-left { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.info-item-left svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.info-item-value { text-align: right; word-break: break-all; font-weight: 600; font-size: 13px; color: var(--text); }

/* ===== COINS ===== */
.coin-hero {
  background: radial-gradient(ellipse at top, rgba(251, 191, 36, 0.1), transparent 60%), var(--card);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-bottom: 16px;
}
.coin-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.8px; font-weight: 700; margin-bottom: 10px; }
.coin-value {
  font-size: 54px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #fde68a, var(--gold), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}
.coin-value svg { width: 42px; height: 42px; fill: var(--gold); }
.coin-sub { color: var(--muted); font-size: 13px; margin-top: 12px; }
.coin-sub b { color: var(--accent-3); }
.coin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 22px; }
.coin-stat { background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 12px; }
.coin-stat .label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; }
.coin-stat .value { font-size: 17px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.coin-stat .value.gold { color: var(--gold); }

/* ===== HISTORY ===== */
.history-list { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.history-item { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13px; gap: 10px; }
.history-item:last-child { border-bottom: none; }
.history-item .reason { color: var(--text); font-weight: 600; }
.history-item .reason-sub { color: var(--muted-2); font-size: 11px; margin-top: 2px; }
.history-item .amount { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.history-item .amount.plus { color: var(--gold); }
.history-item .amount.minus { color: #fca5a5; }

/* ===== SLOT ===== */
.slot-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; max-width: 560px; margin: 0 auto 16px; text-align: center; }
.slot-window { background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2)); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 40px 20px; margin-bottom: 18px; min-height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.slot-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.8px; color: var(--muted); margin-bottom: 12px; font-weight: 700; }
.slot-prize { font-size: 26px; font-weight: 900; background: linear-gradient(135deg, #fff, var(--accent-3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.2; }
.slot-prize.idle { opacity: 0.5; font-weight: 600; font-size: 16px; }
.slot-prize.win { animation: slotWin 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes slotWin { 0% { transform: scale(0.4); opacity: 0; } 55% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.slot-duration { font-size: 13px; color: var(--accent-3); margin-top: 8px; font-weight: 700; min-height: 18px; font-variant-numeric: tabular-nums; }
.slot-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.slot-buttons .btn { flex: 1; min-width: 140px; }
.slot-cooldown { font-size: 12px; color: var(--muted); margin-top: 12px; min-height: 16px; }

/* ===== PLANS ===== */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.plan { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 22px; display: flex; flex-direction: column; position: relative; transition: all 0.2s; }
.plan:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.plan.featured { border-color: var(--accent); background: linear-gradient(160deg, rgba(30, 58, 138, 0.3), var(--card)); box-shadow: 0 12px 40px var(--accent-glow-soft); }
.plan-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 10px; font-weight: 800; padding: 5px 14px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.8px; }
.plan h3 { font-size: 20px; font-weight: 800; margin-bottom: 5px; text-align: center; }
.plan-desc { color: var(--muted); font-size: 12px; text-align: center; margin-bottom: 18px; min-height: 32px; }
.plan-price { text-align: center; margin-bottom: 20px; }
.plan-price .amount { font-size: 32px; font-weight: 900; letter-spacing: -1px; background: linear-gradient(135deg, #fff, var(--accent-3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.plan-price .period { color: var(--muted); font-size: 12px; margin-top: 3px; }
.plan ul { list-style: none; margin-bottom: 22px; flex-grow: 1; }
.plan ul li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.plan ul li:last-child { border-bottom: none; }
.plan ul li svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; stroke: var(--accent-3); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.plan-buttons { display: flex; flex-direction: column; gap: 8px; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6, 11, 22, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  margin: auto;
  animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.modal h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.modal .modal-sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.modal-actions .btn { flex: 1; }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--card-hover); color: var(--text); }
.modal-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.code-box {
  background: linear-gradient(160deg, rgba(34, 158, 217, 0.15), rgba(34, 158, 217, 0.05));
  border: 1px solid rgba(34, 158, 217, 0.4);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  margin-bottom: 16px;
  text-align: center;
}
.code-box .code-label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1.8px; font-weight: 800; margin-bottom: 6px; }
.code-box .code-value { font-family: 'Consolas', monospace; font-size: 32px; font-weight: 900; letter-spacing: 6px; color: #229ED9; user-select: all; cursor: pointer; line-height: 1; }
.code-box .code-hint { font-size: 11px; color: var(--muted); margin-top: 8px; }
.code-box .code-hint a { color: #229ED9; font-weight: 700; cursor: pointer; }

/* ===== CUSTOMIZATION ===== */
.custom-group { margin-bottom: 18px; }
.custom-group:last-child { margin-bottom: 0; }
.custom-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.custom-options { display: flex; gap: 8px; flex-wrap: wrap; }

.color-opt { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform 0.15s, border-color 0.15s; }
.color-opt:hover { transform: scale(1.1); }
.color-opt.selected { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); }
.color-opt.c-default { background: linear-gradient(135deg, #fff, #60a5fa); }
.color-opt.c-pink { background: linear-gradient(135deg, #fbcfe8, #ec4899); }
.color-opt.c-blue { background: linear-gradient(135deg, #bae6fd, #3b82f6); }
.color-opt.c-cyan { background: linear-gradient(135deg, #a5f3fc, #06b6d4); }
.color-opt.c-gold { background: linear-gradient(135deg, #fde68a, #f59e0b); }
.color-opt.c-emerald { background: linear-gradient(135deg, #a7f3d0, #10b981); }
.color-opt.c-red { background: linear-gradient(135deg, #fecdd3, #f43f5e); }
.color-opt.c-rainbow { background: linear-gradient(135deg, #f43f5e, #fbbf24, #4ade80, #22d3ee, #8b5cf6, #f43f5e); background-size: 400% 400%; animation: rainbowShift 4s linear infinite; }

.frame-opt { width: 44px; height: 44px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; display: flex; align-items: center; justify-content: center; transition: transform 0.15s, border-color 0.15s; background: var(--bg); }
.frame-opt:hover { transform: scale(1.06); }
.frame-opt.selected { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); }
.frame-opt-inner { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(6, 182, 212, 0.3)); }
.frame-opt.f-none .frame-opt-inner { border: 2px solid var(--border-strong); }
.frame-opt.f-glow .frame-opt-inner { border: 2px solid var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.frame-opt.f-gold .frame-opt-inner { border: 2px solid transparent; background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(135deg, #fde68a, #fbbf24) border-box; }
.frame-opt.f-rainbow .frame-opt-inner { border: 2px solid transparent; background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(135deg, #f43f5e, #fbbf24, #4ade80, #22d3ee, #8b5cf6) border-box; }
.frame-opt.f-fire .frame-opt-inner { border: 2px solid transparent; background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(135deg, #fbbf24, #ef4444, #f97316) border-box; }
.frame-opt.f-ice .frame-opt-inner { border: 2px solid transparent; background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(135deg, #a5f3fc, #22d3ee, #3b82f6) border-box; }

.bg-opt { width: 42px; height: 30px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: transform 0.15s, border-color 0.15s; }
.bg-opt:hover { transform: scale(1.06); }
.bg-opt.selected { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); }
.bg-opt.b-default { background: linear-gradient(135deg, #131c33, #0d1425); }
.bg-opt.b-purple { background: linear-gradient(135deg, #4c1d95, #2e1065); }
.bg-opt.b-pink { background: linear-gradient(135deg, #9d174d, #500724); }
.bg-opt.b-blue { background: linear-gradient(135deg, #1e40af, #172554); }
.bg-opt.b-cyan { background: linear-gradient(135deg, #0e7490, #083344); }
.bg-opt.b-gold { background: linear-gradient(135deg, #92400e, #451a03); }
.bg-opt.b-emerald { background: linear-gradient(135deg, #047857, #022c22); }

.icon-opt { width: 38px; height: 38px; border-radius: 8px; border: 2px solid transparent; background: var(--bg); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--muted); transition: transform 0.15s, border-color 0.15s; font-family: inherit; }
.icon-opt:hover { transform: scale(1.06); color: var(--text); }
.icon-opt.selected { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); color: var(--accent-3); }
.icon-opt svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  z-index: 2000;
  max-width: 90vw;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.toast.success { border-color: var(--success); }
.toast.success::before { background: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.error::before { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }

/* ===== MOBILE ===== */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 101;
  width: 42px; height: 42px;
  border-radius: var(--radius-xs);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.mobile-menu-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 99; backdrop-filter: blur(4px); }
.sidebar-overlay.open { display: block; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 70px 20px 40px; }
  .mobile-menu-btn { display: flex; }
  .page-title { font-size: 22px; }
  .profile-hero { flex-direction: column; text-align: center; }
  .profile-nickname { justify-content: center; }
  .profile-meta { justify-content: center; }
  .profile-badges { justify-content: center; }
}
@media (max-width: 480px) {
  .main { padding: 68px 14px 32px; }
  .modal { padding: 22px; }
  .sub-card-body { grid-template-columns: 1fr; }
}
