/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #f5f5e6;
  color: #1a1a1a;
  font-family: "Courier New", Courier, monospace;
  line-height: 1.6;
  background-image: url('data:image/svg+xml,%3Csvg width="40" height="40" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M20 0l5.77 10 6.23 0-5 10 5 10-6.23 0-5.77 10-5.77-10-6.23 0 5-10-5-10 6.23 0z" fill="%23fff3b0" fill-opacity="0.15"/%3E%3C/svg%3E');
  background-repeat: repeat;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  cursor: default;
}

/* Main Container */
#main-container {
  display: flex;
  width: 100%;
  max-width: 1400px;
  margin: 2rem;
  background-color: #fffef0;
  border: 4px solid #1a1a1a;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2), inset 0 0 15px rgba(255, 243, 176, 0.4);
  min-height: 90vh;
  overflow: hidden;
  border-radius: 8px;
}

#main-container.landing-page {
  flex-direction: column;
  max-width: 1200px;
  margin: 2rem auto;
}

/* Sidebar */
#sidebar {
  width: 250px;
  background-color: #1a1a1a;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 2px dashed #ffcc00;
}

.sidebar-logo {
  display: block;
  max-width: 200px;
  height: auto;
  margin: 0 auto 2rem;
  border-bottom: 2px solid #fffef0;
  padding-bottom: 0.5rem;
}

#sidebar h1 {
  color: #ffcc00;
  font-size: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  text-align: center;
  margin-bottom: 3rem;
  text-shadow: 2px 2px 4px rgba(255, 204, 0, 0.3);
  border-bottom: 2px solid #fffef0;
  padding-bottom: 0.5rem;
  transition: transform 0.3s ease;
}

#sidebar h1:hover {
  transform: scale(1.05);
}

#sidebar nav ul,
#sidebar .filter-section ul {
  list-style: none;
  padding: 0;
  width: 100%;
}

#sidebar nav li,
#sidebar .filter-section li {
  margin: 1.2rem 0;
}

#sidebar nav a,
#sidebar .filter-section a {
  display: block;
  padding: 0.8rem 1.5rem;
  background-color: #fffef0;
  color: #1a1a1a;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bold;
  border: 2px solid #1a1a1a;
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2), inset 0 0 5px rgba(255, 204, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

#sidebar nav a:hover,
#sidebar nav a.active,
#sidebar .filter-section a:hover,
#sidebar .filter-section a.active {
  background-color: #ffcc00;
  border-color: #ffcc00;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.filter-section h3 {
  margin-top: 2rem;
  font-size: 1.3rem;
  color: #ffcc00;
  border-bottom: 1px solid #ffcc00;
  padding-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Layout and Headers */
.layout-container {
  flex: 1;
  padding: 2rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 2rem;
}

header {
  text-align: right;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #1a1a1a;
}

.welcome-message {
  font-style: italic;
  color: #4d4d4d;
  font-size: 1.1rem;
}

#landing-header {
  text-align: center;
  padding: 2rem;
  border-bottom: 2px dashed #ffcc00;
  background-color: rgba(255, 204, 0, 0.05);
}

#landing-header h1 {
  color: #1a1a1a;
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(255, 204, 0, 0.3);
  transition: transform 0.3s ease;
}

#landing-header h1:hover {
  transform: scale(1.03);
}

.description {
  font-size: 1.1rem;
  color: #4d4d4d;
  font-style: italic;
  max-width: 800px;
  margin: 0 auto;
}

/* Landing Content */
#landing-content {
  display: flex;
  flex-wrap: wrap;
  padding: 2rem;
  gap: 2rem;
  justify-content: space-between;
}

#auth-container {
  flex: 1;
  min-width: 300px;
  max-width: 400px;
}

#auth-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#login-box, #register-box {
  padding: 2rem; /* Increased for "thicker" appearance */
  border: 2px solid #1a1a1a;
  background-color: rgba(255, 243, 176, 0.1);
  border-radius: 8px;
  box-shadow: inset 0 0 8px rgba(255, 204, 0, 0.1);
  min-width: 100%; /* Ensures consistent thickness */
}

#login-box h2, #register-box h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
  border-bottom: 1px solid #ffcc00;
  padding-bottom: 0.5rem;
  text-align: center;
}

#about-section {
  flex: 2; /* Increased to fill more space */
  min-width: 300px;
  padding: 2rem;
  border: 2px solid #1a1a1a;
  background-color: rgba(255, 243, 176, 0.1);
  border-radius: 8px;
  box-shadow: inset 0 0 8px rgba(255, 204, 0, 0.1);
}

#about-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
  border-bottom: 1px solid #ffcc00;
  padding-bottom: 0.5rem;
  text-align: center;
}

#about-section p {
  font-size: 1rem;
  color: #4d4d4d;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

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

.form-group input {
  width: 100%;
  padding: 0.8rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  border: 1px solid #1a1a1a;
  background-color: #fffef0;
  border-radius: 4px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
  border-color: #ffcc00;
  box-shadow: 0 0 8px rgba(255, 204, 0, 0.5);
  outline: none;
}

button {
  padding: 0.8rem 1.5rem;
  background-color: #1a1a1a;
  color: #fffef0;
  border: 2px solid #ffcc00;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  background-color: #ffcc00;
  color: #1a1a1a;
  transform: scale(1.05);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.error-message {
  color: #b30000;
  font-weight: bold;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 204, 0, 0.1);
  border-left: 4px solid #ffcc00;
  border-radius: 4px;
}

/* Posts */
#post-grievance,
#post-family {
  background-color: rgba(255, 243, 176, 0.2);
  padding: 1.5rem;
  border: 2px solid #1a1a1a;
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(255, 204, 0, 0.1);
}

#post-grievance h2,
#post-family h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #ffcc00;
}

#grievance-form,
#family-form {
  display: grid;
  gap: 1rem;
}

#grievance-form textarea,
#family-form textarea,
#grievance-form input[type="text"],
#family-form input[type="text"] {
  width: 100%;
  padding: 0.8rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  border: 1px solid #1a1a1a;
  background-color: #fffef0;
  border-radius: 4px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: border-color 0.3s ease;
}

#grievance-form textarea,
#family-form textarea {
  min-height: 120px;
  resize: vertical;
}

#grievance-form input[type="text"],
#family-form input[type="text"] {
  max-width: 300px;
}

#grievance-form textarea:focus,
#family-form textarea:focus,
#grievance-form input[type="text"]:focus,
#family-form input[type="text"]:focus {
  border-color: #ffcc00;
  box-shadow: 0 0 8px rgba(255, 204, 0, 0.5);
  outline: none;
}

/* Cards */
#grievances-container,
#family-posts-container {
  display: grid;
  gap: 2rem;
}

#grievances-container h2,
#family-posts-container h2 {
  font-size: 1.6rem;
  border-bottom: 2px double #ffcc00;
  padding-bottom: 0.5rem;
}

.grievance-card,
.family-card {
  background-color: #fffef0;
  border: 2px solid #1a1a1a;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: transform 0.2s ease;
}

.grievance-card:hover,
.family-card:hover {
  transform: translateY(-5px);
}

.grievance-card::after {
  content: "✝";
  position: absolute;
  top: 10px;
  right: 10px;
  color: #ffcc00;
  font-size: 1.2rem;
  opacity: 0.7;
}

.family-card::after {
  content: "♥";
  position: absolute;
  top: 10px;
  right: 10px;
  color: #ffcc00;
  font-size: 1.2rem;
  opacity: 0.7;
}

.grievance-header,
.family-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #4d4d4d;
}

.grievance-header .username,
.family-header .username {
  font-weight: bold;
  color: #1a1a1a;
}

.grievance-content .category,
.family-content .category {
  display: block;
  font-style: italic;
  color: #4d4d4d;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  background-color: rgba(255, 204, 0, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
}

.grievance-image img {
  max-width: 100%;
  height: auto;
  border: 2px solid #ffcc00;
  border-radius: 6px;
  margin-top: 1rem;
}

/* Profile */
#profile-container {
  padding: 2rem;
}

.profile-info {
  background-color: rgba(255, 243, 176, 0.2);
  padding: 1.5rem;
  border: 2px solid #1a1a1a;
  border-radius: 8px;
  margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 900px) {
  #main-container {
    flex-direction: column;
    margin: 1rem;
  }

  #main-container.landing-page {
    margin: 1rem;
  }

  #sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px dashed #ffcc00;
    padding: 1.5rem;
  }

  #sidebar nav li {
    margin: 1rem 0;
  }

  .layout-container {
    padding: 1.5rem;
  }

  #landing-content {
    flex-direction: column;
    padding: 1.5rem;
  }

  #auth-container,
  #about-section {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  #grievance-form,
  #family-form {
    grid-template-columns: 1fr;
  }

  #grievance-form input[type="text"],
  #family-form input[type="text"] {
    max-width: 100%;
  }

  #landing-header {
    padding: 1.5rem;
  }

  #landing-header h1 {
    font-size: 2rem;
  }

  #landing-content {
    padding: 1rem;
  }

  #login-box,
  #register-box,
  #about-section {
    padding: 1.5rem;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
}