/* MPC Tool Menu */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg: #0b0e11;
  --surface: #1e2329;
  --surface-strong: #2b3139;
  --surface-soft: rgba(250, 250, 250, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #ffffff;
  --text-muted: #929aa5;
  --text-subtle: #707a8a;
  --accent: #fcd535;
  --accent-active: #f0b90b;
  --on-accent: #181a20;
  --success: #0ecb81;
  --info: #3b82f6;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
}

body {
  background: radial-gradient(circle at top, rgba(85, 179, 255, 0.07), transparent 28%), var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }

/* ── Header ── */
.menu-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0b0e11;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.menu-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.menu-header-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.menu-header-brand span {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.menu-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-username {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-logout {
  appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.btn-logout:hover {
  background: rgba(255, 99, 99, 0.12);
  color: var(--accent);
  border-color: rgba(255, 99, 99, 0.25);
  transform: translateY(-1px);
}

/* ── Main content ── */
.menu-container {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 48px 32px 64px;
}

.menu-hero {
  margin-bottom: 40px;
}

.menu-hero h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.menu-hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ── Tool grid ── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid rgba(252, 213, 53, 0.12);
  border-radius: 22px;
  padding: 28px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
}

.tool-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.tool-card-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.tool-card-body {
  display: grid;
  gap: 6px;
  flex: 1;
}

.tool-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tool-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.badge-active {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(252, 213, 53, 0.12);
  color: var(--accent);
  border: 1px solid rgba(252, 213, 53, 0.18);
}

.badge-active::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5fc992;
}

.badge-coming-soon {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-subtle);
  border: 1px solid var(--border);
}

.tool-card-arrow {
  font-size: 1.1rem;
  color: var(--text-subtle);
  transition: color 0.2s, transform 0.2s;
}

.tool-card:not(.disabled):hover .tool-card-arrow {
  color: var(--text);
  transform: translateX(3px);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .menu-header {
    padding: 0 16px;
  }

  .header-username {
    display: none;
  }

  .menu-container {
    padding: 32px 16px 48px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }
}
