/* === Sohbet Sayfası Özel Stilleri === */
.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr 260px;
  gap: 20px;
  align-items: start;
  min-height: calc(100vh - 140px);
}

.chat-sidebar,
.chat-users {
  background: rgba(26, 29, 38, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 88px;
  backdrop-filter: blur(10px);
}

.chat-sidebar h3,
.chat-users h3 {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-sidebar h3::after,
.chat-users h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 12px;
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.room-item:hover,
.room-item.active {
  background: rgba(238, 41, 81, 0.08);
  border-color: rgba(238, 41, 81, 0.2);
  color: var(--text);
}

.room-item.active {
  box-shadow: 0 0 0 1px rgba(238, 41, 81, 0.3);
}

.room-count {
  font-size: 0.7rem;
  padding: 3px 9px;
  border-radius: 50px;
  background: var(--bg-2);
  color: var(--text-muted);
}

.room-item.active .room-count {
  background: rgba(238, 41, 81, 0.15);
  color: var(--accent);
}

.chat-main {
  background: rgba(26, 29, 38, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 680px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.chat-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(17, 19, 28, 0.6);
}

.chat-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
  animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.chat-messages {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(15, 16, 20, 0.4);
  overflow-y: auto;
}

.chat-message {
  display: flex;
  gap: 12px;
  max-width: 80%;
  animation: fade-in 0.3s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-message.own {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff6b6b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  color: #fff;
}

.chat-message.own .avatar {
  background: linear-gradient(135deg, #3b82f6, #22c55e);
}

.chat-bubble {
  background: var(--card-bg);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  padding: 12px 16px;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
}

.chat-message.own .chat-bubble {
  background: linear-gradient(135deg, var(--accent), #d61d43);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 4px;
  border-color: transparent;
}

.chat-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 5px;
  padding: 0 4px;
}

.chat-message.own .chat-meta {
  text-align: right;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  width: fit-content;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite both;
}

.typing-indicator span:nth-child(1) { animation-delay: 0; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.chat-input {
  padding: 18px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  background: rgba(17, 19, 28, 0.6);
}

.chat-input input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  outline: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.chat-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(238, 41, 81, 0.1);
}

.chat-input button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-input button:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.online-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.online-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.online-user:hover {
  background: rgba(255,255,255,0.03);
  color: var(--text);
}

.online-user::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.online-user.away::before {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.join-banner {
  background: linear-gradient(135deg, rgba(238,41,81,0.12), rgba(34,197,94,0.08));
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.join-banner a {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 1100px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .chat-sidebar,
  .chat-users {
    display: none;
  }
  .chat-main {
    min-height: 500px;
  }
}
