*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  min-height: 100vh;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

header {
  text-align: center;
  margin-bottom: 36px;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  color: #6e6e73;
  margin-top: 6px;
  font-size: 1.05rem;
}

/* Search Bar */
.search-bar {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}

.search-bar input {
  flex: 1;
  padding: 14px 18px;
  font-size: 1rem;
  border: 2px solid #d2d2d7;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}

.search-bar input:focus {
  border-color: #0071e3;
}

.search-bar button {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  background: #0071e3;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.search-bar button:hover {
  background: #0066cc;
}

.search-bar button:disabled {
  background: #a1c4e8;
  cursor: not-allowed;
}

/* Status */
.status {
  text-align: center;
  margin-top: 28px;
  font-size: 0.95rem;
  color: #6e6e73;
}

.status.error {
  color: #d32f2f;
}

/* Results */
.results {
  margin-top: 32px;
  display: grid;
  gap: 16px;
}

.result-summary {
  text-align: center;
  color: #6e6e73;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  gap: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-img {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f0f0f0;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-name a {
  color: inherit;
  text-decoration: none;
}

.card-name a:hover {
  color: #0071e3;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.88rem;
  color: #6e6e73;
  margin-bottom: 8px;
}

.rating {
  color: #1d1d1f;
  font-weight: 600;
}

.stars {
  color: #ff9500;
  letter-spacing: 1px;
}

.card-address,
.card-coords {
  font-size: 0.88rem;
  color: #6e6e73;
  line-height: 1.45;
}

.card-coords {
  font-size: 0.82rem;
  margin-top: 2px;
}

.card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  font-size: 0.78rem;
  padding: 3px 10px;
  background: #f0f0f5;
  border-radius: 20px;
  color: #6e6e73;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid #d2d2d7;
  border-top-color: #0071e3;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 600px) {
  .card {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-img {
    width: 100%;
    height: 180px;
  }

  .search-bar {
    flex-direction: column;
  }

  .search-bar button {
    width: 100%;
  }

  header h1 {
    font-size: 1.6rem;
  }
}
