/* ===== GRUK - grok but wobbly ===== */

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

body {
  font-family: 'Comic Neue', cursive, sans-serif;
  background: #0b0b0b;
  color: #eaeaea;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- wobbly class ---- */
.wobbly {
  border-radius: 12px 6px 14px 8px !important;
}

/* ---- header ---- */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 2px solid #222;
  border-bottom-style: dashed;
  background: #0b0b0b;
  transform: rotate(-0.15deg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  transform: rotate(0.5deg);
}

.logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  transform: rotate(-2deg);
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: #eaeaea;
  letter-spacing: -0.5px;
}

.header-center {
  display: flex;
  align-items: center;
}

.ca-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #161616;
  border: 1.5px solid #2a2a2a;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  transform: rotate(-0.4deg);
  user-select: none;
}

.ca-box:hover {
  background: #1d1d1d;
  transform: rotate(0.5deg) scale(1.02);
}

.ca-box.copied {
  background: #10331a;
  border-color: #1e7a3a;
}

.ca-label {
  font-weight: 700;
  color: #eaeaea;
}

.ca-value {
  color: #9a9a9a;
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 0.3px;
}

.ca-copy {
  font-size: 14px;
  color: #999;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-twitter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background 0.15s, transform 0.15s;
  transform: rotate(-2deg);
}

.btn-twitter:hover {
  background: #1a1a1a;
  transform: rotate(3deg) scale(1.1);
}

/* white-on-transparent icons — already show on dark bg */
.icon-img {
  display: block;
}

.icon-x {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.icon-cc {
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.icon-copy {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: opacity(0.5);
  transition: filter 0.15s;
}

.ca-box:hover .icon-copy {
  filter: opacity(0.8);
}

.action-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: opacity(0.4);
  display: block;
  transition: filter 0.15s;
}

.bot-action:hover .action-icon {
  filter: opacity(0.85);
}

.btn-text {
  text-decoration: none;
  color: #eaeaea;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  transition: background 0.15s, transform 0.2s;
  transform: rotate(0.8deg);
  font-family: 'Comic Neue', cursive;
}

.btn-text:hover {
  background: #1a1a1a;
}

.btn-primary {
  text-decoration: none;
  color: #0b0b0b;
  background: #1ed760;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  transition: transform 0.15s;
  transform: rotate(-0.5deg);
  font-family: 'Comic Neue', cursive;
}

.btn-primary:hover {
  transform: rotate(1deg) scale(1.03);
}

/* ---- main ---- */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- chat area ---- */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 40px 0;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

/* ---- empty state ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 12px;
  padding-top: 60px;
}

.gruk-avatar-big {
  width: 100px;
  height: 100px;
  object-fit: contain;
  transform: rotate(2deg);
}

.empty-text {
  font-size: 20px;
  color: #cfcfcf;
  transform: rotate(-0.5deg);
  font-weight: 700;
}

.empty-subtext {
  font-size: 14px;
  color: #7a7a7a;
  transform: rotate(0.3deg);
}

.empty-subtext a {
  color: #1ed760;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px dashed #1ed760;
}

.empty-subtext a:hover {
  color: #555;
}

.suggestions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 520px;
}

.suggestion {
  background: #161616;
  border: 1.5px solid #2a2a2a;
  padding: 10px 16px;
  font-size: 14px;
  font-family: 'Comic Neue', cursive;
  color: #cfcfcf;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  transform: rotate(-0.5deg);
}

.suggestion:nth-child(2) {
  transform: rotate(0.7deg);
}

.suggestion:nth-child(3) {
  transform: rotate(-0.8deg);
}

.suggestion:nth-child(4) {
  transform: rotate(0.4deg);
}

.suggestion:hover {
  background: #1d1d1d;
  transform: rotate(0deg) scale(1.02);
}

.suggestion-icon {
  font-size: 16px;
  margin-right: 4px;
}

/* ---- messages ---- */
.message {
  display: flex;
  flex-direction: column;
}

.message.user {
  align-items: flex-end;
}

.message.bot {
  align-items: flex-start;
}

.message-bubble {
  max-width: 75%;
  font-size: 15px;
  line-height: 1.6;
  word-wrap: break-word;
}

.message.user .message-bubble {
  background: #161616;
  color: #eaeaea;
  padding: 10px 18px;
  border-radius: 18px 8px 20px 12px;
  transform: rotate(0.4deg);
  border: 1.5px solid #262626;
}

.message.bot .message-bubble {
  color: #eaeaea;
  padding: 4px 0;
  transform: rotate(-0.3deg);
}

.bot-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  padding-left: 2px;
  transform: rotate(0.3deg);
  align-items: center;
}

.bot-action {
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  font-size: 15px;
  padding: 2px 4px;
  transition: color 0.15s, transform 0.15s;
  transform: rotate(-1deg);
}

.bot-action:nth-child(even) {
  transform: rotate(1.5deg);
}

.bot-action:hover {
  color: #555;
  transform: rotate(0deg) scale(1.2);
}

.bot-meta {
  font-size: 12px;
  color: #ccc;
  margin-left: 4px;
  transform: rotate(-0.5deg);
}

.message.bot .message-bubble.thinking {
  color: #999;
  font-style: italic;
}

/* ---- bottom input ---- */
.input-container {
  padding: 16px 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.think-pill {
  display: none;
  align-items: center;
  gap: 6px;
  background: #161616;
  border: 1.5px solid #2a2a2a;
  padding: 6px 14px;
  font-size: 13px;
  color: #cfcfcf;
  transform: rotate(-0.4deg);
}

.think-pill.active {
  display: flex;
}

.think-icon {
  font-size: 14px;
}

.think-close {
  background: none;
  border: none;
  font-size: 16px;
  color: #999;
  cursor: pointer;
  margin-left: 4px;
}

.input-bar {
  width: 100%;
  display: flex;
  align-items: center;
  border: 2px solid #2a2a2a;
  padding: 6px 8px 6px 16px;
  background: #0f0f0f;
  transition: border-color 0.2s;
  transform: rotate(0.15deg);
}

.input-bar:focus-within {
  border-color: #aaa;
}

#userInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #eaeaea;
  font-family: 'Comic Neue', cursive;
  font-size: 16px;
  padding: 8px 0;
}

#userInput::placeholder {
  color: #666;
}

.input-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-label {
  font-size: 13px;
  color: #aaa;
  transform: rotate(-1deg);
  white-space: nowrap;
}

.send-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: transform 0.15s;
  transform: rotate(-1deg);
}

.send-button:hover {
  transform: rotate(3deg) scale(1.1);
}

.send-button:active {
  transform: rotate(-3deg) scale(0.9);
}

/* ---- toast ---- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1ed760;
  color: #0b0b0b;
  padding: 10px 20px;
  border-radius: 10px 5px 12px 7px;
  font-size: 14px;
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 100;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) rotate(-1deg);
}

/* ---- funny popup modal ---- */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.popup-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.popup-box {
  background: #141414;
  border: 3px solid #1ed760;
  border-radius: 16px 6px 18px 8px;
  padding: 30px 36px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  color: #eaeaea;
  transform: rotate(-1deg) scale(0.8);
  transition: transform 0.3s;
  box-shadow: 5px 5px 0 #1ed760;
}

.popup-overlay.show .popup-box {
  transform: rotate(-1deg) scale(1);
}

.popup-emoji {
  font-size: 48px;
  margin-bottom: 10px;
}

.popup-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  transform: rotate(0.5deg);
}

.popup-text {
  font-size: 15px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.5;
  transform: rotate(-0.3deg);
}

.popup-btn {
  background: #1ed760;
  color: #0b0b0b;
  border: none;
  padding: 10px 24px;
  font-family: 'Comic Neue', cursive;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 10px 5px 12px 6px;
  transition: transform 0.15s;
  transform: rotate(-0.5deg);
}

.popup-btn:hover {
  transform: rotate(1deg) scale(1.05);
}

.popup-btn-secondary {
  background: none;
  color: #999;
  border: none;
  padding: 8px 16px;
  font-family: 'Comic Neue', cursive;
  font-size: 13px;
  cursor: pointer;
  margin-top: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.popup-btn-secondary:hover {
  color: #555;
}

/* ---- shake animation for buttons ---- */
@keyframes nope-shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  15% { transform: translateX(-6px) rotate(-3deg); }
  30% { transform: translateX(5px) rotate(2deg); }
  45% { transform: translateX(-4px) rotate(-2deg); }
  60% { transform: translateX(3px) rotate(1deg); }
  75% { transform: translateX(-2px) rotate(-1deg); }
}

.nope-shake {
  animation: nope-shake 0.5s ease;
}

/* ---- scrollbar ---- */
.chat-area::-webkit-scrollbar {
  width: 6px;
}

.chat-area::-webkit-scrollbar-track {
  background: transparent;
}

.chat-area::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 3px;
}

/* ---- responsive ---- */
@media (max-width: 600px) {
  main {
    padding: 0 12px;
  }

  .message-bubble {
    max-width: 90%;
  }

  .header-center {
    display: none;
  }

  .suggestions {
    flex-direction: column;
    align-items: center;
  }
}
