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

:root {
  --bg: #070b12;
  --bg-2: #08122a;
  --screen: #0a1429;
  --screen-2: #070f1f;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.24);
  --line-strong: rgba(148, 163, 184, 0.4);
  --pill-bg: rgba(11, 26, 49, 0.74);
  --pill-hover: rgba(22, 43, 76, 0.86);
  --btn-bg: rgba(12, 25, 46, 0.88);
  --btn-hover: rgba(27, 48, 78, 0.92);
  --primary: #34d3ff;
  --primary-2: #4f8dff;
  --danger: #fb7185;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.phone-shell-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background:
    radial-gradient(1100px 560px at -12% -16%, rgba(52, 211, 255, 0.18), transparent 64%),
    radial-gradient(980px 640px at 112% -12%, rgba(79, 141, 255, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #05070c 100%);
  color: var(--text);
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.phone-shell {
  width: min(100%, 390px);
}

.iphone-frame {
  width: 100%;
  height: min(844px, calc(100vh - 24px));
  background: #04070d;
  border-radius: 47px;
  padding: 11px;
  box-shadow: 0 28px 68px -24px rgba(0, 0, 0, 0.8);
}

.iphone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 39px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    radial-gradient(120% 92% at 0% -10%, rgba(52, 211, 255, 0.12), transparent 58%),
    radial-gradient(90% 82% at 100% 0%, rgba(79, 141, 255, 0.1), transparent 58%),
    linear-gradient(180deg, var(--screen) 0%, var(--screen-2) 100%);
}

.iphone-screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 47px;
  background: #000;
  z-index: 2;
}

.iphone-screen::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 126px;
  height: 37px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: #000;
  z-index: 4;
}

.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  z-index: 5;
}

.status-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.96;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fff;
}

.screen-scroll {
  flex: 1;
  overflow: auto;
  padding: 58px 14px 18px;
}

.screen-scroll::-webkit-scrollbar {
  width: 6px;
}

.screen-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}

.home-indicator {
  width: 134px;
  height: 5px;
  border-radius: 999px;
  margin: 8px auto 4px;
  background: rgba(255, 255, 255, 0.88);
  flex-shrink: 0;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.app-title {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.app-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--pill-bg);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.pill:hover {
  border-color: var(--line-strong);
  background: var(--pill-hover);
}

.card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.46);
  box-shadow: 0 14px 28px -26px rgba(0, 0, 0, 0.8);
}

.card-head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-body {
  padding: 14px 16px 16px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  appearance: none;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--btn-bg);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.14s ease;
}

.btn:hover {
  border-color: var(--line-strong);
  background: var(--btn-hover);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.btn.primary {
  color: #06131f;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
}

.btn.primary:hover {
  background: linear-gradient(135deg, #6de3ff 0%, #6aa2ff 100%);
}

.btn.danger {
  color: #ffe4e8;
  border-color: rgba(251, 113, 133, 0.42);
  background: rgba(190, 24, 93, 0.2);
}

.btn.danger:hover {
  background: rgba(190, 24, 93, 0.28);
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.66);
  color: #f8fafc;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
}

input,
select {
  min-height: 40px;
  padding: 0 12px;
}

textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(109, 203, 255, 0.68);
  box-shadow: 0 0 0 2px rgba(52, 211, 255, 0.18);
}

@media (max-width: 420px) {
  body.phone-shell-page {
    padding: 0;
  }

  .phone-shell {
    width: 100%;
  }

  .iphone-frame {
    border-radius: 0;
    height: 100vh;
    padding: 0;
    box-shadow: none;
  }

  .iphone-screen {
    border-radius: 0;
    border: none;
  }

  .iphone-screen::before {
    border-radius: 0;
  }
}
