
:root {
  --primary: #efd005;
  --primary-2: #f7dc21;
  --black: #000000;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #dddddd;
  --gray-400: #bbbbbb;
  --gray-500: #999999;
  --gray-600: #666666;
  --gray-700: #202020;
  --gray-800: #111111;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #f59e0b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --max-width: 480px;
  --header-height: 58px;
  --bottom-nav-height: 68px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--black);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.light-page { background: var(--black); }
a { color: var(--primary); text-decoration: none; }
p { line-height: 1.5; color: var(--gray-300); }
ul { margin: 0; padding-left: 20px; }
strong { font-weight: 700; color: var(--white); }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 16px;
}
.auth-shell, .dashboard-shell { padding-top: 24px; padding-bottom: 24px; }
.app-shell {
  max-width: var(--max-width);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--black);
  position: relative;
}
.has-app-nav { padding-top: calc(var(--header-height) + 16px); padding-bottom: calc(var(--bottom-nav-height) + 18px); }

/* Header / nav */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: var(--max-width);
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--black);
  border-bottom: 1px solid var(--gray-700);
  z-index: 50;
}
.logo, .brand-logo {
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
}
.header-actions { display: flex; gap: 10px; align-items: center; }
.top-link { color: var(--gray-300); font-size: 13px; font-weight: 700; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--gray-700); background: transparent; color: var(--white); cursor: pointer;
}
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: var(--max-width);
  height: var(--bottom-nav-height);
  margin: 0 auto;
  background: var(--black);
  border-top: 1px solid var(--gray-700);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
}
.bottom-nav-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 700;
  border: 0;
  background: transparent;
  text-decoration: none;
}
.bottom-nav-item.active, .bottom-nav-item:hover { color: var(--primary); }
.nav-icon { font-size: 20px; line-height: 1; }

/* Cards */
.card {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 16px;
  box-shadow: none;
}
.card h1, .card h2, .card h3 { color: var(--white); }
.card-title { font-size: 18px; font-weight: 800; color: var(--white); }
.card-subtitle { font-size: 13px; color: var(--gray-500); margin-top: 3px; }
.card-header, .item-header, .nav-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

/* Landing */
.landing-shell { padding-top: 32px; padding-bottom: 32px; }
.hero, .landing-hero {
  min-height: 42vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, rgba(239,208,5,0.18), rgba(239,208,5,0.04));
  border: 1px solid rgba(239,208,5,0.35);
}
.hero h1, .landing-hero h1, h1 {
  font-size: 30px;
  margin: 0 0 8px;
  color: var(--white);
  letter-spacing: -0.6px;
}
.landing-hero .brand, .hero .brand { color: var(--primary); }
.lead { font-size: 17px; line-height: 1.6; margin: 10px 0 0; color: var(--gray-300); }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.stack-list { display: grid; gap: 12px; }
.info-row { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; color: var(--gray-300); }
.info-row strong { color: var(--primary); }

/* Auth */
.auth-page, .auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo h1 { font-size: 36px; font-weight: 900; color: var(--primary); margin: 0; }
.auth-logo p { margin: 6px 0 0; font-size: 14px; color: var(--gray-500); }
.auth-card { margin-top: 0; }
.auth-footer { text-align: center; color: var(--gray-500); font-size: 14px; margin-top: 20px; }

/* Forms */
form { display: grid; gap: 12px; margin-top: 18px; }
label, .form-label {
  display: block;
  color: var(--gray-400);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: -4px;
}
input, select, textarea,
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-600);
  background: var(--gray-700);
  color: var(--white);
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
input::placeholder, textarea::placeholder { color: var(--gray-500); }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(239,208,5,0.15);
}
textarea { min-height: 100px; resize: vertical; }
.form-card { gap: 12px; }
.inline-form { margin: 0; display: inline-block; }
.inline-form button { width: auto; min-width: 120px; }

/* Buttons */
button, .button-link, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 0;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  text-align: center;
}
button, .button-link.primary, .btn-primary {
  background: var(--primary);
  color: var(--black);
}
.button-link.secondary, .btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.button-link.disabled {
  background: var(--gray-700);
  color: var(--gray-500);
  border: 1px solid var(--gray-600);
  cursor: not-allowed;
}
button:hover, .button-link:hover { opacity: 0.94; }
.danger-card .pill { background: rgba(220,38,38,0.18); color: #fecaca; }

/* Alerts / status */
.alert { padding: 12px 14px; border-radius: var(--radius-md); margin: 16px 0; border: 1px solid transparent; }
.alert.success { background: rgba(22,163,74,0.15); color: #bbf7d0; border-color: rgba(22,163,74,0.35); }
.alert.error { background: rgba(220,38,38,0.15); color: #fecaca; border-color: rgba(220,38,38,0.35); }
.text-warning { color: #fcd34d; }
.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(239,208,5,0.14);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

/* Dashboard */
.dashboard-hero, .welcome-banner {
  display: grid;
  gap: 16px;
  background: linear-gradient(135deg, rgba(239,208,5,0.18), rgba(239,208,5,0.05));
  border-color: rgba(239,208,5,0.34);
}
.dashboard-meta { display: grid; gap: 6px; }
.dashboard-meta p { margin: 0; }
.dashboard-grid { display: grid; gap: 14px; margin-top: 16px; }
.nav-card { color: inherit; text-decoration: none; display: block; }
.nav-card h2 { margin: 0; font-size: 18px; }
.nav-card p { margin-bottom: 0; }
.nav-card:hover { transform: translateY(-1px); transition: transform 0.15s ease; }
.summary-number { font-size: 28px; font-weight: 900; margin: 0; color: var(--primary); }
.match-summary-grid { margin-top: 18px; margin-bottom: 18px; }
.match-section { margin-top: 24px; }
.match-section h2 { margin-bottom: 12px; }

/* Lists / profile */
.list-stack { display: grid; gap: 14px; margin-top: 16px; }
.item-card h2, .item-card h3 { margin: 0; font-size: 17px; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.profile-mini { display: flex; gap: 14px; align-items: center; }
.profile-mini-top { align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--gray-700); border: 1px solid var(--gray-600); }
.avatar-large { width: 84px; height: 84px; }

/* Install */
.install-card[hidden] { display: none; }

@media (max-width: 480px) {
  .hero-actions { grid-template-columns: 1fr; }
  .item-header, .nav-card-top { flex-direction: column; }
  .action-row { flex-direction: column; }
  .action-row .button-link, .action-row button, .inline-form, .inline-form button { width: 100%; }
}
@media (min-width: 700px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
