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

:root {
  --green: #4a7c59;
  --light-green: #e8f5e9;
  --pink: #e87a92;
  --dark: #2d3436;
  --gray: #636e72;
  --light-gray: #f5f5f5;
  --border: #dfe6e9;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e9 100%);
  color: var(--dark);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}


/* Audio Player */
.audio-player-card {
  background: white;
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.audio-player-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.audio-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.audio-info {
  flex: 1;
  min-width: 0;
}
.audio-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
  display: block;
  margin-bottom: 6px;
}
.audio-info audio {
  width: 100%;
  height: 36px;
}

header {
  text-align: center;
  padding: 30px 0 20px;
}

h1 {
  font-size: 2rem;
  color: var(--green);
  margin-bottom: 4px;
}

.subtitle {
  color: var(--gray);
  font-size: 0.95rem;
}

.hidden { display: none !important; }

/* Status / Loading */
#status {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.loading {
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

#status-text {
  color: var(--gray);
  font-size: 0.95rem;
}

/* Location */
.location-card {
  background: white;
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 24px;
}

.loc-icon { font-size: 1.2rem; }

/* Results */
.results-
/* Audio Player */
.audio-player-card {
  background: white;
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.audio-player-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.audio-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.audio-info {
  flex: 1;
  min-width: 0;
}
.audio-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
  display: block;
  margin-bottom: 6px;
}
.audio-info audio {
  width: 100%;
  height: 36px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.results-header h2 {
  font-size: 1.2rem;
  color: var(--dark);
}

.badge {
  background: var(--green);
  color: white;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-left: 8px;
}

/* Flower Grid */
.flower-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.flower-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

.flower-card:hover {
  transform: translateY(-2px);
}

.flower-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: var(--light-gray);
}

.flower-info {
  padding: 12px 14px;
}

.flower-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark);
  margin-bottom: 2px;
}

.flower-sci-name {
  font-size: 0.8rem;
  color: var(--gray);
  font-style: italic;
  margin-bottom: 6px;
}

.flower-date {
  font-size: 0.75rem;
  color: #b2bec3;
}

.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  background: var(--light-gray);
  color: var(--gray);
  font-size: 2.5rem;
}

/* Buttons */
.btn-secondary {
  background: white;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: var(--light-gray);
}

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

/* Error */
.error-card {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: var(--radius);
  padding: 20px;
  color: #c53030;
  text-align: center;
  margin: 20px 0;
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 0 20px;
  color: var(--gray);
  font-size: 0.8rem;
}

footer a {
  color: var(--green);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 500px) {
  .container { padding: 12px; }
  h1 { font-size: 1.5rem; }
  .flower-grid {
    grid-template-columns: 1fr;
  }
}