:root {
  --bg: #07090f;
  --panel: rgba(15, 20, 32, 0.72);
  --panel-border: rgba(118, 233, 230, 0.28);
  --text: #f5f7ff;
  --muted: #bdc5dd;
  --teal: #6ce8e3;
  --gold: #efd38e;
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at 20% -10%, rgba(108, 232, 227, 0.13), transparent 35%),
    radial-gradient(circle at 85% 0%, rgba(239, 211, 142, 0.16), transparent 38%),
    var(--bg);
  color: var(--text);
  font-family: "Georgia", serif;
  margin: 0;
  padding: 88px 18px 30px;
  min-height: 100vh;
}

.container {
  margin: 0 auto;
  max-width: 760px;
  width: 100%;
}

.comments-header {
  text-align: center;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.2;
  margin: 0;
}

.subheading {
  margin: 10px auto 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.comment-form-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 20px;
  backdrop-filter: blur(8px);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(239, 211, 142, 0.18);
}

#nameInput,
#commentInput {
  width: 100%;
  border: 1px solid rgba(152, 170, 206, 0.42);
  border-radius: 12px;
  background: rgba(10, 14, 25, 0.88);
  color: var(--text);
  padding: 14px 15px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#nameInput {
  margin-bottom: 12px;
}

#commentInput {
  min-height: 130px;
  line-height: 1.5;
  resize: vertical;
}

#nameInput::placeholder,
#commentInput::placeholder {
  color: rgba(204, 213, 234, 0.76);
}

#nameInput:focus,
#commentInput:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(108, 232, 227, 0.18);
}

#emoji-picker {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#emoji-picker .emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 38px;
  border: 1px solid rgba(174, 186, 219, 0.45);
  border-radius: 999px;
  background: rgba(22, 28, 43, 0.9);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#emoji-picker .emoji:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(239, 211, 142, 0.25);
}

.post-btn {
  margin-top: 16px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid rgba(239, 211, 142, 0.75);
  border-radius: 12px;
  background: linear-gradient(135deg, #6ce8e3, #99f3ef 52%, #efd38e);
  color: #11131a;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(108, 232, 227, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.post-btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow: 0 10px 24px rgba(239, 211, 142, 0.28);
}

#commentSection {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.comment {
  background: rgba(12, 17, 27, 0.92);
  border: 1px solid rgba(111, 230, 224, 0.2);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.comment-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fdfdfd;
  background: linear-gradient(145deg, #3f8e95, #95753a);
}

.comment-author,
.comment-time {
  margin: 0;
}

.comment-author {
  font-weight: 700;
  color: #f2f5ff;
}

.comment-time {
  margin-top: 2px;
  font-size: 0.84rem;
  color: var(--muted);
}

.comment-body {
  margin: 0;
  line-height: 1.6;
  color: #eef2ff;
  white-space: pre-wrap;
  word-break: break-word;
}

.back-button {
  position: fixed;
  top: 16px;
  left: 16px;
  border: 1px solid rgba(108, 232, 227, 0.52);
  background: rgba(11, 16, 27, 0.84);
  color: #d8fbf8;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.32);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.back-button:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  body {
    padding: 78px 14px 24px;
  }

  .comment-form-panel {
    border-radius: 14px;
    padding: 16px;
  }

  .post-btn {
    width: 100%;
    margin-left: 0;
  }

  .back-button {
    top: 10px;
    left: 10px;
    font-size: 0.92rem;
    padding: 9px 12px;
  }
}
