/* ==========================================================================
   Modern Design System & Aesthetics for Muse Codes (muse.ygjc.cc)
   ========================================================================== */

:root {
  /* Core HSL Tokens - Light Theme */
  --bg-base: #f8fafc;
  --bg-gradient: radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.12) 0%, rgba(248, 250, 252, 0) 70%),
                 radial-gradient(circle at 100% 40%, rgba(244, 114, 182, 0.08) 0%, rgba(248, 250, 252, 0) 50%);
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --surface-hover: #e2e8f0;
  --border-subtle: rgba(148, 163, 184, 0.25);
  --border-card: rgba(226, 232, 240, 0.8);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  
  --brand-primary: #4f46e5;
  --brand-primary-hover: #4338ca;
  --brand-light: #e0e7ff;
  --brand-accent: #6366f1;

  --badge-good-bg: rgba(34, 197, 94, 0.12);
  --badge-good-fg: #15803d;
  --badge-meh-bg: rgba(234, 179, 8, 0.15);
  --badge-meh-fg: #a16207;
  --badge-bad-bg: rgba(239, 68, 68, 0.12);
  --badge-bad-fg: #b91c1c;

  --status-good: #22c55e;
  --status-meh: #eab308;
  --status-bad: #ef4444;
  --status-fresh: #818cf8;

  --boost-bg: #fef3c7;
  --boost-fg: #b45309;
  --boost-border: #fde68a;

  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --hero-shadow: 0 10px 30px -4px rgba(79, 70, 229, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  --bar-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.14), 0 0 1px 1px rgba(15, 23, 42, 0.04);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: blur(16px);
  --radius-card: 22px;
  --radius-pill: 9999px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-base: #0b0f19;
  --bg-gradient: radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.25) 0%, rgba(11, 15, 25, 0) 70%),
                 radial-gradient(circle at 100% 30%, rgba(217, 70, 239, 0.15) 0%, rgba(11, 15, 25, 0) 50%);
  --surface: #131b2e;
  --surface-subtle: #1c2640;
  --surface-hover: #263353;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.07);

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

  --brand-primary: #6366f1;
  --brand-primary-hover: #818cf8;
  --brand-light: rgba(99, 102, 241, 0.2);
  --brand-accent: #a5b4fc;

  --badge-good-bg: rgba(34, 197, 94, 0.18);
  --badge-good-fg: #4ade80;
  --badge-meh-bg: rgba(234, 179, 8, 0.2);
  --badge-meh-fg: #fde047;
  --badge-bad-bg: rgba(239, 68, 68, 0.2);
  --badge-bad-fg: #f87171;

  --status-good: #4ade80;
  --status-meh: #facc15;
  --status-bad: #f87171;
  --status-fresh: #a5b4fc;

  --boost-bg: rgba(245, 158, 11, 0.18);
  --boost-fg: #fbbf24;
  --boost-border: rgba(245, 158, 11, 0.3);

  --card-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.4);
  --hero-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --bar-shadow: 0 20px 48px -6px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(19, 27, 46, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-base: #0b0f19;
    --bg-gradient: radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.25) 0%, rgba(11, 15, 25, 0) 70%),
                   radial-gradient(circle at 100% 30%, rgba(217, 70, 239, 0.15) 0%, rgba(11, 15, 25, 0) 50%);
    --surface: #131b2e;
    --surface-subtle: #1c2640;
    --surface-hover: #263353;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-card: rgba(255, 255, 255, 0.07);

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

    --brand-primary: #6366f1;
    --brand-primary-hover: #818cf8;
    --brand-light: rgba(99, 102, 241, 0.2);
    --brand-accent: #a5b4fc;

    --badge-good-bg: rgba(34, 197, 94, 0.18);
    --badge-good-fg: #4ade80;
    --badge-meh-bg: rgba(234, 179, 8, 0.2);
    --badge-meh-fg: #fde047;
    --badge-bad-bg: rgba(239, 68, 68, 0.2);
    --badge-bad-fg: #f87171;

    --status-good: #4ade80;
    --status-meh: #facc15;
    --status-bad: #f87171;
    --status-fresh: #a5b4fc;

    --boost-bg: rgba(245, 158, 11, 0.18);
    --boost-fg: #fbbf24;
    --boost-border: rgba(245, 158, 11, 0.3);

    --card-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.4);
    --hero-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --bar-shadow: 0 20px 48px -6px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(19, 27, 46, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
  }
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-base);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header & Navigation Bar */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-brand-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.1));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-brand:hover .nav-brand-icon {
  transform: rotate(6deg) scale(1.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-pill-btn:hover {
  background: var(--surface-hover);
  color: var(--text-main);
  transform: translateY(-1px);
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text-main);
  transform: translateY(-1px);
}

/* Modern Inspiration Orb (Floating Tech Crystal Widget) */
.inspiration-orb {
  position: fixed;
  right: 28px;
  bottom: 96px;
  width: 90px;
  height: 90px;
  z-index: 25;
  cursor: pointer;
  pointer-events: auto;
  transition: var(--transition);
  animation: gemFloat 4s ease-in-out infinite;
}

.inspiration-orb:hover {
  transform: scale(1.1) translateY(-4px);
  filter: drop-shadow(0 12px 28px rgba(99, 102, 241, 0.45));
}

.inspiration-orb svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.orb-glow {
  transform-origin: center;
  animation: orbPulse 3.5s ease-in-out infinite;
}

.orb-sparkle {
  transform-origin: center;
  animation: sparkleTwinkle 2.5s ease-in-out infinite;
}

@keyframes gemFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.15); }
}

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.8; transform: scale(1) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

@media (max-width: 1024px) {
  .inspiration-orb {
    bottom: 86px;
    right: 16px;
    width: 64px;
    height: 64px;
  }
}

/* Compliance Footer Navigation */
.site-footer {
  margin-top: 48px;
  padding: 36px 20px 24px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  font-weight: 500;
}

.footer-nav a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-nav a:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

.footer-acknowledgement {
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.8;
}

.footer-acknowledgement a {
  color: var(--brand-primary);
  text-decoration: underline;
  font-weight: 600;
}

/* Article Images & Typography */
.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
  border-radius: 16px;
  border: 1px solid var(--border-card);
  box-shadow: 0 10px 32px -4px rgba(15, 23, 42, 0.1);
  transition: transform 0.3s ease;
}

.article-content img:hover {
  transform: scale(1.01);
}


/* Main Layout Container */
main.container {
  position: relative;
  z-index: 20;
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 20px 200px;
}

/* Hero Section */
.hero-card {
  position: relative;
  padding: 26px 30px;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--hero-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  transition: var(--transition);
}

.hero-glow-effect {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--brand-accent) 0%, transparent 70%);
  opacity: 0.12;
  pointer-events: none;
  border-radius: 50%;
}

.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--brand-light);
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 600;
}

.hero-num-wrapper {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-num {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--brand-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-unit {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand-primary);
}

.hero-token-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-bump-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--badge-good-bg);
  color: var(--badge-good-fg);
  font-size: 13px;
  font-weight: 700;
  animation: bumpIn 2.5s ease-out forwards;
}

@keyframes bumpIn {
  0% { opacity: 0; transform: translateY(6px); }
  15% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-6px); }
}

.hero-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  flex-wrap: wrap;
  padding-top: 4px;
}

.hero-sub .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-good);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

/* Tabs Bar */
.tabs-container {
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
  background: var(--surface-subtle);
  padding: 5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.tab-btn {
  flex: 1;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn[aria-selected="true"] {
  background: var(--surface);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Active Asks & Owned Codes Widgets */
.ask-widget {
  margin-bottom: 16px;
  padding: 16px 20px;
  background: var(--brand-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.ask-question {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ask-actions {
  display: flex;
  gap: 8px;
}

.ask-btn-yes, .ask-btn-no {
  height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: var(--transition);
}

.ask-btn-yes:hover {
  background: var(--badge-good-bg);
  color: var(--badge-good-fg);
  transform: translateY(-1px);
}

.ask-btn-no:hover {
  background: var(--badge-bad-bg);
  color: var(--badge-bad-fg);
  transform: translateY(-1px);
}

.ask-btn-later {
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
}

.ask-btn-later:hover {
  color: var(--text-main);
}

/* Owned Codes Management Card */
.own-widget {
  margin-bottom: 20px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--card-shadow);
}

.own-header {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.own-item {
  padding: 14px 16px;
  background: var(--surface-subtle);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.own-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.own-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
}

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

.own-btn-close {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.own-btn-close:hover {
  background: var(--surface-hover);
  color: var(--text-main);
}

.own-btn-close.armed {
  background: var(--status-bad);
  color: #fff;
  border-color: var(--status-bad);
}

.share-link-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 4px 16px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  gap: 10px;
}

.share-link-text {
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-link-btn {
  height: 32px;
  padding: 0 14px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--text-main);
  color: var(--surface);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.share-link-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.boost-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 6px 16px;
  background: var(--boost-bg);
  border: 1px solid var(--boost-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--boost-fg);
  font-weight: 500;
}

.boost-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: #f59e0b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
  transition: var(--transition);
}

.boost-btn:hover:not(:disabled) {
  background: #d97706;
  transform: translateY(-1px);
}

.boost-btn:disabled {
  opacity: 0.6;
  cursor: default;
  background: var(--text-faint);
  box-shadow: none;
}

/* Codes List & Cards */
.codes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-label {
  padding: 8px 4px 2px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}

.code-card {
  position: relative;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: var(--transition);
}

.code-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px -4px rgba(15, 23, 42, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
}

.code-card.pinned {
  border-color: var(--brand-accent);
  background: linear-gradient(135deg, var(--surface) 60%, var(--brand-light) 100%);
  box-shadow: 0 6px 24px -2px rgba(99, 102, 241, 0.15);
}

.code-card.pinned::before {
  content: "★ 朋友推荐";
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.code-card.dead {
  opacity: 0.6;
  background: var(--surface-subtle);
}

.code-card.dead .code-text {
  text-decoration: line-through;
  color: var(--text-faint);
}

.code-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.code-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.code-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
}

.copy-btn {
  height: 36px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.copy-btn:hover {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  transform: scale(1.02);
}

.copy-btn.copied {
  background: var(--status-good);
  color: #ffffff;
  border-color: var(--status-good);
}

.code-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.code-votes {
  display: flex;
  gap: 8px;
}

.vote-btn {
  height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
}

.vote-btn:hover {
  background: var(--surface-hover);
  color: var(--text-main);
  transform: translateY(-1px);
}

.vote-btn[aria-pressed="true"] {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.vote-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Empty State */
.empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-card);
  line-height: 1.8;
  font-size: 15px;
}

/* Rules & FAQ Guidelines */
.rules-section {
  margin-top: 48px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
}

.rules-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rules-section h2:first-of-type {
  margin-top: 0;
}

.rules-section ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.rules-section ol li b {
  color: var(--text-main);
}

.rules-footer-fine {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Floating Bottom Composer Island */
.composer-dock {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 20px calc(24px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.composer-form {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.composer-hint {
  min-height: 20px;
  padding-left: 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-primary);
  text-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.composer-island {
  height: 64px;
  padding: 0 10px 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 32px;
  box-shadow: var(--bar-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: var(--transition);
}

.composer-island:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 16px 48px -4px rgba(79, 70, 229, 0.25), 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.composer-icon {
  color: var(--text-faint);
  flex-shrink: 0;
}

.composer-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-main);
  text-transform: uppercase;
}

.composer-input::placeholder {
  color: var(--text-faint);
  letter-spacing: normal;
  font-weight: 400;
  text-transform: none;
}

.composer-submit {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--text-faint);
  transition: var(--transition);
}

.composer-submit.ready {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.composer-submit.ready:hover {
  transform: scale(1.05);
}

/* Modal Bottom Sheet */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.25s ease-out;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet-content {
  width: 100%;
  max-width: 520px;
  padding: 16px 24px calc(28px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  animation: sheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (min-width: 641px) {
  .modal-overlay {
    align-items: center;
  }
  .sheet-content {
    border-radius: 28px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 28px;
  }
}

.sheet-handle {
  align-self: center;
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: var(--surface-subtle);
}

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

.sheet-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 6px;
}

.sheet-share-box {
  padding: 16px;
  background: var(--surface-subtle);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sheet-share-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.sheet-share-url {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-primary);
  word-break: break-all;
}

.sheet-actions {
  display: flex;
  gap: 12px;
}

.sheet-btn-primary {
  flex: 1;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 25px;
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: var(--transition);
}

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

.sheet-btn-secondary {
  flex: 1;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 25px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
}

.sheet-btn-secondary:hover {
  background: var(--surface-hover);
}

.sheet-btn-close {
  height: 40px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.sheet-btn-close:hover {
  color: var(--text-main);
}

/* Toast Message */
.toast-notice {
  position: fixed;
  left: 50%;
  top: 80px;
  transform: translate(-50%, -10px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 120;
  padding: 12px 24px;
  background: var(--text-main);
  color: var(--surface);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  max-width: calc(100% - 32px);
  text-align: center;
}

.toast-notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Mobile Breakpoints */
@media (max-width: 640px) {
  .top-nav {
    padding: 12px 16px;
  }
  .nav-brand {
    font-size: 16px;
  }
  main.container {
    padding: 16px 14px 180px;
  }
  .hero-card {
    padding: 20px 18px;
  }
  .hero-num {
    font-size: 38px;
  }
  .code-card {
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    gap: 14px;
  }
  .code-text {
    font-size: 22px;
  }
  .code-votes {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .vote-btn {
    justify-content: center;
  }
  .ask-widget {
    flex-direction: column;
    align-items: stretch;
  }
  .ask-actions {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
  }
  .composer-dock {
    padding: 0 12px calc(16px + env(safe-area-inset-bottom));
  }
  .composer-island {
    height: 56px;
    padding: 0 8px 0 18px;
  }
}
