:root {
  /* Match global GDF tokens */
  --gdf-accent:#FFE955;
  --gdf-border:rgba(255,255,255,0.08);
  --gdf-card:rgba(18,18,18,0.88);
  --gdf-shadow:0 0 28px rgba(255,233,85,0.55);
}

/* Launcher: glass plus neon, same feel as floating socials */
.gdf-chat-launcher {
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:9999;
  width:60px;
  height:60px;
  border-radius:9999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,
    rgba(255,255,255,0.10),
    rgba(255,255,255,0.04)
  );
  border:1px solid var(--gdf-border);
  backdrop-filter:blur(12px);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.75),
    0 0 26px rgba(255,233,85,0.40),
    inset 0 0 0 1px rgba(255,255,255,0.06);
  cursor:pointer;
  transition:
    transform .18s ease,
    filter .18s ease,
    box-shadow .22s ease,
    background .22s ease;
}

.gdf-chat-launcher:hover {
  transform:translateY(-2px);
  filter:brightness(1.05);
  box-shadow:
    0 20px 46px rgba(0,0,0,0.85),
    0 0 32px rgba(255,233,85,0.55);
}

.gdf-chat-launcher svg {
  width:26px;
  height:26px;
  stroke:var(--gdf-accent);
}

/* Small ping indicator */
.gdf-chat-ping {
  position:absolute;
  top:-2px;
  right:-2px;
  width:11px;
  height:11px;
  border-radius:9999px;
  background:var(--gdf-accent);
  box-shadow:0 0 16px rgba(255,233,85,0.70);
  animation:gdfPing 2s infinite ease-in-out;
}

@keyframes gdfPing {
  0%,100% {
    transform:scale(1);
    opacity:.9;
  }
  50% {
    transform:scale(1.4);
    opacity:.35;
  }
}

/* Wrapper */
.gdf-chat-wrap {
  position:fixed;
  right:20px;
  bottom:94px;
  z-index:9999;
  width:380px;
  max-width:calc(100vw - 28px);
  transform:translateY(12px);
  opacity:0;
  pointer-events:none;
  transition:transform .22s ease, opacity .22s ease;
}

.gdf-chat-wrap.open {
  transform:translateY(0);
  opacity:1;
  pointer-events:auto;
}

/* Window */
.gdf-chat-window {
  position:relative;
  border-radius:18px;
  overflow:hidden;
  background:var(--gdf-card);
  border:1px solid var(--gdf-border);
  backdrop-filter:blur(14px);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.85),
    var(--gdf-shadow);
}

/* Faint grid overlay, same character as hero grid */
.gdf-grid {
  position:absolute;
  inset:0;
  opacity:.16;
  pointer-events:none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size:80px 80px;
}

/* Header */
.gdf-chat-header {
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 14px;
  gap:8px;
  color:#fff;
  font-weight:800;
  background:linear-gradient(
    135deg,
    rgba(255,255,255,0.08),
    rgba(15,15,15,0.90)
  );
  border-bottom:1px solid var(--gdf-border);
}

.gdf-brand {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:.9rem;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.gdf-brand .dot {
  width:10px;
  height:10px;
  border-radius:9999px;
  background:var(--gdf-accent);
  box-shadow:0 0 16px rgba(255,233,85,0.80);
}

.gdf-close {
  background:rgba(0,0,0,0.35);
  border:1px solid var(--gdf-border);
  color:#fff;
  width:34px;
  height:34px;
  border-radius:10px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.9rem;
  transition:
    background .18s ease,
    color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
}

.gdf-close:hover {
  background:var(--gdf-accent);
  color:#0b0b0b;
  transform:translateY(-1px);
  box-shadow:0 0 18px rgba(255,233,85,0.70);
}

/* Body and messages */
.gdf-chat-body {
  max-height:60vh;
  overflow:auto;
  padding:14px;
  color:#eee;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,0.18) transparent;
  background:radial-gradient(circle at top, rgba(255,233,85,0.06), transparent 55%);
}

.gdf-chat-body::-webkit-scrollbar {
  width:6px;
}

.gdf-chat-body::-webkit-scrollbar-thumb {
  background:rgba(255,255,255,0.16);
  border-radius:6px;
}

/* Messages */
.gdf-msg {
  display:flex;
  margin-bottom:10px;
}

.gdf-msg.user {
  justify-content:flex-end;
}

.gdf-bubble {
  max-width:82%;
  padding:9px 12px;
  border-radius:14px;
  line-height:1.4;
  font-size:14px;
  border:1px solid var(--gdf-border);
  background:rgba(255,255,255,0.04);
  color:#e8e8e8;
  box-shadow:inset 0 0 6px rgba(0,0,0,0.35);
}

/* User bubble: bright, accented, lifted */
.gdf-msg.user .gdf-bubble {
  background:#ffffff;
  color:#0b0b0b;
  border-color:rgba(255,233,85,0.85);
  font-weight:600;
  box-shadow:0 0 12px rgba(255,233,85,0.45);
}

/* Links inside messages, styled to match accent */
#gdfChatBody a {
  color:var(--gdf-accent);
  text-decoration:underline;
}

/* Input area */
.gdf-chat-input {
  padding:10px;
  border-top:1px solid var(--gdf-border);
  background:rgba(0,0,0,0.65);
  display:flex;
  gap:8px;
  align-items:center;
}

.gdf-chat-input input {
  flex:1;
  border-radius:12px;
  border:1px solid var(--gdf-border);
  background:#0F0F0F;
  color:#fff;
  padding:11px 12px;
  font-size:14px;
  outline:none;
  transition:
    border .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.gdf-chat-input input::placeholder {
  color:rgba(255,255,255,0.35);
}

.gdf-chat-input input:focus {
  border-color:var(--gdf-accent);
  background:rgba(255,255,255,0.06);
  box-shadow:0 0 14px rgba(255,233,85,0.40);
}

/* Send button */
.gdf-send {
  min-width:48px;
  border-radius:12px;
  border:1px solid var(--gdf-accent);
  color:var(--gdf-accent);
  background:transparent;
  cursor:pointer;
  padding:0 14px;
  font-weight:800;
  font-size:.85rem;
  text-transform:uppercase;
  letter-spacing:.05em;
  transition:
    background .18s ease,
    transform .18s ease,
    box-shadow .18s ease,
    color .18s ease;
}

.gdf-send:hover,
.gdf-send:focus {
  background:var(--gdf-accent);
  color:#0b0b0b;
  transform:translateY(-1px);
  box-shadow:0 0 20px rgba(255,233,85,0.55);
  outline:none;
}

/* Mobile */
@media (max-width:640px) {
  .gdf-chat-wrap {
    right:10px;
    left:10px;
    bottom:10px;
    width:auto;
    max-width:none;
  }
  .gdf-chat-body {
    max-height:65vh;
  }
  .gdf-chat-launcher {
    right:16px;
    bottom:16px;
  }
}

/* Typing Indicator */
.gdf-typing {
  display:flex;
  align-items:center;
  background:rgba(255,255,255,0.05);
  border:1px solid var(--gdf-border);
  padding:10px 14px;
  border-radius:14px;
  max-width:82%;
  width:auto;
  box-shadow:inset 0 0 6px rgba(0,0,0,0.35);
}

.gdf-typing-dots {
  display:flex;
  gap:6px;
}

.gdf-typing-dots span {
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--gdf-accent);
  opacity:0.4;
  animation:gdfTyping 1.2s infinite ease-in-out;
  box-shadow:0 0 10px rgba(255,233,85,0.55);
}

.gdf-typing-dots span:nth-child(1) {
  animation-delay:0s;
}
.gdf-typing-dots span:nth-child(2) {
  animation-delay:0.2s;
}
.gdf-typing-dots span:nth-child(3) {
  animation-delay:0.4s;
}

@keyframes gdfTyping {
  0%,100% { transform:translateY(0); opacity:0.4; }
  50% { transform:translateY(-4px); opacity:1; }
}
.gdf-chat-icon {
  height:30px;
  width:auto;
  filter:
    drop-shadow(0 0 14px rgba(255,233,85,0.60))
    drop-shadow(0 0 28px rgba(255,233,85,0.45));
  opacity:0.95;
}
#gdf-chat-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: 90%;
  z-index: 999999;
}

/* Chat window */
.gdf-chat-window {
  width: 100%;
  height: 100dvh; /* key fix for mobile viewport */
  max-height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  box-shadow: 0 0 26px rgba(255,235,77,0.45);
}

/* Messages area */
.gdf-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  scroll-behavior: smooth;
}

/* Input area fix */
.gdf-chat-input {
  padding: 14px;
  display: flex;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.55);
}

.gdf-chat-input input {
  flex: 1;
  border-radius: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
}

.gdf-chat-input button {
  background: var(--gdf-accent);
  border-radius: 10px;
  padding: 12px 18px;
  color: #000;
  font-weight: 700;
}

/* Mobile override */
@media (max-width: 640px) {
  #gdf-chat-container {
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
  }

  .gdf-chat-window {
    height: 100dvh; /* removes the stretched overflow */
    max-height: none;
    border-radius: 0;
  }
}


