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

:root {
  --bg: #121212;
  --card: #1e1e1e;
  --muted: #888888;
  --text: #e0e0e0;
  --accent: #6c5ce7;
  --radius: 8px;
  --max-width: 880px;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
}

header {
  padding: 1.5rem 0;
  border-bottom: 1px solid #2a2a2a;
}

nav ul {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

nav a:hover {
  color: var(--text);
  background: var(--accent);
}

h1 {
  text-align: center;
  font-size: 2rem;
  margin: 2rem 0;
  color: var(--text);
  font-weight: 600;
}

form {
  max-width: 720px;
  margin: 1.5rem auto;
  display: flex;
  gap: 0.75rem;
  background: transparent;
  padding: 0;
  flex-wrap: wrap;
}

input[name="search_query"] {
  flex: 1;
  min-width: 200px;
  padding: 0.8rem 1rem;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  background: var(--card);
  color: var(--text);
  transition: all 0.3s ease;
}

input[name="search_query"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

button {
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.story-content {
  max-width: 80vw;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid #2a2a2a;
}

.story-content h2 {
  color: var(--accent);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.story-content h3 {
  color: var(--accent);
  font-size: 1.2rem;
  margin: 1.5rem 0 0.8rem;
  font-weight: 600;
}

.story-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 1rem;
}

.story-content a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.story-content a:hover {
  color: #7d70ef;
}

footer {
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid #2a2a2a;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.show-content {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid #2a2a2a;
}

.show-content h2 {
  color: var(--accent);
  font-size: 1.2rem;
  margin: 1.5rem 0 1rem;
  font-weight: 600;
}

.show-content p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.show-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.show-actions a,
.show-actions button {
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.show-actions a {
  background: var(--accent);
  color: #fff;
}

.show-actions a:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.show-actions button {
  background: #c53030;
  color: #fff;
}

.show-actions button:hover {
  background: #9b2c2c;
  transform: translateY(-1px);
}

.show-actions form {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  background: transparent;
}

.show-actions form button {
  margin: 0;
  padding: 0.8rem 1.5rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c5ce7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 1.2em 1.2em;
  padding-right: 2.5rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 720px) {
  .show-content {
    padding: 1.5rem;
  }
  .show-actions {
    flex-direction: column;
  }
  .show-actions a,
  .show-actions button {
    width: 100%;
    text-align: center;
  }
}
