/* === Safe-area + header spacing fix === */
:root {
  --header-height: 72px; /* adjust to 64 or 80 if needed */
}

html {
  scroll-padding-top: calc(var(--header-height) + env(safe-area-inset-top));
}

body {
  margin: 0;
  background-color: #0e0e0e;
  color: #d0e8ff;
  font-family: Arial, sans-serif;
  padding-top: calc(var(--header-height) + env(safe-area-inset-top));
}

header {
  background: #1a1a1a;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: env(safe-area-inset-top);
  left: 0;
  right: 0;
  z-index: 1000;
}

header h1 {
  margin: 0;
  color: #55aaff;
}

a {
  color: #55aaff;
  text-decoration: none;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin: 30px auto;
  padding: 0 10px;
}

input,
textarea,
select,
button {
  padding: 10px;
  border-radius: 6px;
  border: none;
  background-color: #222;
  color: white;
  font-size: 14px;
}

button {
  background-color: #3399ff;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background-color: #2288ee;
}

/* Card Grid Like Twitch */
#feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
  padding: 20px;
  justify-items: center;
}

/* Card Style */
.card {
  background: #1e1e1e;
  border-radius: 10px;
  padding: 10px;
  width: 100%;
  max-width: 250px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Image control */
.card img {
  width: 100%;
  height: auto;
  max-height: 160px;
  object-fit: cover;
  border-radius: 6px;
}

/* Card text */
.card h3 {
  margin: 10px 0 5px;
  font-size: 16px;
  color: #55aaff;
  text-align: center;
}

.card p {
  margin: 0 0 5px;
  font-size: 13px;
  text-align: center;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  #feed {
    grid-template-columns: 1fr 1fr;
  }

  .card img {
    max-height: 140px;
  }
}
