* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 40px;
  text-align: center;
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1em;
  opacity: 0.95;
}

main {
  padding: 40px;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 30px;
  margin-bottom: 15px;
  color: #222;
}

h1 {
  font-size: 2em;
  border-bottom: 3px solid #667eea;
  padding-bottom: 10px;
}

h2 {
  font-size: 1.5em;
  color: #667eea;
}

h3 {
  font-size: 1.2em;
  color: #333;
}

p {
  margin-bottom: 15px;
}

code {
  background: #f4f4f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
}

pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 0.9em;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

blockquote {
  border-left: 4px solid #667eea;
  padding-left: 20px;
  margin: 20px 0;
  font-style: italic;
  color: #666;
}

ul, ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

li {
  margin-bottom: 8px;
}

a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #764ba2;
  text-decoration: underline;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.post-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.post-card h3 {
  margin-top: 0;
  color: #667eea;
}

.post-date {
  color: #999;
  font-size: 0.9em;
  margin-bottom: 10px;
}

.post-excerpt {
  color: #666;
  font-size: 0.95em;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 16px;
  background: #f0f0f0;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.back-link:hover {
  background: #667eea;
  color: white;
}

.post-meta {
  color: #999;
  font-size: 0.95em;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.form-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid #eee;
}

.form-section h2 {
  margin-top: 0;
  margin-bottom: 20px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input[type="text"],
input[type="email"],
textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1em;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button[type="submit"] {
  padding: 12px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

button[type="submit"]:active {
  transform: translateY(0);
}

footer {
  background: #f8f9fa;
  padding: 20px 40px;
  text-align: center;
  color: #999;
  font-size: 0.9em;
  border-top: 1px solid #eee;
}

@media (max-width: 768px) {
  header {
    padding: 40px 20px;
  }

  header h1 {
    font-size: 1.8em;
  }

  main {
    padding: 20px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.5em;
  }

  h2 {
    font-size: 1.2em;
  }
}
