
/* =================================
   GAMEFORGE AI — VISUAL 1.0
================================= */

:root {
  --background: #101014;
  --surface: #1b1b21;
  --text: #f4f4f5;
  --muted: #92929d;
  --border: rgba(255,255,255,0.12);

  --glass: rgba(35,35,43,0.48);
  --glass-strong: rgba(35,35,43,0.62);
}

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

body {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--background);
  color: var(--text);
  font-family: Arial, sans-serif;
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ESTRUTURA PRINCIPAL */

.app {
  display: flex;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at 50% 40%,
      rgba(75,75,95,0.09),
      transparent 65%
    ),
    var(--background);
}

/* MENU LATERAL */

.sidebar {
  width: 275px;
  min-width: 275px;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px 13px;
  background: rgba(20,20,25,0.94);
  border-right: 1px solid var(--border);
  transition: transform 0.3s ease;
  z-index: 20;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 27px;
  padding: 0 5px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: bold;
}

.brand-icon {
  font-size: 25px;
}

.icon-button {
  border: none;
  background: transparent;
  font-size: 25px;
  color: var(--muted);
}

.close-sidebar {
  display: none;
}

.new-chat {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--glass);
  color: var(--text);
  font-size: 14px;
  margin-bottom: 27px;
}

.new-chat span {
  font-size: 20px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.section-title {
  color: #777782;
  font-size: 10px;
  letter-spacing: 1.3px;
  padding: 10px 9px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #c5c5cd;
  text-align: left;
  font-size: 13px;
}

.menu-item span {
  font-size: 17px;
}

.menu-item:hover {
  background: rgba(255,255,255,0.06);
}

.history {
  flex: 1;
  overflow-y: auto;
  margin-top: 15px;
}

.sidebar-bottom {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 8px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #34343d;
  font-weight: bold;
}

.profile strong,
.profile small {
  display: block;
}

.profile strong {
  font-size: 12px;
}

.profile small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}

/* ÁREA PRINCIPAL */

.main {
  flex: 1;
  min-width: 0;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* BOTÕES SUPERIORES DE VIDRO */

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10;
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.topbar-title {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
}

.glass-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 15px;
  background: rgba(35,35,43,0.38);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  color: white;
  font-size: 18px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* TELA INICIAL */

.welcome {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 75px 20px 160px;
}

.welcome-content {
  text-align: center;
  animation: appear 0.6s ease;
}

.logo-large {
  font-size: 49px;
  margin-bottom: 15px;
  color: #eeeeee;
}

.welcome h1 {
  font-size: 27px;
  letter-spacing: -0.8px;
}

.welcome p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

/* MENSAGENS */

.messages {
  display: none;
  flex: 1;
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  padding: 95px 20px 155px;
  overflow-y: auto;
}

.message {
  padding: 15px 17px;
  margin-bottom: 18px;
  border-radius: 17px;
  line-height: 1.6;
  font-size: 14px;
  white-space: pre-wrap;
}

.message.user {
  background: rgba(255,255,255,0.09);
  margin-left: auto;
  max-width: 85%;
}

.message.ai {
  background: transparent;
  max-width: 100%;
}

/* CAMPO DE CONVERSA */

.chat-area {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 15px 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

.composer {
  width: 100%;
  max-width: 760px;
  padding: 15px 16px 12px;
  border: 1px solid rgba(255,255,255,0.17);
  border-radius: 25px;

  background: rgba(38,38,47,0.48);

  backdrop-filter: blur(32px) saturate(170%);
  -webkit-backdrop-filter: blur(32px) saturate(170%);

  box-shadow:
    0 10px 35px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.09);
}

.composer textarea {
  width: 100%;
  min-height: 48px;
  max-height: 130px;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  color: white;
  font-size: 14px;
  line-height: 1.5;
}

.composer textarea::placeholder {
  color: #aaaab4;
}

.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.composer-tools {
  display: flex;
  gap: 12px;
}

.tool-button {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #d1d1d8;
  font-size: 21px;
}

.send-button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f1f1f1;
  color: #17171b;
  font-size: 23px;
  font-weight: bold;
}

.disclaimer {
  color: #777782;
  font-size: 10px;
  text-align: center;
  margin-top: 10px;
}

/* ANIMAÇÃO */

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CELULARES */

@media (max-width: 700px) {

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 285px;
    max-width: 85%;
    transform: translateX(-100%);
    box-shadow: 15px 0 40px rgba(0,0,0,0.35);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .close-sidebar {
    display: block;
  }

  .topbar {
    padding: 0 14px;
  }

  .chat-area {
    padding: 12px 12px 9px;
  }

  .composer {
    border-radius: 22px;
  }

  .welcome h1 {
    font-size: 25px;
  }

  .disclaimer {
    font-size: 9px;
  }
}

/* ==================================
   BOTÕES SUPERIORES CIRCULARES
================================== */

.topbar button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: rgba(35, 35, 43, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.12);

  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);

  transition: background 0.2s ease,
              transform 0.2s ease;
}

.topbar button:active {
  transform: scale(0.92);
  background: rgba(70, 70, 80, 0.38);
}
