/* Fonts: Orbitron (titles), Space Grotesk (body) */
:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #0b0d10; color: #e6eef7; font-family: 'Space Grotesk', system-ui, sans-serif; }

/* Mobile-first: Use bottom nav on small screens; hide topbar by default */
.topbar { display: none; }
.nav { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; }
.nav-left, .nav-right { display: flex; align-items: center; gap: 12px; }
.brand { font-family: 'Orbitron', sans-serif; font-weight: 600; letter-spacing: .5px; color: #e6eef7; text-decoration: none; }
.nav-link { color: #c7d2e1; text-decoration: none; border: 1px solid #223243; padding: 10px 14px; border-radius: 12px; background: #0c1117; }
.nav-link:hover { border-color: #365172; }
.avatar-btn { position: relative; border: 1px solid #223243; padding: 2px; border-radius: 999px; background: #0c1117; width: 40px; height: 40px; cursor: pointer; }
.avatar-btn img { width: 36px; height: 36px; border-radius: 999px; display: block; }
.dropdown { position: absolute; right: 0; top: 46px; min-width: 180px; background: #0c1117; border: 1px solid #223243; border-radius: 12px; padding: 8px; display: none; }
.dropdown a, .dropdown button { width: 100%; text-align: left; padding: 12px 12px; border-radius: 10px; color: #c7d2e1; background: transparent; border: none; cursor: pointer; text-decoration: none; display: block; }
.dropdown a:hover, .dropdown button:hover { background: #0f1620; }

/* Bottom Navigation (mobile) */
.bottom-nav { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; background: rgba(10,12,15,0.85); backdrop-filter: blur(8px); border-top: 1px solid #152231; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px calc(env(safe-area-inset-right, 12px)) calc(env(safe-area-inset-bottom, 10px) + 8px) calc(env(safe-area-inset-left, 12px)); }
.bottom-nav a { text-align: center; color: #c7d2e1; text-decoration: none; border: 1px solid #223243; padding: 10px 8px; border-radius: 12px; background: #0c1117; font-size: 0.95rem; }
.bottom-nav a:active { filter: brightness(1.05); }
.bottom-nav a.active { border-color: #3aa9ff; box-shadow: 0 0 0 2px rgba(58,169,255,0.15) inset; color: #e6f3ff; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: none; z-index: 100; }
.modal { position: relative; width: min(520px, 92vw); margin: 10vh auto; background: #0c1117; border: 1px solid #1f2a3a; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #162131; }
.modal-title { margin: 0; font-family: 'Orbitron', sans-serif; font-size: 1.05rem; letter-spacing: .3px; }
.modal-close { background: transparent; border: none; color: #c7d2e1; font-size: 22px; line-height: 1; cursor: pointer; padding: 6px; border-radius: 8px; }
.modal-close:hover { background: #0f1620; }
.modal-body { padding: 14px; }
.quota-wrap { display: grid; gap: 8px; }
.quota-item { padding: 10px 12px; border: 1px solid #1f2a3a; border-radius: 10px; background: #0b0f14; color: #d6e3f5; }

.hero { position: relative; text-align: center; padding: 64px 16px 24px; }
.hero h1 { font-family: 'Orbitron', sans-serif; font-size: 1.9rem; letter-spacing: 1px; margin: 0; }
.hero .subtitle { margin-top: 8px; color: #c7d2e1; }
.hero .glow { position: absolute; inset: 0; background: radial-gradient(800px 400px at 50% 0%, rgba(0,180,255,0.15), transparent 60%); pointer-events: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px 92px; }
.controls { background: linear-gradient(180deg,#0f1217,#0c0f13); border: 1px solid #1d2633; border-radius: 16px; padding: 18px; box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset; }
.controls label { display: block; margin-top: 8px; margin-bottom: 6px; color: #a9b7c7; font-size: 0.95rem; }
.controls input, .controls select { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid #1e293b; background: #0c1117; color: #e6eef7; outline: none; transition: border .2s, box-shadow .2s; font-size: 1rem; }
.controls input:focus, .controls select:focus { border-color: #3aa9ff; box-shadow: 0 0 0 3px rgba(58,169,255,0.2); }

.actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.btn-primary { flex: 1 1 200px; padding: 14px 18px; border: none; border-radius: 14px; background: linear-gradient(90deg,#2a7bff,#00c2ff); color: white; font-weight: 600; cursor: pointer; box-shadow: 0 0 12px rgba(0,194,255,0.35); transition: transform .08s ease, filter .2s; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { flex: 0 0 auto; padding: 12px 16px; border-radius: 14px; border: 1px solid #263244; background: #0c1117; color: #c7d2e1; cursor: pointer; }
.btn-ghost:hover { border-color: #365172; }

.status { margin-top: 8px; font-size: 0.95rem; color: #a9b7c7; }
.hidden { display: none; }

.results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
.card { background: linear-gradient(180deg,#0f1217,#0b0f14); border: 1px solid #1c2a3a; border-radius: 12px; padding: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; opacity: 0; transform: translateY(8px); animation: fadeIn .5s ease forwards; }
.card .name { font-weight: 600; color: #e8f0fa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy { padding: 8px 10px; border-radius: 10px; border: 1px solid #2b3b52; background: #0c1117; color: #d2deee; cursor: pointer; font-size: 0.9rem; }
.copy:hover { border-color: #3aa9ff; }

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

.share { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.seo { margin-top: 40px; line-height: 1.7; color: #d8e4f3; }
.seo h2 { font-family: 'Orbitron'; letter-spacing: 0.5px; font-size: 1.25rem; margin-top: 28px; color: #e6eef7; }
.footer { text-align: center; padding: 24px 16px; color: #a0b2c7; border-top: 1px solid #142030; }
.footer a { color: #7ecbff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Desktop and larger tablets */
@media (min-width: 768px) {
  /* Show topbar, hide bottom nav */
  .topbar { display: block; position: sticky; top: 0; z-index: 50; background: rgba(10,12,15,0.9); backdrop-filter: blur(8px); border-bottom: 1px solid #152231; }
  .bottom-nav { display: none; }
  .container { padding-bottom: 64px; }
  .nav-link { padding: 8px 12px; border-radius: 10px; }
  .avatar-btn { width: 38px; height: 38px; }
  .avatar-btn img { width: 34px; height: 34px; }
  .results-grid { grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 12px; }
  .hero h1 { font-size: 2.2rem; }
}

/* Very small screens */
@media (max-width: 360px) {
  .results-grid { grid-template-columns: 1fr; }
}
