/* COMMUNITY Page */

.community-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  align-items: start;
}

.community-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Chat */
.chat-card {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.chat-header h2,
.chat-title {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-title .ico-wrap {
  width: 28px;
  height: 28px;
}

.chat-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.active-users {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--online-color);
  font-family: monospace;
  font-weight: 700;
  white-space: nowrap;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online-color);
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}

.chat-box {
  flex: 1;
  min-height: 320px;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding-right: 8px;
  scroll-behavior: smooth;
}

.chat-box::-webkit-scrollbar { width: 4px; }
.chat-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.chat-message {
  background: var(--surface-overlay);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
  animation: fadeUp 0.3s var(--ease-out);
}

.user-th { color: var(--cortis-green); }
.user-kr { color: var(--cortis-pink); }
.user-jp { color: var(--cortis-blue); }
.user-you { color: var(--cortis-yellow); }

.chat-empty,
.chat-status {
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 4px;
}

.chat-status {
  color: var(--cortis-red);
  padding: 0 0 10px;
}

.chat-nick-row {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.chat-nick-row strong {
  color: var(--cortis-yellow);
}

.link-btn {
  background: none;
  border: none;
  color: var(--cortis-green);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
}

.link-btn:hover { color: var(--cortis-pink); }

.chat-input-form {
  display: flex;
  gap: 8px;
}

.chat-input-form input {
  flex: 1;
  background: var(--surface-input);
  border: 1px solid var(--border);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--transition), background-color 0.4s ease;
}

.chat-input-form input:focus { border-color: var(--cortis-green); }
.chat-input-form input::placeholder { color: var(--text-subtle); }

.btn-send {
  background: var(--cortis-green);
  color: var(--text-on-accent);
  border: none;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-size: 14px;
}

.btn-send:hover {
  background: var(--cortis-pink);
  color: var(--text-on-pink);
}

/* Fandom Card */
.fandom-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
}

.fandom-card em {
  color: var(--cortis-pink);
  font-style: normal;
  font-weight: 700;
}

.fandom-date {
  font-size: 12px !important;
  color: var(--cortis-green) !important;
  font-weight: 600;
}

/* Guide */
.guide-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-list li {
  padding: 12px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--cortis-green);
}

.guide-list strong {
  display: block;
  font-size: 13px;
  color: var(--cortis-green);
  margin-bottom: 4px;
}

.guide-list span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.guide-card .section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cortis-green);
  text-decoration: none;
}

/* Poll */
.poll-question {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-btn {
  padding: 12px 16px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  font-family: inherit;
}

.poll-btn:hover {
  border-color: var(--cortis-green);
  background: rgba(148, 176, 145, 0.1);
}

.poll-btn.selected {
  border-color: var(--cortis-pink);
  background: rgba(255, 46, 147, 0.12);
  color: var(--cortis-pink);
}

.poll-result {
  margin-top: 14px;
  font-size: 13px;
  color: var(--cortis-green);
  font-weight: 600;
  padding: 10px;
  background: rgba(148, 176, 145, 0.1);
  border-radius: var(--radius-sm);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

.modal-overlay[hidden] { display: none; }

.modal-card {
  width: 100%;
  max-width: 400px;
  padding: 28px;
}

.modal-card h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modal-card input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  padding: 12px;
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .community-grid { grid-template-columns: 1fr; }
  .chat-card { min-height: auto; }
}
