@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap");

:root {
  --primary-cyan: #39dcff !important;
  --primary-cyan-bright: #9beeff !important;
  --dark-bg: #070a0e !important;
  --card-bg: #0c1118 !important;
}

* { box-sizing: border-box; }
html { background: #070a0e; }
body {
  min-height: 100vh;
  margin: 0;
  color: #c4d0d8;
  background: #070a0e !important;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(34, 211, 238, .06), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(14, 116, 144, .08), transparent 55%),
    linear-gradient(180deg, #070b10 0%, #0a1017 100%) !important;
  background-attachment: fixed;
  font-family: "IBM Plex Sans", sans-serif !important;
  animation: none !important;
}

#matrix-rain, #particle-field, .scanline-overlay, .grid-overlay, .network-status {
  display: none !important;
}

.status-bar {
  min-height: 38px;
  padding: 0 max(20px, calc((100vw - 1180px)/2)) !important;
  border-bottom: 1px solid #243240 !important;
  color: #7f919e !important;
  background: #080c11 !important;
  box-shadow: none !important;
  font: 700 .62rem "Space Mono", monospace !important;
  letter-spacing: .08em;
}

.shop-header, .downloads-container, .products-page,
.inventory, .inv-header, .inv-howto, .hwid-container {
  width: min(1180px, calc(100% - 40px)) !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
}

body > .container {
  width: min(900px, calc(100% - 40px)) !important;
  max-width: 900px !important;
  margin: 7rem auto 6rem !important;
  padding: clamp(1.5rem, 4vw, 3rem) !important;
  border: 1px solid #385164 !important;
  border-radius: 14px !important;
  background: rgba(12,17,24,.96) !important;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6) !important;
}
body > .container .corner-brackets { display: none !important; }
body > .container .title { font-size: clamp(2.2rem, 5vw, 3.8rem) !important; }
body > .container .subtitle { margin-bottom: 2rem !important; color: #7f919e !important; }
body > .container .links-container {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: none !important;
  background: transparent;
}
body > .container .link-button {
  min-height: 64px !important;
  margin: 0 !important;
  padding: 1rem !important;
  border: 1px solid #243240 !important;
  border-radius: 10px !important;
  color: #c4d0d8 !important;
  background: #0c1118 !important;
  box-shadow: none !important;
  font: 700 .68rem "Space Mono", monospace !important;
  transition: border-color .2s, background .2s, transform .2s !important;
}
body > .container .link-button:hover { color: #071015 !important; background: #39dcff !important; border-color: #39dcff !important; transform: translateY(-2px) !important; }

.shop-header {
  min-height: 100px;
  margin-top: 38px !important;
  padding: 0 !important;
  border-bottom: 1px solid #243240;
}

.shop-title, .title, .hwid-title, .inv-header h1 {
  color: #f2f7fa !important;
  text-shadow: none !important;
  animation: none !important;
  font-family: "IBM Plex Sans", sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -.035em !important;
  text-transform: none !important;
}

.shop-title { font-size: clamp(2rem, 5vw, 3.5rem) !important; }
.terminal-prompt { color: #39dcff; animation: none !important; }

.back-link, .cart-button, .tab-button, .reset-btn, .download-btn,
.checkout-button, .submit-quote-btn, .copy-key-btn, .close-success-btn {
  min-height: 44px;
  border: 1px solid #385164 !important;
  border-radius: 10px !important;
  color: #f2f7fa !important;
  background: #0c1118 !important;
  box-shadow: none !important;
  font: 700 .68rem "Space Mono", monospace !important;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: border-color .2s, background .2s, transform .2s !important;
}

.back-link:hover, .cart-button:hover, .tab-button:hover, .tab-button.active,
.reset-btn:hover, .download-btn:hover, .checkout-button:hover,
.submit-quote-btn:hover {
  color: #071015 !important;
  border-color: #39dcff !important;
  background: #39dcff !important;
  box-shadow: none !important;
  transform: translateY(-2px);
}

.category-tabs {
  width: min(1180px, calc(100% - 40px));
  max-width: 1180px !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  margin: 28px auto !important;
  padding: 0 !important;
}

.products-container { width: min(1180px, calc(100% - 40px)); max-width: 1180px !important; padding: 0 !important; }
.products-grid { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)) !important; gap: 12px !important; background: transparent; }
.product-card, .download-card, .inventory-card, .product-link-card, .device-card {
  border: 1px solid #243240 !important;
  border-radius: 12px !important;
  color: #c4d0d8 !important;
  background: #0c1118 !important;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color .2s, background .2s, transform .2s !important;
}
.product-card:hover, .download-card:hover, .inventory-card:hover, .product-link-card:hover, .device-card:hover {
  background: #101720 !important;
  border-color: #385164 !important;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6) !important;
  transform: translateY(-3px) !important;
}
.product-card::before, .product-card::after { display: none !important; }
.product-name, .download-name, .inventory-card h2, .product-link-card h3 { color: #f2f7fa !important; text-shadow: none !important; }
.product-price, .download-version, .status-available { color: #39dcff !important; text-shadow: none !important; }
.product-description, .download-description { color: #7f919e !important; }

.cart-sidebar, .modal-content {
  border: 1px solid #385164 !important;
  border-radius: 14px !important;
  color: #c4d0d8 !important;
  background: #0c1118 !important;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6) !important;
}
.cart-header, .modal-header, .cart-footer { border-color: #243240 !important; background: #101720 !important; }
.modal-overlay, .cart-overlay { backdrop-filter: blur(8px); background: rgba(3,6,9,.82) !important; }
input, textarea, select, .key-input {
  border: 1px solid #385164 !important;
  border-radius: 10px !important;
  color: #f2f7fa !important;
  background: #080c11 !important;
  box-shadow: none !important;
  font-family: "Space Mono", monospace !important;
}
input:focus, textarea:focus, select:focus, .key-input:focus { border-color: #39dcff !important; outline: 2px solid rgba(57,220,255,.16); }

.downloads-container, .products-page, .hwid-container {
  margin-top: clamp(3rem, 8vw, 7rem) !important;
  margin-bottom: 6rem !important;
  padding: clamp(1.4rem, 4vw, 3rem) !important;
  border: 1px solid #385164 !important;
  border-radius: 14px !important;
  background: rgba(12,17,24,.94) !important;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6) !important;
}
.hwid-container::before { display: none !important; }
.hwid-container { max-width: 720px !important; }
.warning-box, .status-msg { border-radius: 10px !important; box-shadow: none !important; }

.inv-header {
  margin-top: 4rem !important;
  padding: 2rem 0 !important;
  border-bottom: 1px solid #243240 !important;
}
.inventory { padding: 2rem 0 5rem !important; }
.inv-howto { margin-bottom: 6rem !important; border: 1px solid #385164 !important; border-radius: 14px !important; background: #0c1118 !important; box-shadow: 0 20px 50px -20px rgba(0,0,0,.6) !important; }

/* Product detail page */
.product-detail-shell {
  width: min(820px, calc(100% - 40px)) !important;
  max-width: 820px !important;
  margin: clamp(3rem, 8vw, 6rem) auto !important;
}
.product-detail-card {
  padding: clamp(1.5rem, 4vw, 3rem) !important;
  border: 1px solid #385164 !important;
  border-radius: 14px !important;
  color: #c4d0d8 !important;
  background: rgba(12,17,24,.96) !important;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6) !important;
}
.product-detail-kicker {
  color: #39dcff !important;
  font: 700 .68rem "Space Mono", monospace !important;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.product-detail-heading h2 { color: #f2f7fa !important; font-family: "IBM Plex Sans", sans-serif !important; }
.product-detail-heading strong { color: #39dcff !important; font-family: "Space Mono", monospace !important; }
.product-detail-description { color: #9dadb7 !important; }
.product-detail-features i { color: #39dcff !important; }
.product-detail-note {
  border-left: 3px solid #ff9900 !important;
  color: #ffd28a !important;
  background: rgba(255,153,0,.08) !important;
  border-radius: 0 10px 10px 0 !important;
}
.product-detail-buy {
  display: inline-flex !important;
  margin-top: 20px !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  min-height: 44px;
  padding: 0 1.4rem !important;
  border: 1px solid #39dcff !important;
  border-radius: 10px !important;
  color: #071015 !important;
  background: #39dcff !important;
  font: 700 .68rem "Space Mono", monospace !important;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.product-detail-buy:hover { background: #9beeff !important; border-color: #9beeff !important; }
.device-empty { color: #9dadb7 !important; }
.device-empty .buy-button {
  min-height: 44px;
  padding: 0 1.4rem !important;
  border: 1px solid #39dcff !important;
  border-radius: 10px !important;
  color: #071015 !important;
  background: #39dcff !important;
  font: 700 .68rem "Space Mono", monospace !important;
  text-decoration: none !important;
}

/* Success / order-complete page */
.success-container {
  max-width: 600px !important;
  margin: clamp(4rem, 10vw, 7rem) auto !important;
  padding: clamp(1.5rem, 4vw, 3rem) !important;
  border: 1px solid #385164 !important;
  border-radius: 14px !important;
  color: #c4d0d8 !important;
  background: rgba(12,17,24,.96) !important;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6) !important;
  text-align: center;
}
.success-title {
  color: #f2f7fa !important;
  font-family: "IBM Plex Sans", sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -.02em !important;
  text-transform: none !important;
}
.success-title i { color: #39dcff !important; }
.license-box {
  background: #080c11 !important;
  border: 1px solid #385164 !important;
  border-radius: 10px !important;
  padding: 20px !important;
  margin: 20px 0 !important;
  font-family: "Space Mono", monospace !important;
  font-size: 1.1rem !important;
  color: #39dcff !important;
  word-break: break-all;
}
.copy-btn, .download-btn {
  min-height: 44px;
  padding: 0 1.4rem !important;
  border: 1px solid #39dcff !important;
  border-radius: 10px !important;
  color: #071015 !important;
  background: #39dcff !important;
  font: 700 .68rem "Space Mono", monospace !important;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, border-color .2s !important;
}
.copy-btn:hover, .download-btn:hover {
  background: #9beeff !important;
  border-color: #9beeff !important;
  box-shadow: none !important;
}
.error-box { color: #ff6b6b !important; border-color: #ff6b6b !important; }
.loading { color: #39dcff !important; }
.success-note { color: #7f919e !important; }
.success-container .back-link {
  display: inline-block;
  margin-top: 30px;
  color: #39dcff !important;
  text-decoration: none;
  border: 1px solid #39dcff !important;
  border-radius: 10px !important;
  padding: 10px 20px !important;
  font: 700 .68rem "Space Mono", monospace !important;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: background .2s, color .2s !important;
}
.success-container .back-link:hover { background: rgba(57,220,255,.1) !important; }

body > .legal-page, body > main.legal-page { width: min(860px, calc(100% - 40px)); margin: 5rem auto; }
body > .wrap { border-radius: 0 !important; box-shadow: none !important; }
body > .wrap {
  max-width: 860px !important;
  margin: 0 auto !important;
  padding: 5rem 20px !important;
}
body > .wrap h1 { color: #f2f7fa !important; font-size: clamp(2.5rem, 7vw, 4.5rem) !important; letter-spacing: -.04em; }
body > .wrap h2 { margin-top: 2.5rem !important; color: #9beeff !important; font-size: 1.15rem !important; }
body > .wrap p, body > .wrap li { color: #9dadb7; }
body > .wrap a { color: #39dcff; }
body > .wrap .updated { color: #657681 !important; font: .7rem "Space Mono", monospace; text-transform: uppercase; }
body > footer { border-top: 1px solid #243240 !important; color: #657681 !important; background: #080c11 !important; }

@media (max-width: 650px) {
  .status-bar { display: none !important; }
  body { padding-top: 0 !important; }
  .shop-header { margin-top: 0 !important; min-height: 84px; }
  .shop-title { font-size: 1.4rem !important; }
  .back-link span { display: none; }
  .category-tabs { overflow-x: auto; flex-wrap: nowrap !important; }
  .tab-button { white-space: nowrap; }
  body > .container { width: calc(100% - 28px) !important; margin-top: 2rem !important; padding: 1.25rem !important; }
  body > .container .links-container { grid-template-columns: 1fr !important; }
  .products-grid { grid-template-columns: 1fr !important; }

  /* Auth bar: stack the login + Earn Credit buttons full-width, one per row */
  #discord-auth-bar {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    width: calc(100% - 28px) !important;
    max-width: 460px !important;
    margin: 14px auto 0 !important;
    padding: 0 !important;
  }
  #discord-auth-bar > a,
  #discord-auth-bar > button,
  #discord-auth-bar > span {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 !important;
    padding: 13px 12px !important;
    font-size: 14px !important;
    border-radius: 8px;
    box-sizing: border-box;
    text-align: center;
  }
  #discord-auth-bar > a[href^="/api/auth/discord"] {
    background: #5865F2 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 12px rgba(88, 101, 242, .35);
  }
  #discord-auth-bar > a.auth-action-button {
    border-color: #00ffff !important;
    color: #00ffff !important;
    background: rgba(0, 255, 255, .06) !important;
    border-radius: 8px !important;
  }
  #discord-auth-bar > span.auth-credit {
    width: auto !important;
    margin: 0 auto !important;
    background: rgba(68, 227, 154, .1);
    border: 1px solid rgba(68, 227, 154, .4);
    color: #44e39a;
    border-radius: 8px;
    padding: 6px 14px !important;
    font-size: 13px !important;
  }
}
