:root {
  color-scheme: dark;
  --cyan: #00d4ff;
  --green: #00ff87;
  --red: #ff4757;
  --gold: #ffb400;
  --muted: #9ca3af;
}

* { box-sizing: border-box; min-width: 0; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #01060d;
}

body {
  color: white;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.kp-offline {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(1,6,13,0.88) 0%, rgba(1,8,16,0.70) 42%, rgba(1,6,13,0.56) 100%),
    linear-gradient(180deg, rgba(1,6,13,0.10) 0%, rgba(1,6,13,0.42) 100%),
    url('/web-trading-bg.png'),
    radial-gradient(ellipse at 50% 50%, #04101e 0%, #020c18 55%, #01060d 100%);
  background-size: cover, cover, cover, cover;
  background-position: center, center, 58% center, center;
  background-attachment: fixed, fixed, fixed, fixed;
  padding: 32px 18px 40px;
}

.kp-offline::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: rgba(1,6,13,0.18);
}

.kp-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kp-header {
  text-align: center;
  margin-bottom: 4px;
}

.kp-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.kp-logo-mark {
  position: relative;
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  display: grid;
  place-items: center;
  overflow: visible;
  border-radius: 50%;
  animation: kpFloat 4s ease-in-out infinite;
}

.kp-logo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0,212,255,0.55);
}

.kp-logo-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 0 18px rgba(0,212,255,0.28));
}

@keyframes kpFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.kp-logo {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #00d4ff, #a78bfa, #00ff87);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(0,212,255,0.35);
}

.kp-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.kp-version {
  padding: 2px 10px;
  border-radius: 999px;
  margin-right: 8px;
  background: rgba(0,212,255,0.12);
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,0.4);
  font-weight: 700;
}

.kp-tech {
  padding: 16px 18px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,180,0,0.10), rgba(255,180,0,0.04));
  border: 1px solid rgba(255,180,0,0.4);
  backdrop-filter: blur(8px);
}

.kp-tech[hidden] { display: none; }

.kp-tech-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold);
}

.kp-tech-desc {
  font-size: 13px;
  color: #fff;
  opacity: 0.85;
  margin-top: 6px;
  white-space: pre-wrap;
}

.kp-demo {
  padding: 22px;
  border-radius: 16px;
  gap: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(0,212,255,0.02));
  border: 1px solid rgba(0,212,255,0.4);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 40px rgba(0,212,255,0.08);
}

.kp-demo-mexc {
  background: linear-gradient(135deg, rgba(0,212,255,0.10), rgba(0,255,135,0.035));
  border-color: rgba(0,212,255,0.45);
}

.kp-demo-left { min-width: 0; flex: 1 1 430px; }
.kp-demo-right { text-align: right; flex: 0 1 300px; }

.kp-label {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

.kp-balance {
  font-size: 30px;
  font-weight: 900;
  color: white;
  margin-top: 4px;
}

.kp-balance-start {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-left: 10px;
}

.kp-profit {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
}

.kp-profit.pos { color: var(--green); text-shadow: 0 0 22px rgba(0,255,135,0.45); }
.kp-profit.neg { color: var(--red); text-shadow: 0 0 22px rgba(255,71,87,0.45); }
.kp-profit-pct { font-size: 13px; font-weight: 700; color: var(--green); }

.kp-siri-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 14px;
  margin-top: 2px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.kp-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 9px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
}

.kp-stat-label {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kp-stat-value {
  font-weight: 700;
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}

.pos { color: var(--green); }
.neg { color: var(--red); }
.warn { color: var(--gold); }
.cyan { color: var(--cyan); }
.muted { color: var(--muted); }

.kp-footer {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  margin-top: 16px;
  display: grid;
  gap: 6px;
}

.kp-footer a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 700;
}

.kp-footer a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .kp-offline {
    padding: 18px 12px 28px;
    background-attachment: scroll, scroll, scroll, scroll;
    background-position: center, center, 65% top, center;
  }
  .kp-brand { gap: 14px; }
  .kp-logo-mark { width: 68px; height: 68px; flex-basis: 68px; }
  .kp-logo { font-size: 26px; letter-spacing: 1.5px; }
  .kp-sub { font-size: 12px; }
  .kp-tech { padding: 12px 14px; }
  .kp-demo {
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .kp-demo-left,
  .kp-demo-right {
    flex: 0 1 auto;
    width: 100%;
  }
  .kp-demo-right {
    text-align: left;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .kp-balance { font-size: 26px; }
  .kp-balance-start { display: block; margin-left: 0; margin-top: 2px; }
  .kp-profit { font-size: 26px; }
  .kp-siri-stats {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding-top: 10px;
  }
  .kp-stat { padding: 6px 8px; }
  .kp-stat-label,
  .kp-stat-value {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 430px) {
  .kp-offline { padding: 14px 10px 22px; }
  .kp-content { gap: 12px; }
  .kp-header { margin-bottom: 0; }
  .kp-brand { gap: 10px; }
  .kp-logo-mark { width: 56px; height: 56px; flex-basis: 56px; }
  .kp-logo { font-size: 22px; letter-spacing: 1px; }
  .kp-sub { margin-top: 4px; }
  .kp-tech { padding: 10px 12px; }
  .kp-demo { padding: 12px; gap: 9px; border-radius: 12px; }
  .kp-balance,
  .kp-profit { font-size: 23px; }
  .kp-profit-pct { display: block; margin-top: 2px; }
  .kp-siri-stats { grid-template-columns: 1fr 1fr; }
}
