:root{
  --gc-bg: #ffffff;
  --gc-surface: #ffffff;
  --gc-panel: #f6f8fc;
  --gc-border: rgba(15, 23, 42, .08);
  --gc-text: rgba(15, 23, 42, .92);
  --gc-muted: rgba(15, 23, 42, .56);

  --gc-in: #ffffff;
  --gc-out: #d7e3fd;
  --gc-accent: #1a73e8;
  --gc-shadow: rgba(15, 23, 42, .10);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--gc-text);
  background: var(--gc-bg);
}

a{ color:var(--gc-muted); text-decoration:none; }
a:hover{ color:var(--gc-text); }

.wrap{ max-width: 980px; margin: 0 auto; padding: 16px 14px 22px; }

.top{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
  padding: 10px 10px;
  background: rgba(255,255,255,.8);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.brand{ display:flex; gap:12px; align-items:center; }
.dot{
  width: 12px; height: 12px; border-radius: 999px;
  background: linear-gradient(135deg, var(--gc-accent), rgba(26,115,232,.55));
  box-shadow: 0 0 14px rgba(26,115,232,.18);
}
.name{ font-weight: 700; letter-spacing: .2px; }
.sub{ font-size: 13px; color: var(--gc-muted); margin-top: 2px; }

.card{
  border: 1px solid var(--gc-border);
  background: var(--gc-surface);
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 12px 40px var(--gc-shadow);
}

.messages{
  padding: 18px 18px;
  min-height: 66vh;
  max-height: 72vh;
  overflow:auto;
  background: var(--gc-panel);
}

.msglist{ display:flex; flex-direction:column; gap:8px; }
.msg{
  display:flex;
  justify-content:flex-start;
}
.msgrow{
  width: 100%;
  max-width: 740px;
  display:flex;
  gap: 8px;
  align-items:flex-end;
  justify-content:flex-start;
}
.msgmain{
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(15, 23, 42, .06);
  background: var(--gc-in);
  border-radius: 18px;
  padding: 10px 12px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
}
.msg.me{ justify-content:flex-end; }
.msg.me .msgrow{ justify-content:flex-end; }
.msg.me .msgmain{
  background: var(--gc-out);
  border-color: rgba(26, 115, 232, .12);
}
.meta{
  display:flex;
  gap:8px;
  align-items:baseline;
}
.author{ font-weight: 650; font-size: 13px; color: rgba(15, 23, 42, .74); }
.msg.me .author{ color: rgba(15, 23, 42, .80); }
.time{ font-size: 12px; color: var(--gc-muted); margin-left: auto; }
.text{
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
  font-size: 14px;
}

.copybtn{
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, .08);
  background: rgba(255,255,255,.70);
  color: rgba(15, 23, 42, .54);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  padding: 0;
  display:grid;
  place-items:center;
  cursor:pointer;
  opacity: .95;
  transform: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.copybtn:hover{
  color: rgba(15, 23, 42, .82);
  border-color: rgba(26, 115, 232, .25);
  background: rgba(26, 115, 232, .10);
}
.copybtn svg{
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.copybtn.copied{
  color: #ffffff;
  border-color: rgba(26, 115, 232, .35);
  background: rgba(26, 115, 232, .88);
}

.empty{
  color: var(--gc-muted);
  border: 1px dashed rgba(15, 23, 42, .14);
  padding: 16px;
  border-radius: 14px;
  text-align:center;
}

.composer{
  display:flex;
  gap: 10px;
  padding: 12px 12px;
  border-top: 1px solid rgba(15, 23, 42, .08);
  background: rgba(255,255,255,.92);
  position: sticky;
  bottom: 0;
}

input, textarea{
  width:100%;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, .10);
  background: #ffffff;
  color: var(--gc-text);
  padding: 10px 14px;
  outline: none;
}
input.author{
  max-width: 220px;
}
textarea.text{
  resize: none;
  min-height: 42px;
  max-height: 120px;
}
input:focus, textarea:focus{
  border-color: rgba(26, 115, 232, .45);
  box-shadow: 0 0 0 4px rgba(26, 115, 232, .12);
}

.send{
  border: 1px solid rgba(26, 115, 232, .20);
  background: rgba(26, 115, 232, .92);
  color: #ffffff;
  font-weight: 750;
  border-radius: 18px;
  padding: 10px 14px;
  cursor:pointer;
}
.send:hover{ filter: brightness(1.06); }
.send:active{ transform: translateY(1px); }

.foot{ margin-top: 14px; font-size: 13px; }
.muted{ opacity: .85; }

@media (max-width: 760px){
  input.author{ max-width: 140px; }
}

