:root {
  --bg: #0a0e16;
  --bg-elevated: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eaf2fb;
  --text-dim: #b9c6db;
  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, #132132 0%, var(--bg) 55%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Decorative diamond field --- */
.diamond-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  color: var(--accent);
  font-size: 1.4rem;
  opacity: 0;
  animation: twinkle 4s ease-in-out infinite;
  text-shadow: 0 0 12px rgba(125, 211, 252, 0.8);
}

.s1 { top: 18%; left: 28%; animation-delay: 0s; font-size: 1.1rem; }
.s2 { top: 30%; left: 72%; animation-delay: 1.1s; font-size: 1.6rem; }
.s3 { top: 65%; left: 22%; animation-delay: 2.2s; font-size: 1rem; }
.s4 { top: 70%; left: 68%; animation-delay: 0.6s; font-size: 1.3rem; }
.s5 { top: 45%; left: 50%; animation-delay: 1.8s; font-size: 0.9rem; }

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1); }
}

/* --- Layout --- */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  padding: 48px 20px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 40px;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

/* --- Hero diamond illustration --- */
.hero-diamond {
  width: clamp(150px, 32vw, 220px);
  margin: 0 auto 8px;
  filter: drop-shadow(0 0 34px rgba(125, 211, 252, 0.45));
  animation: gem-float 5s ease-in-out infinite;
  perspective: 700px;
}

.hero-diamond-small {
  width: clamp(100px, 22vw, 140px);
  margin: 0 auto 20px;
}

.hero-diamond svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  animation: gem-turn 7s ease-in-out infinite;
  transform-style: preserve-3d;
}

.shimmer {
  fill: rgba(255, 255, 255, 0.9);
  animation: gem-shimmer 5s ease-in-out infinite;
}

@keyframes gem-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes gem-turn {
  0%, 100% { transform: rotateY(-20deg) rotateX(4deg); }
  50% { transform: rotateY(20deg) rotateX(-4deg); }
}

@keyframes gem-shimmer {
  0%, 12% { transform: translateX(0) skewX(-18deg); opacity: 0; }
  4% { opacity: 0.95; }
  22%, 100% { transform: translateX(480px) skewX(-18deg); opacity: 0; }
}

.back-link {
  display: inline-block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 20px;
  transition: color 0.2s ease;
}

.back-link:hover, .back-link:focus-visible {
  color: var(--accent);
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.quote {
  color: var(--text-dim);
  font-size: clamp(0.95rem, 2.4vw, 1.1rem);
  line-height: 1.6;
  margin: 0;
}

/* --- Buttons --- */
.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover, .btn:focus-visible {
  transform: translateY(-2px);
  background: rgba(125, 211, 252, 0.12);
  border-color: rgba(125, 211, 252, 0.5);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.18);
}

.btn-icon {
  font-size: 1.05rem;
}

/* --- Weather card --- */
.weather-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.weather-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.weather-place {
  font-weight: 600;
  font-size: 1.05rem;
}

.weather-updated {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.weather-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 48px;
  flex-wrap: wrap;
}

.weather-loading {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.weather-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.weather-temp {
  font-size: 1.8rem;
  font-weight: 600;
}

.weather-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: left;
}

.weather-desc {
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 480px) {
  .page {
    gap: 32px;
    padding: 36px 16px 48px;
  }

  .btn {
    padding: 11px 18px;
    font-size: 0.9rem;
  }

  .weather-body {
    justify-content: center;
    text-align: center;
  }

  .weather-details {
    align-items: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sparkle, .hero-diamond, .hero-diamond svg, .shimmer {
    animation: none !important;
  }
}
