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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f4f8;
  color: #1a1a2e;
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, #2d5016 0%, #4a7c23 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

header h1 { font-size: 2rem; margin-bottom: 10px; }
.subtitle { opacity: 0.9; font-size: 1rem; }
.update-time { margin-top: 10px; font-size: 0.9rem; opacity: 0.8; }

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.search-section {
  margin-bottom: 30px;
}

#search-input {
  width: 100%;
  padding: 15px 20px;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.3s;
}

#search-input:focus {
  border-color: #4a7c23;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.product-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.product-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.product-name {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2d5016;
}

.product-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: #e85d26;
  margin-bottom: 4px;
}

.product-unit {
  font-size: 0.9rem;
  color: #666;
}

.product-change {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.product-change.up {
  background: #e6f4ea;
  color: #1e7e34;
}

.product-change.down {
  background: #fce8e6;
  color: #c62828;
}

.product-change.stable {
  background: #f5f5f5;
  color: #666;
}

.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  font-size: 1.2rem;
  color: #666;
}

footer {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 0.9rem;
}

footer a {
  color: #4a7c23;
  text-decoration: none;
}

@media (max-width: 600px) {
  header h1 { font-size: 1.5rem; }
  .products-grid { grid-template-columns: 1fr; }
}
