/* ============================================================
   whois.achvc.com — Design System & Styles (Gemini Web Style)
   ============================================================ */

/* ---- Custom Properties ---- */
:root {
  --bg:            #0a0a0a;
  --bg-term:       #0d0d0d;
  --bg-titlebar:   #111111;
  --green:         #00ff41;
  --green-dim:     #00c832;
  --green-glow:    rgba(0, 255, 65, 0.35);
  --cyan:          #00d4ff;
  --cyan-dim:      #009dbe;
  --cyan-glow:     rgba(0, 212, 255, 0.3);
  --amber:         #ffb800;
  --amber-dim:     #c98f00;
  --red:           #ff4f4f;
  --white:         #e8e8e8;
  --gray:          #555555;
  --gray-light:    #888888;
  --border:        rgba(0, 255, 65, 0.25);
  --font:          'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --fs-base:       14px;
  --fs-sm:         12px;
  --fs-lg:         16px;
  --lh:            1.7;
  --input-h:       56px;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--green);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh);
  overflow: hidden;
}

/* ---- CRT Effects ---- */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 4px
  );
  animation: flicker 0.15s infinite;
}

.crt-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: radial-gradient(ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.75) 100%
  );
}

@keyframes flicker {
  0%   { opacity: 1; }
  92%  { opacity: 1; }
  93%  { opacity: 0.92; }
  94%  { opacity: 1; }
  96%  { opacity: 0.97; }
  100% { opacity: 1; }
}

/* ---- Layout ---- */
.top-actions {
  position: absolute;
  top: 16px;
  right: 24px;
  z-index: 100;
}

/* ---- Theme Toggle Button ---- */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--gray-light);
  font-size: 14px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: var(--font);
}

.theme-toggle:hover {
  background: rgba(0, 255, 65, 0.1);
  color: var(--green);
  border-color: var(--green);
}

#app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

/* ---- Chat Body (scrollable output) ---- */
#chat-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 40px 24px 20px 24px;
  scroll-behavior: smooth;
}

#chat-body::-webkit-scrollbar {
  width: 6px;
}
#chat-body::-webkit-scrollbar-track {
  background: transparent;
}
#chat-body::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 65, 0.2);
  border-radius: 3px;
}
#chat-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 65, 0.4);
}

#chat-output {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- Floating Input Row ---- */
#input-container {
  width: 100%;
  padding: 20px 24px 30px 24px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-wrapper {
  width: 100%;
  max-width: 800px;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-titlebar);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 4px 8px 4px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 255, 65, 0.1);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-wrapper:focus-within {
  border-color: var(--green);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 20px var(--green-glow);
}

.chat-input {
  flex: 1;
  height: 48px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh);
  letter-spacing: 0.02em;
}

.chat-input::selection {
  background: rgba(0, 255, 65, 0.3);
}

.chat-send-btn {
  background: transparent;
  border: none;
  color: var(--gray-light);
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, text-shadow 0.2s;
}

.chat-send-btn:hover {
  background: rgba(0, 255, 65, 0.1);
  color: var(--green);
  text-shadow: 0 0 8px var(--green);
}

/* ---- Bottom hint ---- */
.bottom-hint {
  margin-top: 10px;
  font-size: 11px;
  color: var(--gray);
  letter-spacing: 0.04em;
  text-align: center;
  opacity: 0.6;
}

/* ---- Initial Greeting ---- */
.greeting-container {
  width: 100%;
  text-align: center;
  margin-top: 20vh;
  margin-bottom: 40px;
  animation: line-appear 0.5s ease-out both;
}

.greeting-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--white);
  letter-spacing: 0.05em;
}

.greeting-subtitle {
  font-size: 16px;
  color: var(--gray-light);
}

/* ---- Chat Messages ---- */
.chat-message-wrapper {
  display: flex;
  width: 100%;
  margin-bottom: 24px;
  animation: line-appear 0.2s ease-out both;
}

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

.chat-message-wrapper.ai {
  justify-content: flex-start;
}

.chat-block {
  max-width: 100%;
  font-size: var(--fs-base);
  line-height: var(--lh);
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-message-wrapper.user .chat-block {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid var(--cyan-glow);
  color: var(--cyan);
  padding: 12px 20px;
  border-radius: 20px;
  border-bottom-right-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.05);
  display: inline-block;
  max-width: 85%;
}

.chat-message-wrapper.ai .chat-block {
  width: 100%;
  color: var(--green);
  padding: 10px 0;
}

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

/* Colour variants */
.c-green  { color: var(--green);      text-shadow: 0 0 6px var(--green-glow); }
.c-cyan   { color: var(--cyan);       text-shadow: 0 0 6px var(--cyan-glow); }
.c-amber  { color: var(--amber); }
.c-red    { color: var(--red); }
.c-white  { color: var(--white); }
.c-gray   { color: var(--gray-light); }
.c-dim    { color: var(--gray); }
.c-bold   { font-weight: 700; }

.glow-cyan  { color: var(--cyan);  text-shadow: 0 0 14px var(--cyan-glow),  0 0 30px var(--cyan-glow); }

/* ---- Responsive ---- */
@media (max-width: 700px) {
  .input-wrapper {
    padding-left: 16px;
  }
  #chat-body {
    padding: 20px 16px 20px 16px;
  }
  .greeting-title {
    font-size: 24px;
  }
}

/* ================================================================
   LIGHT MODE
   ================================================================ */
[data-theme="light"] {
  --bg:            #eae8df;
  --bg-term:       #f5f3ea;
  --bg-titlebar:   #e0ddd2;
  --green:         #2a7a2a;
  --green-dim:     #1e5e1e;
  --green-glow:    rgba(42, 122, 42, 0.2);
  --cyan:          #006b8a;
  --cyan-dim:      #00506a;
  --cyan-glow:     rgba(0, 107, 138, 0.2);
  --amber:         #8a6000;
  --amber-dim:     #6a4800;
  --red:           #cc2200;
  --white:         #1a1a1a;
  --gray:          #999999;
  --gray-light:    #666666;
  --border:        rgba(42, 122, 42, 0.35);
}

[data-theme="light"] .crt-overlay {
  opacity: 0;
  animation: none;
}

[data-theme="light"] .crt-vignette {
  opacity: 0;
}

[data-theme="light"] .input-wrapper {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 15px rgba(42, 122, 42, 0.05);
}

[data-theme="light"] .input-wrapper:focus-within {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 20px var(--green-glow);
}

[data-theme="light"] #input-container {
  background: var(--bg);
}

[data-theme="light"] .chat-message-wrapper.user .chat-block {
  background: rgba(0, 107, 138, 0.08);
  border: 1px solid var(--cyan-glow);
  box-shadow: 0 0 10px rgba(0, 107, 138, 0.05);
}
