:root {
  --bg: rgb(0,139,139);
  --card-bg: rgba(255,255,255,0.1);
  --text: #ffffff;
  --muted: rgba(255,255,255,0.95);
  --small: rgba(255,255,255,0.8);
  --gap: 12px;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif; }

body {
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 12px;
}

.page {
  width: 100%;
  max-width: 390px; /* под ширину устройства */
  text-align: center;
}

.title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.title::after {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  margin: 12px auto 0 auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

.card {
  border: #ffffff;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, background 0.15s ease;
  cursor: pointer
}

.card:active {
  transform: scale(0.96);
  background: rgba(255,255,255,0.15);
}

.card:hover {
  transform: scale(1.1);
  background: rgba(255,255,255,0.3);
  
}


.card i {
  font-size: 38px;
  color: var(--text);
  margin-bottom: 8px;
}

.label {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
  color: rgb(181, 233, 8);
}

.hint {
  font-size: 11px;
  color: var(--small);
  line-height: 1.3;
  max-width: 90%;
}

.ps-text {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  margin-top: 16px;
  line-height: 1.4;
  text-align: center;
}

.bottom-cloud {
  display: block;
  margin: 16px auto 0 auto;
  width: 90%;
  max-width: 360px;
  height: 60px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: pulse 2s infinite ease-in-out;
}


#initDataOutput {
  margin: 20px;
  padding: 10px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 14px;
  color: black;   /* вот это добавь */
}


@keyframes pulse {
  0%, 100% { transform: scale(1.05); }
  50% { transform: scale(0.9); }
}

@media (max-width: 390px), (max-height: 660px) {
  body {
    padding: env(safe-area-inset-top, 8px) 6px 12px 6px;
  }

  .page {
    max-width: 100%;
    padding: 0 6px;
  }

  .title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .title::after {
    height: 2px;
    margin: 8px auto 0 auto;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .card {
    padding: 10px 6px;
  }

  .card i {
    font-size: 28px;
    margin-bottom: 6px;
  }

  .label {
    font-size: 14px;
    margin-bottom: 1px;
  }

  .hint, .ps-text {
    font-size: 10px;
  }

  .bottom-cloud {
    height: 50px;
    max-width: 90%;
  }
}



