/* BASE.CSS - Variables & Reset */
:root {
  --bg-1: #0a0a0f;
  --bg-2: #12121a;
  --bg-3: #1a1a25;
  --bg-card: #16161f;
  --text-1: #f0f0f5;
  --text-2: #a0a0b0;
  --text-3: #606070;
  --accent: #ef4444;
  --accent-2: #00d4ff;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --border: #2a2a35;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

[data-theme="light"] {
  --bg-1: #f5f7fa;
  --bg-2: #ffffff;
  --bg-3: #eef1f5;
  --bg-card: #ffffff;
  --text-1: #1a1a2e;
  --text-2: #4a4a5a;
  --text-3: #7a7a8a;
  --border: #dde0e5;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-1);
  color: var(--text-1);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 70px;
}
a { color: var(--accent-2); text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Header */
.top-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  position: relative;
  background: linear-gradient(90deg, var(--accent), #ff6b6b, #ee5a24, #ff4757, var(--accent));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: liquidLogo 4s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.3));
}
.logo::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), #ff6b6b, var(--accent), transparent);
  background-size: 200% 100%;
  animation: liquidLogoLine 3s ease-in-out infinite;
  border-radius: 2px;
  opacity: 0.7;
}
@keyframes liquidLogo {
  0% { background-position: 0% 50%; filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.3)); }
  25% { background-position: 50% 50%; filter: drop-shadow(0 0 12px rgba(255, 107, 107, 0.4)); }
  50% { background-position: 100% 50%; filter: drop-shadow(0 0 16px rgba(238, 90, 36, 0.5)); }
  75% { background-position: 50% 50%; filter: drop-shadow(0 0 12px rgba(255, 71, 87, 0.4)); }
  100% { background-position: 0% 50%; filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.3)); }
}
@keyframes liquidLogoLine {
  0% { background-position: -200% 0; opacity: 0.4; }
  50% { opacity: 0.9; }
  100% { background-position: 200% 0; opacity: 0.4; }
}
.main-nav {
  flex: 1;
  overflow: hidden;
}
.nav-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 0;
}
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
}
.nav-link:hover { background: var(--bg-3); color: var(--text-1); }
.nav-link.active { background: var(--accent); color: #fff; }
.nav-link svg { flex-shrink: 0; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.theme-btn {
  width: 36px;
  height: 36px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
}
[data-theme="dark"] .moon { display: none; }
[data-theme="light"] .sun { display: none; }
.user-link {
  padding: 6px 12px;
  background: var(--bg-3);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
}
.btn-login, .btn-register {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
}
.btn-login { color: var(--text-2); }
.btn-register { background: var(--accent); color: #fff; }

/* Main */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* Footer */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 60px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.footer-links a { color: var(--text-2); font-size: 13px; }
.footer-links a:hover { color: var(--accent-2); }
.copyright { color: var(--text-2); font-size: 12px; margin-bottom: 4px; }
.disclaimer { color: var(--text-3); font-size: 11px; }

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 8px 0;
  z-index: 100;
}
.mnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px;
  color: var(--text-3);
  font-size: 10px;
}
.mnav-item.active { color: var(--accent); }

@media (max-width: 768px) {
  .top-header .nav-link span { display: none; }
  .btn-login, .btn-register { display: none; }
  .mobile-nav { display: flex; }
  .site-footer { margin-bottom: 70px; }
  body { padding-bottom: 80px; }
}

/* Toast */
#toast {
  position: fixed;
  top: 70px;
  right: 16px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateX(120%);
  transition: transform 0.3s;
  z-index: 1000;
  font-size: 14px;
}
#toast.show { transform: translateX(0); }
#toast.success { border-color: var(--success); }
#toast.error { border-color: var(--error); }
