/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* BODY */
body {
  font-family: Arial, Helvetica, sans-serif;
  background-image: url("img/community-background.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #222;
  padding: 20px;
}

/* HEADER TITLE */
.top-header {
  width: min(92%, 1100px);
  margin: 20px auto 40px;
  text-align: center;
}

.top-header h1 {
  font-size: 40px;
  font-family: "Dancing Script", cursive;
  color: rgb(48, 172, 222);
  -webkit-text-stroke: 1.2px #f0f6af;
}

/* FORM SECTION */
.main-form-section {
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
}

.form-card {
  width: min(92%, 800px);
  padding: 30px;
  background-color: #dff6ff;
  border: 2px solid #87ceeb;
  border-radius: 15px;
}

.form-card h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 22px;
  font-family: "Dancing Script", cursive;
}

/* FORM ROWS */
.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-row label {
  margin-bottom: 6px;
  font-family: "Dancing Script", cursive;
  font-weight: bold;
}

.form-row input,
.form-row textarea {
  border: 2px solid #87ceeb;
  background-color: white;
  padding: 10px;
  border-radius: 12px;
  font-family: "Dancing Script", cursive;
  width: 100%;
}

.form-row textarea {
  height: 180px;
  resize: vertical;
}

/* RADIO */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  border: 2px solid #87ceeb;
  border-radius: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 5px;
}

input[type="radio"] {
  transform: scale(0.9);
  accent-color: rgb(102, 227, 236);
}

/* BUTTON */
.post-btn {
  display: block;
  margin: 25px auto 0;
  padding: 12px 30px;
  background-color: rgb(48, 172, 222);
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 18px;
  font-family: "Dancing Script", cursive;
  cursor: pointer;
  transition: 0.3s ease;
}

.post-btn:hover {
  background-color: #90cde5;
  transform: scale(1.05);
  color: black;
}

.shared-posts {
  font-family: "Dancing Script", cursive;
  font-size: 34px;
  color: rgb(48, 172, 222);
  margin-bottom: 20px;
  text-align: center;
}
/* CONTENT SECTION */
.content-section {
  width: min(92%, 1100px);
  margin: 0 auto 60px;
  background-color: #c5ecfc;
  padding: 25px;
  border-radius: 15px;
}

/* TABS */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 30px;
}

.tabs button {
  background-color: #9be2f2;
  font-family: "Dancing Script", cursive;
  padding: 8px 18px;
  cursor: pointer;
  border-radius: 10px;
  border: none;
  transition: 0.3s;
}

.tabs button:hover {
  transform: scale(1.1);
  color: rgb(0, 140, 255);
}

/* THREADS */
#threads {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* THREAD CARD */
.thread {
  background-color: #ffffff;
  border: 2px solid #87ceeb;
  border-radius: 15px;
  padding: 18px 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.thread:hover {
  transform: translateY(-4px);
}

/* THREAD CONTENT */
.thread .meta {
  font-size: 12px;
  color: #555;
  margin-bottom: 8px;
}

.thread .tag {
  background-color: rgb(48, 172, 222);
  color: white;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.thread h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.thread p {
  font-size: 14px;
  line-height: 1.5;
}

/* BACK TO TOP */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 75px;
    height: 50px;
    border: none;
    border-radius: 12%;
    background-color: #16a2e8;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* MOBILE */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  .form-card,
  .content-section {
    width: 100%;
  }

  .top-header h1 {
    font-size: 28px;
  }

  .tabs {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  body {
    padding: 12px;
  }

  .top-header h1 {
    font-size: 24px;
  }

  .post-btn {
    width: 100%;
  }
}
