/* ==========================================================================
   AldoCode Modern Developer Web Platform Stylesheet
   Clean, Professional, SaaS & Developer-focused UI
   ========================================================================== */

:root {
  --bg-body: #0a0e17;
  --bg-navbar: rgba(10, 14, 23, 0.85);
  --bg-card: #111827;
  --bg-card-hover: #162032;
  --bg-surface: #1e293b;
  --bg-input: #0f172a;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-focus: #3b82f6;

  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-light: rgba(59, 130, 246, 0.12);
  --color-indigo: #6366f1;
  --color-purple: #8b5cf6;
  --color-emerald: #10b981;
  --color-amber: #f59e0b;
  --color-rose: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, "Courier New", monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 24px rgba(59, 130, 246, 0.2);

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-navbar);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.brand-text-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.4px;
  background: linear-gradient(180deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Nav Links Desktop */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  border-color: rgba(59, 130, 246, 0.25);
  font-weight: 600;
}

/* Right Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-upload-nav {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: var(--transition);
}

.btn-upload-nav:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.auth-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 15px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: var(--border-hover);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background-color: var(--color-primary);
  color: #ffffff;
  border: 1px solid transparent;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* User Profile Nav Dropdown */
.user-menu-wrapper {
  position: relative;
}

.user-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.user-nav-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-hover);
}

.user-nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--bg-surface);
}

.user-nav-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 230px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 1000;
  animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-dropdown.open {
  display: block;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-user-info {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 6px;
}

.dropdown-user-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.dropdown-user-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-item:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.06);
}

.dropdown-item.danger:hover {
  color: var(--color-rose);
  background-color: rgba(239, 68, 68, 0.1);
}

/* Hamburger button for mobile */
.hamburger-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background-color: var(--bg-navbar);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 18px 20px 24px;
  z-index: 99;
}

.mobile-nav-drawer.open {
  display: block;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
}

.mobile-nav-link.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  font-weight: 600;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-wrapper {
  flex: 1;
  padding: 32px 0 60px;
}

.page-view {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.page-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
  position: relative;
  text-align: center;
  padding: 48px 20px 42px;
  background: radial-gradient(ellipse at 50% -20%, rgba(59, 130, 246, 0.2) 0%, rgba(10, 14, 23, 0) 70%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  margin-bottom: 36px;
  overflow: hidden;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.8px;
  max-width: 820px;
  margin: 0 auto 16px;
  background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Quick Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.stat-icon-wrap.blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.stat-icon-wrap.indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.stat-icon-wrap.emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Page Header */
.page-head {
  margin-bottom: 28px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.page-desc {
  font-size: 15px;
  color: var(--text-muted);
}

/* ==========================================================================
   Filter & Search Toolbar
   ========================================================================== */
.toolbar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.search-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.app-input {
  width: 100%;
  height: 44px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 16px 0 42px;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.app-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.app-select {
  height: 44px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 34px 0 14px;
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: var(--transition);
}

.app-select:focus {
  border-color: var(--border-focus);
}

/* ==========================================================================
   Snippet Cards Grid
   ========================================================================== */
.snippets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.snippet-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.snippet-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.snippet-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.snippet-author-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}

.snippet-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background-color: var(--bg-surface);
}

.snippet-author-text {
  display: flex;
  flex-direction: column;
}

.snippet-author-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.badge-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-tag.js { background: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.3); }
.badge-tag.ts { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-tag.py { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-tag.html { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-tag.css { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-tag.json { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.3); }

.snippet-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.snippet-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.snippet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  gap: 12px;
}

.snippet-metrics {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.metric-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-action-icon {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-action-icon:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.btn-action-icon.active-like {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.btn-action-icon.active-dislike {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-view-snippet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-view-snippet:hover {
  background-color: #334155;
  border-color: var(--border-hover);
}

/* ==========================================================================
   Clean Modern Empty State Component
   ========================================================================== */
.empty-state-box {
  background-color: var(--bg-card);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-xl);
  padding: 56px 24px;
  text-align: center;
  margin: 12px 0;
}

.empty-state-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-xl);
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.empty-state-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 20px;
  line-height: 1.55;
}

/* ==========================================================================
   Forms & Card Containers
   ========================================================================== */
.card-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.code-editor-textarea {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  tab-size: 2;
  min-height: 220px;
  resize: vertical;
  background-color: #0d1117;
  border-color: rgba(255, 255, 255, 0.12);
}

.form-help {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}

.notice-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 13.5px;
}

.notice-banner.info {
  background-color: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.notice-banner.warn {
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fde68a;
}

/* ==========================================================================
   Leaderboard / Kreator Ranking
   ========================================================================== */
.gamification-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.badge-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-icon-circ {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.creators-table {
  width: 100%;
  border-collapse: collapse;
}

.creators-table th {
  text-align: left;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
}

.creators-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.creators-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   Profile Section
   ========================================================================== */
.profile-header-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 28px;
}

.profile-banner {
  height: 120px;
  background: linear-gradient(135deg, #1e293b, #0f172a, #1d4ed8);
}

.profile-body {
  padding: 0 32px 30px;
  position: relative;
}

.profile-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -50px;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-main-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  border: 4px solid var(--bg-card);
  object-fit: cover;
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-md);
}

.profile-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-username {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.profile-bio {
  font-size: 14.5px;
  color: var(--text-main);
  max-width: 650px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.profile-stat-box {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.profile-stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.profile-stat-lbl {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Modals (Centered Web Dialogs)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background-color: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-dialog.large {
  max-width: 860px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.08);
}

.modal-body {
  padding: 24px;
}

/* Modal Tabs (Login / Register) */
.modal-tabs {
  display: flex;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
}

.modal-tab-btn {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.modal-tab-btn.active {
  background-color: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.divider-text {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-dim);
  font-size: 12.5px;
}

.divider-text::before,
.divider-text::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.divider-text span {
  padding: 0 12px;
}

/* Code Viewer in Modal */
.code-viewer-box {
  background-color: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 16px 0;
}

.code-viewer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: #161b22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
  color: var(--text-muted);
}

.code-viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #e6edf3;
  max-height: 480px;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-hover);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast.success { border-left: 4px solid var(--color-emerald); }
.toast.error { border-left: 4px solid var(--color-rose); }
.toast.info { border-left: 4px solid var(--color-primary); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-navbar);
  border-top: 1px solid var(--border-color);
  padding: 32px 0 24px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-link:hover {
  color: var(--text-main);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger-btn { display: block; }
  .btn-upload-nav span.btn-text { display: none; }
  .hero-title { font-size: 28px; }
  .snippets-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .user-nav-name { display: none; }
  .hero-section { padding: 32px 16px; }
  .card-panel { padding: 20px 16px; }
  .profile-body { padding: 0 18px 24px; }
  .profile-avatar-row { margin-top: -40px; }
  .profile-main-avatar { width: 80px; height: 80px; }
}
