:root {
  --primary-color: #f61f1f;
  --primary-hover: #f69b0a;
  --light-bg: #f9fafb;
  --border-color: #e5e7eb;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --user-msg-bg: #fff2e6;
  --assistant-msg-bg: #f3f4f6;
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  background-color: var(--light-bg);
}

header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

h1 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.container {
  padding: 1rem;
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

form input,
form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
}

form button {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 1rem;
}

form button:hover {
  background-color: var(--primary-hover);
}

#response {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 4px;
  display: none;
}

#response.success {
  background-color: #d1fae5;
  color: #065f46;
  display: block;
}

#response.error {
  background-color: #fee2e2;
  color: #991b1b;
  display: block;
}

nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

nav a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

nav a:hover, nav a.active {
  background-color: var(--primary-hover);
  color: var(--text-color);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
}