* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  color: white;
  background: #030208;
}

.background-image {
  position: fixed;
  inset: 0;
  background-image: url("/assets/onlyextremo-bg.png");
  background-size: contain;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.36;
  filter: saturate(1.15) contrast(1.08);
  z-index: 0;
}

.dark-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 55% 22%, rgba(151, 71, 255, 0.25), transparent 32%),
    linear-gradient(90deg, rgba(0,0,0,0.82), rgba(0,0,0,0.25), rgba(0,0,0,0.78)),
    rgba(0,0,0,0.35);
  z-index: 1;
}

.app {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: grid;
  grid-template-columns: 340px 1fr;
}

.sidebar {
  height: 100%;
  padding: 26px 20px;
  border-right: 1px solid rgba(157, 90, 255, 0.25);
  background: rgba(5, 5, 14, 0.72);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 38px;
}

.logo, .big-logo {
  border-radius: 50%;
  border: 4px solid #b36bff;
  box-shadow: 0 0 15px #a855f7, inset 0 0 16px #7e22ce;
}

.logo {
  width: 42px;
  height: 42px;
}

.brand h1 {
  font-size: 27px;
  font-weight: 800;
  text-shadow: 0 0 18px rgba(168, 85, 247, 0.8);
}

span {
  color: #b36bff;
}

.new-chat {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 10px;
  background: rgba(14, 14, 33, 0.82);
  color: white;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(126, 34, 206, 0.18);
}

.new-chat b {
  margin-left: auto;
  font-size: 28px;
  color: #c084fc;
}

.recent {
  margin-top: 38px;
}

.recent h3 {
  color: rgba(255,255,255,0.48);
  font-size: 15px;
  margin-bottom: 12px;
  font-weight: 500;
}

.recent button {
  width: 100%;
  height: 52px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: white;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.recent button:hover {
  background: rgba(168, 85, 247, 0.20);
}

.recent button::before {
  content: "◉";
  color: #a855f7;
  margin-right: 8px;
  text-shadow: 0 0 14px #a855f7;
}

.recent button span {
  flex: 1;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent small {
  color: rgba(255,255,255,0.45);
}

.main {
  height: 100vh;
  position: relative;
  padding: 24px 42px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero {
  text-align: center;
  padding-top: 6px;
  margin-bottom: 8px;
  flex: 0 0 auto;
}

.big-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
}

.hero h2 {
  font-size: 42px;
  line-height: 1;
  text-shadow: 0 0 28px rgba(168,85,247,0.65);
}

.hero p {
  color: rgba(255,255,255,0.72);
  margin-top: 14px;
  font-size: 16px;
}

.messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 12px 18px;
  scroll-behavior: smooth;
}

.message {
  display: flex;
  gap: 14px;
  margin: 18px 0;
  align-items: flex-start;
}

.user-message {
  justify-content: flex-end;
}

.icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #e9d5ff;
  background: rgba(88, 28, 135, 0.72);
  border: 1px solid rgba(216, 180, 254, 0.4);
  box-shadow: 0 0 22px rgba(168,85,247,0.55);
}

.bubble {
  max-width: 650px;
  padding: 18px 20px;
  border-radius: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  font-size: 16px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.42);
}

.ai-message .bubble {
  background: rgba(8, 10, 24, 0.82);
  border: 1px solid rgba(255,255,255,0.08);
}

.user-message .bubble {
  background: linear-gradient(135deg, rgba(83, 27, 168, 0.95), rgba(126, 34, 206, 0.95));
  border: 1px solid rgba(216,180,254,0.25);
}

.chat-box {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(5, 6, 17, 0.88);
  border: 1px solid rgba(168, 85, 247, 0.28);
  box-shadow: 0 0 35px rgba(0,0,0,0.45);
}

.chat-box input {
  flex: 1;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: white;
  border-radius: 10px;
  outline: none;
  padding: 0 16px;
  font-size: 16px;
}

.chat-box input::placeholder {
  color: rgba(255,255,255,0.5);
}

.chat-box button {
  width: 150px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(168,85,247,0.55);
}

.chat-box button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.note {
  text-align: center;
  color: rgba(255,255,255,0.38);
  font-size: 12px;
  margin-top: 8px;
}


.messages::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.45);
  border-radius: 20px;
}

.messages::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
}

@media (max-width: 850px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 20px 12px 14px;
  }

  .hero h2 {
    font-size: 32px;
  }

  .bubble {
    max-width: 82vw;
  }

  .chat-box button {
    width: 95px;
  }
}