/* --- General Layout --- */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #fafafa;
  color: #111;
  margin: 0;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;       /* ✅ Centers logo and content horizontally */
  justify-content: flex-start;
  min-height: 100vh;
  box-sizing: border-box;
}

/* --- Logo --- */
.logo {
  width: 120px;
  height: auto;
  margin: 0 auto 1.5rem auto; /* ✅ Ensures it's centered across all browsers */
  display: block;
}

/* --- Title and Subtitle --- */
h1 {
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 0.5rem;
}

.subtitle {
  color: #666;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.4;
}

/* --- Form Layout --- */
form {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.input-group {
  display: flex;
  width: 100%;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.input-group input {
  flex: 1;
  padding: 0.9rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  width: 100%;
}

.input-group button {
  flex: none;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s ease;
  white-space: nowrap;
}

.input-group button:hover {
  background: #333;
}

/* --- Result + Download Link --- */
#result {
  margin-top: 1.2rem;
  font-size: 0.95rem;
  text-align: center;
  min-height: 24px;
}

.download-btn {
  display: inline-block;
  margin-top: 1.2rem;
  background-color: #007aff;
  color: white;
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: background 0.25s ease;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.download-btn:hover {
  background-color: #005fcc;
}

/* --- Footer --- */
footer {
  margin-top: auto;
  text-align: center;
  color: #666;
  font-size: 0.85rem;
  padding: 1rem 0;
}

/* --- Mobile-first --- */
@media (max-width: 480px) {
  body {
    padding: 1.5rem 1rem;
  }

  .logo {
    width: 100px;
    margin-bottom: 1.2rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .input-group {
    flex-direction: column;
  }

  .input-group button {
    width: 100%;
  }
}

/* --- Tablet --- */
@media (min-width: 481px) and (max-width: 768px) {
  form {
    max-width: 500px;
  }
}
