/* Blog Styling - Matches GOG theme */

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Blog Header */
.blog-header {
  text-align: center;
  margin-bottom: 50px;
}

.blog-header h2 {
  font-size: 48px;
  color: var(--dark-gray);
  margin-bottom: 10px;
}

.blog-header p {
  font-size: 18px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

/* User Status Bar */
.user-status {
  background: var(--light-gray);
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-status p {
  margin: 0;
  font-weight: 600;
}

.guest-cta {
  background: var(--light-gray);
  border: 1px solid var(--color-border-default);
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 30px;
  text-align: center;
}

.guest-cta p {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--dark-gray);
}

.guest-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.cta-btn {
  background: #38383b;
  color: #fff;
}

.cta-btn.cta-secondary {
  background: #fff;
  color: #38383b;
.edit-btn {
  background: var(--dark-gray);
  color: #fff;
}

.edit-btn:hover {
  background: #4a4a4a;
}
.cta-btn.cta-secondary:hover {
  background: #f0f0f0;
  color: #38383b;
}

.user-actions a,
.user-actions button {
  margin-left: 15px;
  padding: 8px 16px;
  background: #38383b;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.user-actions a:hover,
.user-actions button:hover {
  background: #616264;
}

/* Subject Filter */
.subject-filter {
  margin-bottom: 50px;
  text-align: center;
}

.subject-filter label {
  font-weight: 600;
  margin-right: 10px;
}

.subject-filter select {
  padding: 20px 25px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
}

.subject-filter select:focus {
  outline: none;
  border-color: var(--dark-gray);
}


/* Blog Posts Grid */
.blog-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.blog-post-card {
  background: var(--light-gray);
  border: 1px solid var(--color-border-default);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.post-header {
  padding: 20px;
  border-bottom: 2px solid var(--color-border-default);
}

.post-subject {
  display: inline-block;
  background: var(--dark-gray);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.post-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark-gray);
  margin: 10px 0 0;
}

.post-meta {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 8px;
  display: flex;
  gap: 15px;
}

.post-content {
  padding: 20px;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-height: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--color-border-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-author {
  font-size: 13px;
  color: #999;
}

.read-more-btn {
  background: var(--dark-gray);
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.read-more-btn:hover {
  background: #4a4a4a;
}

/* Login/Register Forms */
.auth-container {
  max-width: 500px;
  margin: 60px auto;
  padding: 40px;
  background: var(--light-gray);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-container h2 {
  text-align: center;
  color: var(--dark-gray);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark-gray);
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  padding: 10px 20px;
  background: var(--light-gray);
  color: var(--dark-gray);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.back-link:hover {
  background: #e6e6e6;
}
.submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--dark-gray);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.submit-btn:hover {
  background: #4a4a4a;
}

.auth-link {
  text-align: center;
  margin-top: 20px;
}

.auth-link a {
  color: #38383b;
  text-decoration: none;
  font-weight: 600;
}

.auth-link a:hover {
  text-decoration: underline;
}

/* Create Post Form */
.create-post-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px;
  background: var(--light-gray);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.create-post-container h2 {
  color: #38383b;
  margin-bottom: 30px;
}

.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  font-family: "Inter", sans-serif;
  box-sizing: border-box;
  min-height: 300px;
  transition: border-color 0.2s ease;
}

.form-group textarea:focus {
  outline: none;
  border-color: #38383b;
}

/* Full Post View */
.full-post {
  max-width: 800px;
  margin: 40px auto;
  background: var(--light-gray);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.full-post h1 {
  color: var(--dark-gray);
  margin-bottom: 10px;
  font-size: 40px;
}

.full-post .post-meta {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--color-border-default);
}

.full-post .post-subject {
  display: inline-block;
  margin-bottom: 15px;
}

.full-post .post-content {
  max-height: none;
  color: #555;
  font-size: 16px;
  line-height: 1.8;
}

.post-actions {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #f0f0f0;
  display: flex;
  gap: 15px;
}

.delete-btn,
.edit-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.cta-btn {
  background: var(--dark-gray);
  color: #fff;
}
.cta-btn.cta-secondary {
  background: var(--light-gray);
  color: var(--dark-gray);
  border: 1px solid var(--dark-gray);
}
.cta-btn:hover {
  background: #4a4a4a;
  color: #fff;
}
.cta-btn.cta-secondary:hover {
  background: #e6e6e6;
  color: var(--dark-gray);
}

/* Back Link */
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  padding: 10px 20px;
  background: #f0f0f0;
  color: #38383b;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.back-link:hover {
  background: #e0e0e0;
}

/* Alerts */
.alert {
  padding: 15px 20px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-weight: 600;
}

.alert-error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef5350;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #66bb6a;
}

/* No posts message */
.no-posts {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.no-posts h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.no-posts p {
  font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-posts {
    grid-template-columns: 1fr;
  }

  .user-status {
    flex-direction: column;
    gap: 15px;
  }

  .user-actions {
    width: 100%;
    display: flex;
    gap: 10px;
  }

  .user-actions a,
  .user-actions button {
    flex: 1;
    margin-left: 0;
  }

  .post-footer {
    flex-direction: column;
    gap: 10px;
  }

  .full-post {
    padding: 20px;
  }

  .auth-container,
  .create-post-container {
    padding: 20px;
  }
}
