body {
  margin:0;
  font-family:Arial,sans-serif;
  background:#343541;
  color:white;
}

/* ===== APP ===== */
.app {
  display:flex;
  height:100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width:260px;
  background:#202123;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  z-index:2000;
}

.sidebar-top { padding:10px; }

.new-chat {
  width:100%;
  padding:12px;
  border:none;
  border-radius:6px;
  background:#19c37d;
  color:white;
  font-weight:bold;
  cursor:pointer;
}

.chat-list {
  flex:1;
  overflow-y:auto;
  padding:10px;
}

.chat-item {
  padding:10px;
  margin-bottom:5px;
  background:#2a2b32;
  border-radius:6px;
  cursor:pointer;
}

.chat-item.active {
  background:#19c37d;
}

/* ===== USER ===== */
.sidebar-bottom {
  padding:10px;
  border-top:1px solid #333;
}

.user-box {
  display:flex;
  flex-direction:column;
  gap:8px;
}

.logout-btn {
  padding:8px;
  background:#ff4d4f;
  border-radius:6px;
  text-align:center;
  text-decoration:none;
  color:white;
}

/* ===== MAIN ===== */
.main {
  flex:1;
  display:flex;
  flex-direction:column;
  position:relative;
  z-index:1;
  padding-top:60px;
}

/* ===== CHAT ===== */
.chat-box {
  flex:1;
  padding:20px;
  overflow-y:auto;
  padding-bottom:100px;
}

.message {
  padding:10px 14px;
  border-radius:12px;
  max-width:70%;
  margin-bottom:10px;
  word-wrap:break-word;
}

.message.user {
  background:#19c37d;
  margin-left:auto;
}

.message.ai {
  background:#40414f;
}

/* ===== INPUT ===== */
.input-wrapper {
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  padding:10px;
  background:#343541;
  z-index:10;
}

.input-box {
  display:flex;
  background:#40414f;
  padding:10px;
  border-radius:10px;
}

textarea {
  flex:1;
  border:none;
  background:transparent;
  color:white;
  resize:none;
  font-size:14px;
}

button {
  width:40px;
  height:40px;
  border:none;
  border-radius:50%;
  background:#19c37d;
  color:white;
  cursor:pointer;
}

/* ===== TOP BUTTON FIX ===== */
.hamburger-btn,
.login-floating-btn {
  position:fixed;
  z-index:9999;
  pointer-events:auto;
}

.hamburger-btn {
  top:10px;
  left:10px;
  width:40px;
  height:40px;
  background:#19c37d;
  color:white;
  border-radius:8px;
  display:none;
}

.login-floating-btn {
  top:15px;
  right:15px;
  padding:10px 15px;
  background:#19c37d;
  color:white;
  border-radius:6px;
  text-decoration:none;
}

/* ===== CENTER MODE ===== */
.center-mode {
  justify-content:center;
  align-items:center;
  text-align:center;
}

.center-box {
  max-width:400px;
  pointer-events:none;
}

.chat-mode .center-box {
  display:none;
}

/* ===== MOBILE ===== */
@media(max-width:768px){

  .hamburger-btn {
    display:block;
  }

  .sidebar {
    position:fixed;
    top:0;
    left:0;
    height:100%;
    transform:translateX(-260px);
    transition:0.3s;
  }

  .sidebar.open {
    transform:translateX(0);
  }

  .main {
    width:100%;
  }
}
/* ===== AUTH CENTER PERFECT ===== */
.auth-page {
  display:flex;
  justify-content:center;
  align-items:center;
  height:100vh;
  background:#343541;
}

/* BOX */
.auth-box {
  background:#202123;
  padding:30px;
  border-radius:16px;
  width:320px;
  text-align:center;
  box-shadow:0 10px 30px rgba(0,0,0,0.3);
}

/* INPUT */
.auth-box input {
  width:100%;
  padding:12px;
  margin:8px 0;
  border-radius:8px;
  border:none;
  background:#40414f;
  color:white;
  font-size:14px;
}

/* LOGIN BUTTON */
.auth-box button {
  width:100%;
  padding:12px;
  border:none;
  border-radius:8px;
  background:#19c37d;
  color:white;
  font-weight:bold;
  cursor:pointer;
  margin-top:10px;
  transition:0.2s;
}

.auth-box button:hover {
  opacity:0.9;
  transform:translateY(-1px);
}

/* ERROR */
.error {
  background:#ff4d4f;
  padding:10px;
  border-radius:8px;
  margin-bottom:10px;
}

/* SOCIAL LOGIN */
.social-login {
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:15px;
}

/* BUTTON STYLE */
.btn-social {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px;
  border-radius:8px;
  text-decoration:none;
  font-weight:bold;
  color:white;
  transition:0.2s;
}

/* GOOGLE */
.btn-social.google {
  background:#DB4437;
}

.btn-social.google:hover {
  background:#c23321;
}

/* GITHUB */
.btn-social.github {
  background:#333;
}

.btn-social.github:hover {
  background:#000;
}

/* LINK REGISTER */
.auth-box a {
  color:#19c37d;
  text-decoration:none;
}

.auth-box a:hover {
  text-decoration:underline;
}
.center-box {
  text-align: center;
  padding: 40px 20px;
  max-width: 500px;
  margin: auto;
  font-family: Arial, sans-serif;
}

.welcome {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 15px;
}

.desc {
  font-size: 15px;
  color: #555;
  margin-bottom: 15px;
}

.note {
  font-size: 13px;
  color: #999;
  margin-bottom: 20px;
}

.engine {
  display: inline-block;
  background: #f1f1f1;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  margin-bottom: 20px;
}

.engine span {
  font-weight: bold;
  color: #007bff;
}

.guest-note {
  margin-top: 20px;
  font-size: 13px;
  color: #888;
}

/* typing animation */
.typing {
  font-size: 14px;
  color: #666;
}

.dots::after {
  content: '';
  animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
  0% { content: ''; }
  33% { content: '.'; }
  66% { content: '..'; }
  100% { content: '...'; }
}
.typing-msg {
  font-style: italic;
  opacity: 0.8;
}