* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

body {
  display: flex;
  background-color: black;
  height: 100vh;
  overflow: hidden;
}

/* Ẩn thanh cuộn cho toàn bộ trình duyệt */
::-webkit-scrollbar {
  display: none;
}
* {
  scrollbar-width: none;
}

/* Sidebar */
.sidebar {
  width: 260px;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  overflow-y: auto;
}
.sidebar.closed {
  width: 75px;
}
.sidebar.closed .text,
.sidebar.closed .recent,
.sidebar.closed .footer .address,
.sidebar.closed .footer .settings .text {
  display: none;
}

.material-symbols-outlined {
  padding: 8px;
  color: aliceblue;
  cursor: pointer;
  border-radius: 50%;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.material-symbols-outlined:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
.material-symbols-outlined:active {
  background-color: rgba(255, 255, 255, 0.4);
}

.menu {
  width: 40px;
  height: 40px;
  margin: 5px 0 5px 2px;
}

.new-chat {
  margin: 10px 5px;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 8px 15px;
  display: flex;
  align-items: center;
  border-radius: 20px;
  width: fit-content;
  font-size: 14px;
  gap: 10px;
  cursor: pointer;
}
.new-chat:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.recent {
  color: white;
  padding: 10px 5px;
  font-size: 14px;
  margin-top: 20px;
}
.recent-history {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
  max-height: 250px;
  overflow-y: auto;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 15px;
  cursor: pointer;
  color: rgb(214, 212, 212);
  position: relative;
}
.recent-item:hover, .recent-item.active {
  background-color: rgba(255, 255, 255, 0.1);
}
.recent-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
}
.recent-left span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
.recent-actions {
  display: flex;
  align-items: center;
}
.more-options {
  font-size: 18px !important;
  padding: 4px !important;
}
.inline-delete-btn {
  display: none;
  position: absolute;
  right: 8px;
  background: #ff4d4d;
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 500;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.inline-delete-btn:hover {
  background: #ff1a1a;
}

.footer {
  padding-bottom: 10px;
}
.settings p {
  margin: 5px 0;
  display: flex;
  align-items: center;
  color: white;
  gap: 10px;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 10px;
}
.settings p:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
.settings span {
  margin: 0;
}
.address {
  font-size: 11px;
  color: white;
  margin-top: 10px;
  padding-left: 8px;
}
.address a {
  color: rgb(0, 140, 255);
  text-decoration: none;
}

/* Container chính */
.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.container nav {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 10px 20px;
  flex-shrink: 0;
}
.container nav .gemini,
.container nav .right {
  color: white;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 18px;
}
.gem-adv {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  gap: 8px;
  cursor: pointer;
}
.gem-adv img {
  height: 14px;
  width: 14px;
}
.container nav .right img {
  border-radius: 50%;
  width: 32px;
  height: 32px;
}

.main-scrollable-area {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
}

.heading {
  color: grey;
  font-size: 45px;
  font-weight: 500;
  width: 70%;
  margin: 20px auto;
  line-height: 60px;
}
.gradient-text {
  background: linear-gradient(to right, #5082ee 0%, #a66fba 50%, #d66675 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 45px;
  font-weight: 500;
  cursor: pointer;
}

.suggestions {
  width: 70%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px auto;
}
.suggestions div {
  padding: 15px;
  position: relative;
  color: white;
  width: calc(50% - 6px);
  min-height: 120px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.suggestions div:hover {
  background: rgba(255, 255, 255, 0.15);
}
.suggestions div span {
  align-self: flex-end;
  background-color: rgba(0,0,0,0.4);
  border-radius: 50%;
  padding: 6px;
}

.chat-messages {
  width: 70%;
  margin: 10px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.question {
  display: flex;
  gap: 20px;
  align-items: center;
  background: rgba(255,255,255,0.05);
  padding: 15px;
  border-radius: 15px;
  color: white;
}
.question img {
  border-radius: 50%;
  width: 32px;
  height: 32px;
}

.answer2 {
  color: white;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: rgba(255,255,255,0.05);
  padding: 15px;
  border-radius: 15px;
}

/* Logo Gemini SVG và Animation xoay tròn */
.gemini-sparkle-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

@keyframes spin-sparkle {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.gemini-sparkle-icon.spinning {
  animation: spin-sparkle 1s linear infinite;
  transform-origin: center center;
}

.ai-response {
  white-space: pre-wrap;
  line-height: 1.6;
}

.prompt-container {
  width: 70%;
  margin: 0 auto 20px auto;
  flex-shrink: 0;
}
.prompt {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 8px 15px;
  gap: 10px;
}
.prompt .textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 16px;
  max-height: 120px;
  overflow-y: auto;
  padding: 8px 10px;
  word-break: break-word;
}

.prompt .textarea:empty:before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.prompt .material-symbols-outlined {
  margin: 0;
  padding: 8px;
  color: #fff;
}
.prompt .submit {
  display: none;
  color: #5082ee;
}