* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #0d0d0d;
  --surface: #1c1c1e;
  --surface2: #2c2c2e;
  --text: #f2f2f7;
  --text-dim: #8e8e93;
  --green: #00c896;
  --red: #e8372a;
  --gray: #48484a;
  --accent: #0a84ff;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  overscroll-behavior: none;
}

.app {
  max-width: 390px;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: max(env(safe-area-inset-top), 20px) 20px max(env(safe-area-inset-bottom), 28px);
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 28px;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-dim);
}

.info-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--gray);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  text-transform: uppercase;
  padding-left: 4px;
}

.checks {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
}

/* Check card */
.check-card {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.check-card + .check-card {
  border-top: 1px solid var(--surface2);
}

.check-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--gray);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.check-dot.ok {
  background: var(--green);
  box-shadow: 0 0 10px color-mix(in srgb, var(--green) 60%, transparent);
}

.check-dot.fail {
  background: var(--red);
  box-shadow: 0 0 10px color-mix(in srgb, var(--red) 60%, transparent);
}

.check-dot.checking {
  background: var(--gray);
  animation: blink 1.1s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.check-info {
  flex: 1;
}

.check-name {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.2px;
}

.check-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}

.check-status {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Refresh button */
.refresh-btn {
  margin-top: auto;
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: 1.5px solid #00c896;
  background: rgba(0, 200, 150, 0.07);
  color: #00c896;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 0 14px rgba(0, 200, 150, 0.2), inset 0 0 14px rgba(0, 200, 150, 0.04);
  transition: opacity 0.2s;
}

.refresh-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 100;
  align-items: flex-end;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  padding: 24px 24px max(env(safe-area-inset-bottom), 28px);
  max-height: 82svh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--gray);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.platform {
  margin-bottom: 22px;
}

.platform:last-child {
  margin-bottom: 0;
}

.platform h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.platform ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.platform li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.icon-hint {
  font-style: normal;
  color: var(--accent);
}

.divider {
  height: 1px;
  background: var(--surface2);
  margin: 0 0 22px;
}
