.gemini-home-chat {
  --ghc-bg: #06101c;
  --ghc-bg-deep: #040b14;
  --ghc-surface: rgba(9, 18, 31, 0.94);
  --ghc-surface-soft: rgba(8, 16, 28, 0.84);
  --ghc-line: rgba(160, 184, 230, 0.18);
  --ghc-line-strong: rgba(160, 184, 230, 0.3);
  --ghc-text: #edf3ff;
  --ghc-muted: #aab8d4;
  --ghc-cyan: #6fd1ff;
  --ghc-gold: #e8b86e;
  --ghc-green: #91e2b1;
  --ghc-danger: #ff9b9b;
  --ghc-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  margin: 0 0 22px;
  color: var(--ghc-text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.gemini-home-chat *,
.gemini-home-chat *::before,
.gemini-home-chat *::after {
  box-sizing: border-box;
}

.gemini-home-chat [hidden] {
  display: none !important;
}

.ghc-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(480px, 1.26fr);
  gap: 22px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid var(--ghc-line-strong);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(111, 209, 255, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(4, 11, 20, 0.98), rgba(9, 21, 36, 0.95));
  box-shadow: var(--ghc-shadow);
}

.ghc-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
  padding: 24px;
  border: 1px solid var(--ghc-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(111, 209, 255, 0.1), transparent 44%),
    rgba(6, 12, 22, 0.58);
}

.ghc-kicker {
  margin: 0 0 10px;
  color: var(--ghc-gold);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ghc-intro h2,
.ghc-card h3 {
  margin: 0;
  color: var(--ghc-text);
  font-weight: 700;
}

.ghc-intro h2 {
  font-size: 38px;
  line-height: 1.16;
}

.ghc-intro p:last-child {
  margin: 14px 0 0;
  color: var(--ghc-muted);
  font-size: 16px;
  line-height: 1.82;
}

.ghc-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--ghc-line-strong);
  border-radius: 8px;
  background: var(--ghc-surface);
}

.ghc-card__top,
.ghc-toolbar,
.ghc-trial-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ghc-card h3 {
  font-size: 26px;
  line-height: 1.22;
}

.ghc-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--ghc-muted);
  font-size: 14px;
}

.ghc-status strong {
  color: var(--ghc-text);
}

.ghc-trial-notice {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(232, 184, 110, 0.24);
  border-radius: 8px;
  background: rgba(232, 184, 110, 0.08);
}

.ghc-trial-notice strong {
  display: block;
  margin: 0 0 6px;
  color: var(--ghc-gold);
}

.ghc-trial-notice p {
  margin: 0;
  color: var(--ghc-text);
  line-height: 1.68;
}

.ghc-quick-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.ghc-primary-button,
.ghc-secondary-button,
.ghc-ghost-button,
.ghc-quick {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ghc-primary-button,
.ghc-secondary-button,
.ghc-ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.ghc-primary-button {
  background: linear-gradient(135deg, var(--ghc-cyan), #4ab4ff 70%, var(--ghc-gold));
  color: #05101e;
  font-weight: 700;
}

.ghc-secondary-button,
.ghc-ghost-button,
.ghc-quick {
  border-color: var(--ghc-line);
  background: rgba(5, 13, 22, 0.42);
  color: var(--ghc-text);
}

.ghc-quick {
  width: 100%;
  padding: 9px 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.ghc-form {
  margin-top: 16px;
  border: 1px solid rgba(212, 223, 244, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  overflow: hidden;
}

.ghc-form textarea {
  display: block;
  width: 100%;
  min-height: 118px;
  resize: none;
  overflow-y: hidden;
  border: 0;
  outline: none;
  padding: 16px 16px 0;
  background: transparent;
  color: #0d1522;
  line-height: 1.72;
}

.ghc-form textarea::placeholder {
  color: rgba(13, 21, 34, 0.58);
}

.ghc-toolbar {
  padding: 14px 16px 16px;
  background: rgba(248, 251, 255, 0.96);
}

.ghc-temperature {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 300px);
  color: #44526a;
}

.ghc-temperature input {
  flex: 1;
}

.ghc-temperature strong {
  color: #0d1522;
}

.ghc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ghc-thinking {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--ghc-line);
  border-radius: 8px;
  background: rgba(6, 12, 22, 0.84);
}

.ghc-thinking__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ghc-text);
  font-size: 14px;
  font-weight: 600;
}

.ghc-thinking__meta strong {
  color: var(--ghc-cyan);
}

.ghc-thinking-bar {
  height: 10px;
  margin-top: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.ghc-thinking-bar__fill {
  position: relative;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ghc-cyan), #4ab4ff 70%, var(--ghc-gold));
  transition: width 0.24s ease;
}

.ghc-thinking-bar__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: translateX(-100%);
  animation: ghc-thinking-sheen 1.3s linear infinite;
}

.ghc-thinking p {
  margin: 10px 0 0;
  color: var(--ghc-muted);
  font-size: 13px;
  line-height: 1.6;
}

.ghc-thinking.is-finished .ghc-thinking-bar__fill {
  background: linear-gradient(90deg, var(--ghc-green), var(--ghc-cyan));
}

.ghc-thinking.is-failed .ghc-thinking__meta strong {
  color: #ffb58c;
}

.ghc-thinking.is-failed .ghc-thinking-bar__fill {
  background: linear-gradient(90deg, var(--ghc-danger), #ffb58c);
}

.ghc-response {
  margin-top: 16px;
}

.ghc-response__head {
  margin-bottom: 10px;
}

.ghc-stream {
  display: grid;
  gap: 12px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.ghc-message {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--ghc-line);
  border-radius: 8px;
  background: rgba(7, 13, 22, 0.88);
}

.ghc-message.user {
  background: rgba(12, 29, 52, 0.9);
  border-color: rgba(111, 209, 255, 0.28);
}

.ghc-message.clarification {
  border-color: rgba(232, 184, 110, 0.46);
  background:
    linear-gradient(135deg, rgba(232, 184, 110, 0.12), transparent 58%),
    rgba(7, 13, 22, 0.92);
}

.ghc-message.clarification .ghc-message__role {
  font-weight: 700;
}

.ghc-message__role {
  color: var(--ghc-gold);
  font-size: 13px;
}

.ghc-message__content {
  color: var(--ghc-text);
  line-height: 1.78;
  white-space: pre-wrap;
  word-break: break-word;
}

.ghc-message__content code {
  padding: 0.15em 0.42em;
  border-radius: 6px;
  background: rgba(111, 209, 255, 0.12);
  color: var(--ghc-cyan);
  font-family: Consolas, "SFMono-Regular", Monaco, monospace;
}

.ghc-message__content pre {
  overflow: auto;
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.95);
}

.ghc-message__content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.ghc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ghc-primary-button:hover,
.ghc-secondary-button:hover,
.ghc-ghost-button:hover,
.ghc-quick:hover {
  transform: translateY(-1px);
}

.ghc-primary-button:disabled,
.ghc-secondary-button:disabled,
.ghc-ghost-button:disabled,
.ghc-quick:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.ghc-primary-button:focus-visible,
.ghc-secondary-button:focus-visible,
.ghc-ghost-button:focus-visible,
.ghc-quick:focus-visible,
.ghc-form textarea:focus-visible,
.ghc-temperature input:focus-visible {
  outline: 2px solid var(--ghc-cyan);
  outline-offset: 2px;
}

@keyframes ghc-thinking-sheen {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

@media (max-width: 1100px) {
  .ghc-shell {
    grid-template-columns: 1fr;
  }

  .ghc-intro {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .gemini-home-chat {
    margin-bottom: 18px;
  }

  .ghc-shell,
  .ghc-card,
  .ghc-intro {
    padding: 16px;
  }

  .ghc-intro h2 {
    font-size: 28px;
  }

  .ghc-quick-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ghc-toolbar,
  .ghc-actions {
    width: 100%;
  }

  .ghc-temperature {
    width: 100%;
    min-width: 0;
  }

  .ghc-actions .ghc-ghost-button,
  .ghc-actions .ghc-primary-button {
    flex: 1;
  }

  .ghc-stream {
    max-height: 320px;
  }
}
