* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  margin: 0;
  background: #fff;
  color: #111;
  line-height: 1.7;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #ddd;
}

/* Hamburger */
.menu-toggle {
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Sidebar kiri */
.sidebar-left {
  position: fixed;
  top: 0;
  left: -260px;
  width: 240px;
  height: 100%;
  background: #111;
  color: #fff;
  padding: 1.5rem;
  transition: left 0.3s ease;
}

.sidebar-left.active {
  left: 0;
}

/* Tombol close */
.sidebar-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  position: absolute;
  top: 12px;
  right: 12px;
}

.sidebar-left a {
  display: block;
  color: #fff;
  text-decoration: none;
  margin: 0.6rem 0;
}

/* Wrapper */
.site-wrapper {
  max-width: 1100px;
  margin: auto;
  padding: 1rem;
}

/* Content + sidebar kanan */
.content-wrapper {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 2rem;
}

/* Konten */
article {
  background: #f5f5f5;
  padding: 1.2rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

/* Sidebar kanan */
.sidebar-right {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 12px;
}

/* Search sidebar */
#searchInput {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.7rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#searchResults {
  list-style: none;
  padding: 0;
  margin: 0;
}

#searchResults li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

/* Footer */
footer {
  text-align: center;
  margin: 3rem 0;
  font-size: 0.9rem;
  color: #666;
}

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

/* Post layout */
.postGitcuka {
  max-width: 720px;
  margin: 0 auto;
}

.post-title {
  font-size: 2rem;
}

.post-meta {
  color: #666;
  font-size: 0.9rem;
}

.post-content p {
  text-decoration: none;
}

.post-content img {
  width: 100%;
  border-radius: 8px;
}

.post-card {
  display: block;
  color: inherit;
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.post-card article {
  padding: 1.2rem;
  border-radius: 12px;
  background: #f5f5f5;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover article {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.post-card h2 {
  margin-top: 0;
}

/* TOGGLE BUTTON */
#chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #4fc3f7;
  color: #000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* CHAT BOX */
#chat-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 320px;
  height: 420px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: system-ui, sans-serif;
}

/* HIDDEN STATE */
.hidden {
  display: none;
}

/* HEADER */
.chat-header {
  background: #111;
  color: #fff;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* ROOM BUTTON */
#room-selection {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: #222;
}

#room-selection button {
  flex: 1;
  background: #333;
  border: none;
  color: #fff;
  font-size: 11px;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
}

#room-selection button.active {
  background: #4fc3f7;
  color: #000;
}

/* MESSAGES */
#messages {
  flex: 1;
  list-style: none;
  padding: 10px;
  margin: 0;
  overflow-y: auto;
  background: #f5f5f5;
}

/* FORM */
#message-form {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #ddd;
  background: #fff;
}

#message-form input {
  flex: 1;
  padding: 6px;
  font-size: 12px;
  border-radius: 6px;
  min-width: 1%;
  border: 1px solid #ccc;
}

#message-form button {
  background: #4fc3f7;
  border: none;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

/* MOBILE */
@media (max-width: 600px) {
  #chat-container {
    width: 95%;
    height: 70%;
    right: 2.5%;
  }
  }

.post-thumbnail {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 14px;
  margin: 1.5rem 0;
}
