/* ===================== RESET ===================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

/* ===================== THEME TOKENS ===================== */

:root {
  --bg-main-dark: #05080b;
  --bg-chat-dark: #05080b;
  --bg-bubble-bot-dark: #111827;
  --bg-input-dark: #111827;
  --border-dark: #1f2933;
  --text-main-dark: #e5e7eb;

  --bg-main-light: #f3f4f6;
  --bg-chat-light: #ffffff;
  --bg-bubble-bot-light: #f3f4f6;
  --bg-input-light: #ffffff;
  --border-light: #e5e7eb;
  --text-main-light: #111827;
}

/* ===================== BASE ===================== */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body[data-theme="dark"] {
  background: var(--bg-main-dark);
  color: var(--text-main-dark);
}

body[data-theme="light"] {
  background: var(--bg-main-light);
  color: var(--text-main-light);
}

.about-body {
  min-height: 100vh;
}

/* Chat background */

body[data-theme="dark"] .free-chat-window,
body[data-theme="light"] .free-chat-window {
  background: transparent;
}

/* Bot bubble colors per theme */

body[data-theme="dark"] .bot .message-bubble {
  background: var(--bg-bubble-bot-dark);
  border-color: var(--border-dark);
  color: var(--text-main-dark);
}

body[data-theme="light"] .bot .message-bubble {
  background: var(--bg-bubble-bot-light);
  border-color: var(--border-light);
  color: var(--text-main-light);
}

/* Input bar per theme */

body[data-theme="dark"] .free-input-bar {
  background: #111827;
  border-color: #4b5563;
}

body[data-theme="light"] .free-input-bar {
  background: #ffffff;
  border-color: #d1d5db;
}

/* ===================== NAVBAR & HAMBURGER ===================== */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #1f2933;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
}

body[data-theme="dark"] .navbar {
  background: #05080b;
  border-bottom-color: #1f2933;
}

body[data-theme="light"] .navbar {
  background: #ffffff;
  border-bottom-color: #e5e7eb;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 22px;
  width: auto;
  display: none;
}

body[data-theme="dark"]  .logo-dark  { display: block; }
body[data-theme="light"] .logo-light { display: block; }

/* Small title next to logo */

.nav-title {
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.nav-title h2 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

/* Right side of navbar */

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

body[data-theme="dark"] .nav-links a {
  color: #d1d5db;
}
body[data-theme="light"] .nav-links a {
  color: #4b5563;
}

.nav-links a:hover {
  color: #60a5fa;
}

/* Hamburger */

.hamburger {
  width: 28px;
  height: 20px;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  padding: 0;
  z-index: 301;
  position: relative;
}

.hamburger span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: transform 0.25s ease, opacity 0.2s ease, width 0.25s ease;
  transform-origin: center;
}

body[data-theme="light"] .hamburger span {
  background: #111827;
}

/* Animate to X when open */
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Dropdown */

.menu-dropdown {
  position: fixed;
  top: 56px;
  right: 16px;
  min-width: 200px;
  border-radius: 14px;
  padding: 6px;
  z-index: 300;
  /* hidden state */
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

body[data-theme="dark"] .menu-dropdown {
  background: #111827;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
}

body[data-theme="light"] .menu-dropdown {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.menu-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Each item */
.menu-dropdown a,
.menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  border: none;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  text-align: left;
  transition: background 0.12s;
}

body[data-theme="dark"] .menu-dropdown a,
body[data-theme="dark"] .menu-dropdown button { color: #e5e7eb; }
body[data-theme="light"] .menu-dropdown a,
body[data-theme="light"] .menu-dropdown button { color: #111827; }

body[data-theme="dark"] .menu-dropdown a:hover,
body[data-theme="dark"] .menu-dropdown button:hover { background: rgba(255,255,255,0.07); }
body[data-theme="light"] .menu-dropdown a:hover,
body[data-theme="light"] .menu-dropdown button:hover { background: rgba(0,0,0,0.05); }

/* Divider before theme toggle */
.menu-dropdown .menu-divider {
  height: 1px;
  margin: 4px 6px;
}
body[data-theme="dark"]  .menu-dropdown .menu-divider { background: rgba(255,255,255,0.07); }
body[data-theme="light"] .menu-dropdown .menu-divider { background: rgba(0,0,0,0.07); }

/* Icon inside each row */
.menu-item-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.6;
}

/* Logout item — subtle red tint on hover */
.menu-dropdown .menu-logout:hover { background: rgba(239,68,68,0.1) !important; color: #ef4444 !important; }
body[data-theme="light"] .menu-dropdown .menu-logout:hover { background: rgba(239,68,68,0.08) !important; color: #dc2626 !important; }

/* ===================== ABOUT PAGE (SHARED STYLES) ===================== */

.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
}

.hero h1 {
  font-size: 46px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Typewriter */

.typewriter {
  font-size: 34px;
  font-family: 'Fira Code', 'Courier New', monospace;
}

.cursor {
  display: inline-block;
  margin-left: 4px;
  font-weight: 340;
  font-size: 43px;
  line-height: 1;
  animation: cursor-blink 0.9s steps(2, start) infinite;
}

@keyframes cursor-blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
  opacity: 0;
  }
}

/* About sections */

.section {
  max-width: 900px;
  margin: auto;
  padding: 60px 30px;
}

.section h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.section p {
  font-size: 18px;
  line-height: 1.6;
}

.section ul {
  margin-top: 12px;
}

.section li {
  margin: 8px 0;
  font-size: 17px;
}

/* About footer */

.about-footer {
  text-align: center;
  padding: 16px;
  font-size: 14px;
  border-top: 1px solid #1f2933;
}

/* ===================== LOGIN LAYOUT & CARD ===================== */

.page-main {
  min-height: calc(100vh - 56px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px 60px;
}

.login-page {
  align-items: center;
  padding-top: 100px;
}

.light-login-card {
  max-width: 420px;
  width: 100%;
  border-radius: 20px;
  padding: 32px 24px;
  border: 1px solid #1f2933;
  background: #05080b;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  min-height: 340px;
}

/* Dark theme */
body[data-theme="dark"] .light-login-card {
  background: #05080b;
  border-color: #1f2933;
  color: #e5e7eb;
}

/* Light theme */
body[data-theme="light"] .light-login-card {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #111827;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.login-header {
  text-align: center;
  margin-bottom: 22px;
}

.login-header h1 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body[data-theme="dark"] .login-header h1 {
  color: #f9fafb;
}

body[data-theme="light"] .login-header h1 {
  color: #111827;
}

.login-header p {
  margin-top: 6px;
  font-size: 0.9rem;
}

body[data-theme="dark"] .login-header p {
  color: #9ca3af;
}

body[data-theme="light"] .login-header p {
  color: #6b7280;
}

.login-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #1f2933, transparent);
  margin: 20px 0 22px;
}

.login-form {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field label {
  font-size: 0.82rem;
  font-weight: 600;
}

body[data-theme="dark"] .login-field label {
  color: #cbd5f5;
}

body[data-theme="light"] .login-field label {
  color: #374151;
}

.login-field input {
  height: 46px;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 0.92rem;
  border: 1px solid #374151;
  background: #020617;
  color: #e5e7eb;
  transition: border 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body[data-theme="light"] .login-field input {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

.login-field input::placeholder {
  color: #6b7280;
}

body[data-theme="light"] .login-field input::placeholder {
  color: #9ca3af;
}

.login-field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.login-btn {
  margin-top: 6px;
  align-self: center;
  padding: 11px 30px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #f9fafb;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.15s ease;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.5);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.7);
  filter: brightness(1.03);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.55);
}

.subtle-link {
  color: #60a5fa;
  text-decoration: none;
  font-size: 0.85rem;
}

.subtle-link:hover {
  text-decoration: underline;
}

/* ===================== MESSAGE BUBBLES ===================== */

.message-row {
  display: flex;
  width: 100%;
}

.message-row.user {
  justify-content: flex-end;
}

.message-row.bot {
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
}

.message-bubble {
  max-width: 78%;
  padding: 10px 12px;
  font-size: 0.9rem;
  line-height: 1.55;
  border-radius: 14px;
  animation: messageIn 0.2s ease;
}

/* User bubble */

.user .message-bubble {
  background: #2563eb;
  color: #f9fafb;
  border-bottom-right-radius: 4px;
}

/* Bot bubble default */

.bot .message-bubble {
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #1f2933;
  border-bottom-left-radius: 4px;
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Optional small meta text inside bot bubble */
.meta-text {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-bottom: 4px;
}

/* ── Message action bar (copy, thumbs, regenerate) ── */
.msg-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding-left: 2px;
  opacity: 1;
}
.msg-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, transform 0.1s;
  flex-shrink: 0;
  padding: 0;
}
body[data-theme="dark"]  .msg-action-btn { color: #6b7280; }
body[data-theme="light"] .msg-action-btn { color: #9ca3af; }
body[data-theme="dark"]  .msg-action-btn:hover { background: rgba(255,255,255,0.08); color: #e5e7eb; }
body[data-theme="light"] .msg-action-btn:hover { background: rgba(0,0,0,0.07);       color: #111827; }
.msg-action-btn:active { transform: scale(0.88); }
.msg-action-btn.active-thumb-up   { color: #10b981 !important; animation: thumbPop 0.35s ease; }
.msg-action-btn.active-thumb-down { color: #ef4444 !important; animation: thumbPop 0.35s ease; }
.msg-action-btn.copied { color: #10b981 !important; }

/* ── "Copied" label under copy button ── */
.copy-label {
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-size: 0.65rem;
  font-weight: 600;
  color: #10b981;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.copy-label.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Plus Jakarta Sans for chat + input ── */
.free-chat-window,
.message-bubble,
.free-input-bar,
.input-textarea-row textarea,
.model-chip-btn {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ── Copy toast ── */
.copy-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #1f2937;
  color: #e5e7eb;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 99999;
  white-space: nowrap;
}
body[data-theme="light"] .copy-toast {
  background: #111827;
  color: #f9fafb;
}
.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===================== AI CONTROLS (FIXED TOP UNDER NAVBAR) ===================== */

.ai-shell {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

/* Controls fixed under navbar, centered within max-width */
.ai-controls {
  position: fixed;
  left: 0;
  right: 0;
  top: 60px;               /* navbar height + small gap for border visibility */
  z-index: 140;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid #1f2933;
  background: #020617;
}

body[data-theme="light"] .ai-controls {
  background: #e5e7eb;
}

/* Base controls */

.ai-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
  flex: 1 1 0;
}

.ai-control label {
  font-size: 0.75rem;
  font-weight: 500;
}

body[data-theme="dark"] .ai-control label {
  color: #e5e7eb;
}

body[data-theme="light"] .ai-control label {
  color: #374151;
}

.ai-control select,
.ai-control input {
  height: 40px;
  border-radius: 999px;
  border: 1px solid #374151;
  padding: 0 14px;
  font-size: 0.85rem;
  outline: none;
  transition: border 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body[data-theme="dark"] .ai-control select,
body[data-theme="dark"] .ai-control input {
  color: #e5e7eb;
  background: #020617;
  border-color: #374151;
}

body[data-theme="light"] .ai-control select,
body[data-theme="light"] .ai-control input {
  color: #111827;
  background: #ffffff;
  border-color: #d1d5db;
}

/* Hover/focus – dark */
body[data-theme="dark"] .ai-control select:hover,
body[data-theme="dark"] .ai-control input:hover {
  border-color: #4b5563;
}

body[data-theme="dark"] .ai-control select:focus,
body[data-theme="dark"] .ai-control input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

/* Hover/focus – light */
body[data-theme="light"] .ai-control select:hover,
body[data-theme="light"] .ai-control input:hover {
  border-color: #9ca3af;
}

body[data-theme="light"] .ai-control select:focus,
body[data-theme="light"] .ai-control input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* ===================== FREE STYLE CHAT LAYOUT ===================== */

.free-chat-shell {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Chat area: top padding = navbar + controls, so answers never go behind */

.free-chat-window {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 136px 12px 200px;   /* 136px top ensures chat starts below controls (58px navbar + ~78px controls) */
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.free-chat-window::-webkit-scrollbar {
  width: 6px;
}

.free-chat-window::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 999px;
}

/* Floating input centered at bottom */

.free-input-wrapper {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.free-input-bar {
  pointer-events: auto;
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border: 1px solid transparent;
}

/* Textarea inside bar */

.free-input-bar textarea {
  flex: 1;
  border: none;
  resize: none;
  min-height: 40px;
  max-height: 160px;
  padding: 6px 8px;
  font-size: 0.95rem;
  background: transparent;
  outline: none;
  overflow-y: auto;
}

body[data-theme="dark"] .free-input-bar textarea {
  color: #e5e7eb;
}

body[data-theme="light"] .free-input-bar textarea {
  color: #111827;
}

.free-input-bar textarea::placeholder {
  color: #9ca3af;
}

/* Send button — see .tb-send rule below */

/* Loading spinner */

.send-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(249, 250, 251, 0.4);
  border-top-color: #f9fafb;
  animation: send-spin 0.6s linear infinite;
}

@keyframes send-spin {
  to {
    transform: rotate(360deg);
  }
}

/* AI Disclaimer */

.ai-disclaimer {
  pointer-events: auto;
  text-align: center;
  font-size: 0.73rem;
  padding: 8px 20px 0;
  margin-top: 6px;
  max-width: 900px;
  width: 100%;
}

body[data-theme="dark"] .ai-disclaimer {
  opacity: 0.4;
  color: #e5e7eb;
}

body[data-theme="light"] .ai-disclaimer {
  opacity: 0.65;
  color: #374151;
}

/* === NEW ABOUT & FOUNDER STYLES === */

.hero-subtitle {
  font-size: 20px;
  opacity: 0.85;
  margin-bottom: 12px;
  text-align: center;
}

.hero-cta {
  display: inline-block;
  margin-top: 22px;
  padding: 12px 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: 0.25s ease;
}

.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.5);
}

.section h2 {
  font-size: 28px;
  margin-bottom: 14px;
}

.section p,
.section li {
  font-size: 17px;
  color: #d1d5db;
  margin-bottom: 8px;
}

.founder-section {
  text-align: center;
  max-width: 850px;
  margin: auto;
  padding-top: 40px;
}

strong {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

body[data-theme="light"] strong {
  background: rgba(0, 0, 0, 0.1);
}

/* ===================== RESPONSIVE (MOBILE) ===================== */

@media (max-width: 768px) {
  .navbar {
    padding: 10px 12px;
  }

  .page-main {
    padding-top: 49px;   /* Mobile navbar height including border */
  }

  .ai-controls {
    top: 51px;              /* mobile navbar + small gap for border visibility */
    padding: 6px 8px;
    gap: 4px;
    border-radius: 10px;
  }

  .ai-control {
    flex: 1 1 48%;
    min-width: 0;
  }

  .ai-control label {
    font-size: 0.7rem;
  }

  .ai-control select,
  .ai-control input {
    height: 32px;
    font-size: 0.75rem;
  }

  /* Smaller top padding but still clears navbar + controls */
  .free-chat-window {
    padding: 118px 8px 210px;
  }

  .free-input-wrapper {
    bottom: 10px;
  }

  .free-input-bar {
    margin: 0 8px;
    padding: 8px 10px;
  }

  .free-input-bar textarea {
    font-size: 0.9rem;
  }
}
/* === HOMEPAGE ADDITIONS ONLY === */

.hero-subtitle {
  font-size: 20px;
  opacity: 0.85;
  margin-top: 6px;
  margin-bottom: 8px;
  text-align: center;
}

/* Lists look clean & readable */
.section ul {
  margin-top: 12px;
  padding-left: 18px;
}

.section li {
  margin-bottom: 8px;
}

/* Emphasis without color change */
strong {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

/* Light theme emphasis background */
body[data-theme="light"] strong {
  background: rgba(0, 0, 0, 0.1);
}

/* === FORCE BLACK TEXT IN LIGHT THEME (HOMEPAGE) === */
body[data-theme="light"] .section p,
body[data-theme="light"] .section li,
body[data-theme="light"] .section h2,
body[data-theme="light"] .hero-subtitle {
  color: #000000;
}

body[data-theme="dark"] .section p,
body[data-theme="dark"] .section li,
body[data-theme="dark"] .section h2,
body[data-theme="dark"] .hero-subtitle {
  color: #ffffff;
}


/* Lists look clean & readable */
.section ul {
  margin-top: 12px;
  padding-left: 18px;
}

.section li {
  margin-bottom: 8px;
}

/* Emphasis without color change */
strong {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

/* Light theme emphasis background */
body[data-theme="light"] strong {
  background: rgba(0, 0, 0, 0.1);
}

/* === FORCE BLACK TEXT IN LIGHT THEME (HOMEPAGE) === */
body[data-theme="light"] .section p,
body[data-theme="light"] .section li,
body[data-theme="light"] .section h2,
body[data-theme="light"] .hero-subtitle {
  color: #000000;
}

body[data-theme="dark"] .section p,
body[data-theme="dark"] .section li,
body[data-theme="dark"] .section h2,
body[data-theme="dark"] .hero-subtitle {
  color: #ffffff;
}


.auth-message {
  margin-top: 10px;
  text-align: center;
  font-size: 0.9rem;
}

.auth-message.error {
  color: #ef4444;
}

.auth-message.success {
  color: #22c55e;
}

.auth-message.info {
  color: #60a5fa;
}
/* ===============================
   AUTH MESSAGE (LOGIN / SIGNUP)
   =============================== */

.auth-message {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
}

/* Success */
.auth-message.success {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

/* Error */
.auth-message.error {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Hidden by default */
.auth-message.hidden {
  display: none;
}


/* ===================== MODEL SELECTOR ===================== */

.model-selector {
  position: relative;
  display: flex;
  align-items: center;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.12s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

body[data-theme="light"] .icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Dropdown */

.model-dropdown {
  position: fixed;
  min-width: 220px;
  border-radius: 12px;
  overflow: hidden;
  display: none;
  z-index: 9999;
  pointer-events: auto;
  border: 1px solid #374151;
  background: #020617;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

.model-dropdown div {
  padding: 10px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.model-dropdown div:hover {
  background: #1f2937;
}

/* Light theme */

body[data-theme="light"] .model-dropdown {
  background: #ffffff;
  border-color: #d1d5db;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

body[data-theme="light"] .model-dropdown div:hover {
  background: #f3f4f6;
}

.profile-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px 60px;
}

.profile-card {
  max-width: 520px;
  width: 100%;
  border-radius: 20px;
  padding: 28px 22px;
  border: 1px solid #1f2933;
  background: #05080b;
  box-shadow: 0 16px 40px rgba(0,0,0,0.8);
}

body[data-theme="light"] .profile-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 18px 40px rgba(15,23,42,0.14);
}

.profile-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #111827;
}

.profile-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 22px;
}

.profile-stats div {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

.profile-stats strong {
  font-size: 1.2rem;
}

.profile-section-title {
  font-size: 1rem;
  margin-bottom: 12px;
}

.gemini-loader {
  display: flex;
  gap: 6px;
  padding: 8px 0;
}

.gemini-loader span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #888;
  animation: bounce 1.4s infinite ease-in-out;
}

.gemini-loader span:nth-child(2) {
  animation-delay: 0.2s;
}
.gemini-loader span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.3;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===================================================================
   DASHBOARD — VOICE INPUT & GEMINI-STYLE UPLOAD  (dashboard only)
   =================================================================== */

/* ── Redesigned input bar: pill shape preserved, content stacks ── */
.free-input-bar {
  /* Override the single-row flex to allow vertical stacking */
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  border-radius: 24px !important;  /* rounder for Gemini feel */
  padding: 0 !important;
  overflow: hidden;
}

/* ── Chip strip (file previews) — lives inside the pill ── */
.upload-chips-row {
  display: none;                /* hidden until files attached */
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.upload-chips-row.has-files {
  display: flex;
  border-bottom-color: #1f2933;
}

body[data-theme="light"] .upload-chips-row.has-files {
  border-bottom-color: #e5e7eb;
}

/* ── Individual chip ── */
.upload-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  max-width: 220px;
  cursor: default;
  transition: background 0.15s;
  position: relative;
}

body[data-theme="dark"]  .upload-chip {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e5e7eb;
}

body[data-theme="light"] .upload-chip {
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.1);
  color: #111827;
}

body[data-theme="dark"]  .upload-chip:hover { background: rgba(255,255,255,0.11); }
body[data-theme="light"] .upload-chip:hover { background: rgba(0,0,0,0.07); }

/* Image thumbnail inside chip */
.chip-thumb {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

/* File icon for non-images */
.chip-file-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

body[data-theme="dark"]  .chip-file-icon { background: rgba(255,255,255,0.08); }
body[data-theme="light"] .chip-file-icon { background: rgba(0,0,0,0.06); }

/* Chip text */
.chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
  line-height: 1.2;
}

.chip-size {
  font-size: 0.66rem;
  opacity: 0.55;
  white-space: nowrap;
}

.chip-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Remove (×) button */
.chip-remove {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, opacity 0.15s;
  opacity: 0.5;
  background: transparent;
  color: inherit;
  padding: 0;
}

.chip-remove:hover {
  opacity: 1;
  background: rgba(239,68,68,0.18);
  color: #ef4444;
}

/* ── Bottom row: textarea + icon buttons ── */
.input-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 8px 10px 8px 14px;
}

.input-toolbar textarea {
  flex: 1;
  border: none;
  resize: none;
  min-height: 40px;
  max-height: 160px;
  padding: 8px 4px;
  font-size: 0.95rem;
  background: transparent;
  outline: none;
  overflow-y: auto;
  line-height: 1.5;
  align-self: flex-end;
}

body[data-theme="dark"]  .input-toolbar textarea { color: #e5e7eb; }
body[data-theme="light"] .input-toolbar textarea { color: #111827; }
.input-toolbar textarea::placeholder { color: #9ca3af; }

/* ── Toolbar icon buttons ── */
.tb-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.12s;
  color: inherit;
  position: relative;
}

body[data-theme="dark"]  .tb-btn { color: #9ca3af; }
body[data-theme="light"] .tb-btn { color: #6b7280; }

body[data-theme="dark"]  .tb-btn:hover { background: rgba(255,255,255,0.08); color: #e5e7eb; transform: scale(1.08); }
body[data-theme="light"] .tb-btn:hover { background: rgba(0,0,0,0.06);       color: #111827; transform: scale(1.08); }

/* Voice recording active state */
@keyframes mic-pulse {
  0%   { box-shadow: 0 0 0 0    rgba(239,68,68,0.5); }
  70%  { box-shadow: 0 0 0 8px  rgba(239,68,68,0);   }
  100% { box-shadow: 0 0 0 0    rgba(239,68,68,0);   }
}

.tb-btn#voiceBtn.recording,
.tb-icon-btn#voiceBtn.recording {
  color: #ef4444 !important;
  background: rgba(239,68,68,0.12) !important;
  animation: mic-pulse 1.1s infinite;
}

/* Send button — keep existing green style, just override size for toolbar */
.tb-send {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  color: #020617 !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: transform 0.12s ease, box-shadow 0.18s ease !important;
}

.tb-send:hover   { transform: scale(1.08) !important; box-shadow: 0 6px 18px rgba(16,185,129,0.4) !important; }
.tb-send:active  { transform: scale(0.96) !important; box-shadow: none !important; }
.tb-send:disabled { background: #4b5563 !important; cursor: not-allowed !important; box-shadow: none !important; }

/* ── Image grid inside chat bubbles ── */
.chat-img-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.chat-img-grid img {
  max-width: 200px;
  max-height: 150px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.08);
}

body[data-theme="light"] .chat-img-grid img {
  border-color: rgba(0,0,0,0.08);
}

/* Mobile */
@media (max-width: 768px) {
  .free-input-bar {
    border-radius: 18px !important;
  }
  .input-toolbar {
    padding: 6px 8px 6px 12px;
  }
}


/* ===================== IMAGE GENERATION LOADER ===================== */

@keyframes imgShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes imgDotPulse {
  from { opacity: 0.3; transform: scale(0.8); }
  to   { opacity: 1;   transform: scale(1.1); }
}

/* ===================== LIGHTBOX ===================== */
@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ═══════════════════════════════════════════════════
   INPUT BAR — GEMINI-STYLE MULTI-ROW
═══════════════════════════════════════════════════ */

/* Override the default single-row flex to column */
.free-input-bar {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 10px 14px 8px !important;
  border-radius: 24px !important;
}

/* Textarea row — full width, no extra padding */
.input-textarea-row {
  display: flex;
  align-items: flex-end;
  padding: 0 2px;
}

.input-textarea-row textarea {
  flex: 1;
  border: none;
  resize: none;
  min-height: 36px;
  max-height: 160px;
  padding: 4px 0;
  font-size: 0.97rem;
  background: transparent;
  outline: none;
  overflow-y: auto;
  line-height: 1.5;
}

body[data-theme="dark"]  .input-textarea-row textarea { color: #e5e7eb; }
body[data-theme="light"] .input-textarea-row textarea { color: #111827; }
.input-textarea-row textarea::placeholder { color: #9ca3af; }

/* Bottom bar: model chip LEFT, actions RIGHT */
.input-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

/* ── Left slot (upload button) ── */
.input-left-slot {
  display: flex;
  align-items: center;
}

/* Gemini-style FLAT model selector button — no background, no border, just text */
.model-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.12s;
  line-height: 1;
}
body[data-theme="dark"]  .model-chip-btn { color: #9ca3af; }
body[data-theme="light"] .model-chip-btn { color: #6b7280; }
body[data-theme="dark"]  .model-chip-btn:hover,
body[data-theme="dark"]  .model-chip-btn.open  { background: rgba(255,255,255,0.07); color: #e5e7eb; }
body[data-theme="light"] .model-chip-btn:hover,
body[data-theme="light"] .model-chip-btn.open  { background: rgba(0,0,0,0.06); color: #111827; }

.model-chip-icon { font-size: 0.95rem; line-height: 1; }

.model-chip-chevron {
  opacity: 0.55;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.model-chip-btn.open .model-chip-chevron { transform: rotate(180deg); }

/* ── Dropdown panel — position:fixed, JS places it above the button ── */
.model-dropdown-panel {
  position: fixed;
  min-width: 230px;
  border-radius: 12px;
  padding: 6px;
  z-index: 99999;
  /* hidden by default */
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
body[data-theme="dark"]  .model-dropdown-panel {
  background: #1c2130;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
}
body[data-theme="light"] .model-dropdown-panel {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 6px 24px rgba(0,0,0,0.14);
}
/* Open state */
.model-dropdown-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header label */
.mdp-header {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px 6px;
}
body[data-theme="dark"]  .mdp-header { color: rgba(229,231,235,0.35); }
body[data-theme="light"] .mdp-header { color: rgba(17,24,39,0.35); }

/* Option row */
.mdp-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s;
}
body[data-theme="dark"]  .mdp-option:hover { background: rgba(255,255,255,0.07); }
body[data-theme="light"] .mdp-option:hover { background: rgba(0,0,0,0.05); }
.mdp-option.active {
  background: rgba(16,185,129,0.1);
}

.mdp-icon { font-size: 1.1rem; width: 26px; text-align: center; flex-shrink: 0; }

.mdp-info { flex: 1; min-width: 0; }

.mdp-name {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
}
body[data-theme="dark"]  .mdp-name { color: #f3f4f6; }
body[data-theme="light"] .mdp-name { color: #111827; }

.mdp-desc {
  font-size: 0.71rem;
  margin-top: 2px;
  opacity: 0.45;
  line-height: 1.3;
}
body[data-theme="dark"]  .mdp-desc { color: #d1d5db; }
body[data-theme="light"] .mdp-desc { color: #374151; }

.mdp-check {
  font-size: 0.85rem;
  color: #10b981;
  font-weight: 700;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  margin-left: auto;
}

/* ── Actions slot (right) ── */
.input-actions-slot {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Icon buttons (upload, voice) */
.tb-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.12s;
  flex-shrink: 0;
}
body[data-theme="dark"]  .tb-icon-btn { background: rgba(255,255,255,0.07); color: #9ca3af; }
body[data-theme="light"] .tb-icon-btn { background: rgba(0,0,0,0.05);       color: #6b7280; }
body[data-theme="dark"]  .tb-icon-btn:hover { background: rgba(255,255,255,0.14); color: #e5e7eb; transform: scale(1.08); }
body[data-theme="light"] .tb-icon-btn:hover { background: rgba(0,0,0,0.1);        color: #111827; transform: scale(1.08); }
.tb-icon-btn.recording { background: rgba(239,68,68,0.2) !important; color: #ef4444 !important; }

/* ── SSE word fade-in animation ── */
@keyframes wordFadeIn {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stream-word {
  display: inline;
  animation: wordFadeIn 0.22s ease forwards;
}
/* ═══════════════════════════════════════════════════════════════
   PROFILE PANEL — works on every page
═══════════════════════════════════════════════════════════════ */

/* ── Overlay ── */
.profile-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
}
.profile-overlay.open { opacity: 1; pointer-events: auto; }

/* ── Panel ── */
.profile-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 320px; max-width: 92vw;
  z-index: 9001;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
body[data-theme="dark"]  .profile-panel { background: #0d1117; border-left: 1px solid rgba(255,255,255,0.08); }
body[data-theme="light"] .profile-panel { background: #ffffff; border-left: 1px solid rgba(0,0,0,0.07); box-shadow: -8px 0 40px rgba(0,0,0,0.12); }
.profile-panel.open { transform: translateX(0); }

/* ── Header ── */
.pp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid;
  flex-shrink: 0;
}
body[data-theme="dark"]  .pp-header { border-color: rgba(255,255,255,0.07); }
body[data-theme="light"] .pp-header { border-color: rgba(0,0,0,0.07); }
.pp-header h2 { font-size: 0.95rem; font-weight: 700; }
.pp-close {
  width: 30px; height: 30px; border: none; border-radius: 8px;
  background: transparent; cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 1.1rem;
  opacity: 0.45; transition: opacity 0.15s, background 0.15s;
}
.pp-close:hover { opacity: 1; background: rgba(128,128,128,0.1); }
body[data-theme="dark"]  .pp-close { color: #e5e7eb; }
body[data-theme="light"] .pp-close { color: #111827; }

/* ── Logged-out state ── */
.pp-loggedout {
  display: flex; flex-direction: column; align-items: center;
  padding: 52px 24px 36px; text-align: center; gap: 10px; flex: 1;
}
.pp-lo-icon { font-size: 3rem; opacity: 0.25; }
.pp-lo-title { font-size: 1rem; font-weight: 700; margin-top: 4px; }
.pp-lo-sub { font-size: 0.83rem; opacity: 0.45; line-height: 1.55; max-width: 220px; }
.pp-lo-btn {
  display: block; width: 100%; max-width: 220px;
  padding: 11px; border-radius: 999px; text-align: center;
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  margin-top: 6px; transition: opacity 0.15s, transform 0.12s;
  background: #10b981; color: #020617; border: none;
}
.pp-lo-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.pp-lo-btn-ghost {
  background: transparent !important;
  border: 1px solid rgba(128,128,128,0.3) !important;
  margin-top: 0 !important;
}
body[data-theme="dark"]  .pp-lo-btn-ghost { color: #e5e7eb; }
body[data-theme="light"] .pp-lo-btn-ghost { color: #111827; }

/* ── Identity block ── */
.pp-identity {
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 20px 18px; text-align: center; gap: 6px;
}

/* Avatar wrapper with edit button */
.pp-avatar-wrap {
  position: relative;
  width: 72px; height: 72px;
  flex-shrink: 0;
}
.pp-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 700;
  background: linear-gradient(135deg, #10b981 0%, #0ea5e9 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16,185,129,0.25);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.pp-avatar-wrap:hover .pp-avatar {
  box-shadow: 0 4px 24px rgba(16,185,129,0.4);
}
.pp-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 2px solid;
  transition: transform 0.15s;
}
body[data-theme="dark"]  .pp-avatar-edit { background: #1f2937; border-color: #374151; color: #e5e7eb; }
body[data-theme="light"] .pp-avatar-edit { background: #ffffff; border-color: #d1d5db; color: #374151; }
.pp-avatar-edit:hover { transform: scale(1.15); }

/* Remove photo button — top-left corner, only visible when photo exists */
.pp-avatar-remove {
  position: absolute; top: 0; left: 0;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 2px solid;
  transition: transform 0.15s, background 0.15s;
  z-index: 2;
}
body[data-theme="dark"]  .pp-avatar-remove { background: #dc2626; border-color: #991b1b; color: #fff; }
body[data-theme="light"] .pp-avatar-remove { background: #ef4444; border-color: #dc2626; color: #fff; }
.pp-avatar-remove:hover { transform: scale(1.18); }

.pp-name  { font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.pp-email { font-size: 0.78rem; opacity: 0.38; margin-top: -2px; }
.pp-badge {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 2px;
  padding: 4px 10px; border-radius: 999px; font-size: 0.73rem; font-weight: 600;
  background: rgba(16,185,129,0.12); color: #10b981;
}

/* ── Stats grid ── */
.pp-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 0 14px 16px;
}
.pp-stat-card {
  border-radius: 12px; padding: 12px 12px 10px;
  display: flex; flex-direction: column; gap: 3px;
}
body[data-theme="dark"]  .pp-stat-card { background: #111827; border: 1px solid rgba(255,255,255,0.06); }
body[data-theme="light"] .pp-stat-card { background: #f3f4f6; border: 1px solid rgba(0,0,0,0.06); }
.pp-stat-icon { font-size: 1.1rem; line-height: 1; }
.pp-stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.pp-stat-label { font-size: 0.69rem; opacity: 0.42; font-weight: 500; }
.streak-active .pp-stat-value { color: #f59e0b; }

@keyframes flamePulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.18)} }
.streak-flame { display:inline-block; animation: flamePulse 1.5s ease-in-out infinite; }

/* ── Bio section ── */
.pp-bio-section { padding: 0 14px 14px; }
.pp-bio-text {
  font-size: 0.83rem; line-height: 1.6; opacity: 0.65;
  padding: 10px 12px; border-radius: 10px; font-style: italic;
}
body[data-theme="dark"]  .pp-bio-text { background: #111827; }
body[data-theme="light"] .pp-bio-text { background: #f3f4f6; }

/* ── Info rows ── */
.pp-info-section { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.pp-info-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px;
}
body[data-theme="dark"]  .pp-info-row { background: #111827; }
body[data-theme="light"] .pp-info-row { background: #f3f4f6; }
.pp-info-left { display: flex; align-items: center; gap: 8px; }
.pp-info-icon { font-size: 0.95rem; width: 20px; text-align: center; }
.pp-info-label { font-size: 0.78rem; opacity: 0.42; }
.pp-info-value { font-size: 0.85rem; font-weight: 600; }

/* ── Divider ── */
.pp-divider { height: 1px; margin: 2px 14px 14px; }
body[data-theme="dark"]  .pp-divider { background: rgba(255,255,255,0.06); }
body[data-theme="light"] .pp-divider { background: rgba(0,0,0,0.06); }

/* ── Edit form ── */
.pp-edit-section { padding: 0 14px 14px; }
.pp-edit-title { font-size: 0.69rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.28; margin-bottom: 10px; }
.pp-edit-form { display: flex; flex-direction: column; gap: 10px; }
.pp-edit-field { display: flex; flex-direction: column; gap: 4px; }
.pp-edit-field label { font-size: 0.71rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.38; }
.pp-edit-field input,
.pp-edit-field select,
.pp-edit-field textarea {
  padding: 8px 11px; border-radius: 9px; font-size: 0.86rem;
  font-family: inherit; outline: none; transition: border-color 0.15s; width: 100%;
  resize: none;
}
body[data-theme="dark"]  .pp-edit-field input,
body[data-theme="dark"]  .pp-edit-field select,
body[data-theme="dark"]  .pp-edit-field textarea { background: #05080b; border: 1px solid rgba(255,255,255,0.1); color: #e5e7eb; }
body[data-theme="light"] .pp-edit-field input,
body[data-theme="light"] .pp-edit-field select,
body[data-theme="light"] .pp-edit-field textarea { background: #ffffff; border: 1px solid rgba(0,0,0,0.1); color: #111827; }
body[data-theme="dark"]  .pp-edit-field input:focus,
body[data-theme="dark"]  .pp-edit-field select:focus,
body[data-theme="dark"]  .pp-edit-field textarea:focus { border-color: rgba(255,255,255,0.25); }
body[data-theme="light"] .pp-edit-field input:focus,
body[data-theme="light"] .pp-edit-field select:focus,
body[data-theme="light"] .pp-edit-field textarea:focus { border-color: rgba(0,0,0,0.25); }
.pp-edit-hint { font-size: 0.68rem; opacity: 0.3; margin-top: 1px; }
.pp-edit-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp-save-btn {
  padding: 10px; border-radius: 999px; border: none;
  font-size: 0.87rem; font-weight: 600; font-family: inherit;
  cursor: pointer; background: #10b981; color: #020617;
  transition: opacity 0.15s, transform 0.12s; margin-top: 2px;
}
.pp-save-btn:hover  { opacity: 0.88; transform: translateY(-1px); }
.pp-save-btn:active { transform: translateY(0); }
.pp-save-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.pp-save-msg { font-size: 0.76rem; text-align: center; min-height: 16px; margin-top: 2px; }

/* ── Bottom actions ── */
.pp-actions { padding: 4px 14px 28px; margin-top: auto; }
.pp-action-btn {
  width: 100%; padding: 10px; border-radius: 10px; border: none;
  font-size: 0.87rem; font-weight: 600; font-family: inherit;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.15s;
}
.pp-action-btn.logout { background: rgba(239,68,68,0.1); color: #f87171; }
.pp-action-btn.logout:hover { background: rgba(239,68,68,0.18); }

/* ── Profile nav trigger button ── */
.profile-trigger {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; cursor: pointer; flex-shrink: 0;
  border: 2px solid rgba(16,185,129,0.4);
  background: linear-gradient(135deg, #10b981 0%, #0ea5e9 100%);
  color: #fff; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.profile-trigger:hover { transform: scale(1.08); border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }

/* ── Password field with eye inside — global utility ── */
.pw-field {
  display: flex; align-items: center;
  border-radius: 10px; border: 1px solid;
  transition: border-color 0.15s; overflow: hidden;
}
body[data-theme="dark"]  .pw-field { background: #05080b; border-color: rgba(255,255,255,0.1); }
body[data-theme="light"] .pw-field { background: #f9fafb; border-color: rgba(0,0,0,0.1); }
body[data-theme="dark"]  .pw-field:focus-within { border-color: rgba(255,255,255,0.28); }
body[data-theme="light"] .pw-field:focus-within { border-color: rgba(0,0,0,0.28); }
.pw-field input {
  flex: 1; border: none !important; background: transparent !important;
  padding: 11px 4px 11px 14px; outline: none;
  font-size: 0.9rem; font-family: inherit; min-width: 0;
}
body[data-theme="dark"]  .pw-field input { color: #e5e7eb; }
body[data-theme="light"] .pw-field input { color: #111827; }
.pw-field input::placeholder { opacity: 0.32; }
.pw-eye-btn {
  flex-shrink: 0; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: inherit; opacity: 0.38; transition: opacity 0.15s; padding: 0;
}
.pw-eye-btn:hover { opacity: 0.75; }

/* ══════════════════════════════════════════════════════════
   UPLOAD DROPDOWN
══════════════════════════════════════════════════════════ */
.upload-dropdown-panel {
  position: fixed;
  min-width: 260px;
  border-radius: 12px;
  padding: 6px;
  z-index: 99999;
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
body[data-theme="dark"]  .upload-dropdown-panel {
  background: #1c2130;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
}
body[data-theme="light"] .upload-dropdown-panel {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 6px 24px rgba(0,0,0,0.14);
}
.upload-dropdown-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.upload-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s;
}
body[data-theme="dark"]  .upload-option:hover { background: rgba(255,255,255,0.07); }
body[data-theme="light"] .upload-option:hover { background: rgba(0,0,0,0.05); }

.upload-option-icon {
  flex-shrink: 0;
  opacity: 0.7;
}

.upload-option-text {
  flex: 1;
  min-width: 0;
}

.upload-option-title {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
}
body[data-theme="dark"]  .upload-option-title { color: #f3f4f6; }
body[data-theme="light"] .upload-option-title { color: #111827; }

.upload-option-desc {
  font-size: 0.72rem;
  margin-top: 2px;
  opacity: 0.45;
  line-height: 1.3;
}
body[data-theme="dark"]  .upload-option-desc { color: #d1d5db; }
body[data-theme="light"] .upload-option-desc { color: #374151; }

/* ══════════════════════════════════════════════════════════
   FORGOT PASSWORD MODAL
══════════════════════════════════════════════════════════ */
.forgot-pw-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.forgot-pw-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.forgot-pw-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  padding: 32px 28px;
}
body[data-theme="dark"]  .forgot-pw-card {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
body[data-theme="light"] .forgot-pw-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.forgot-pw-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.forgot-pw-desc {
  font-size: 0.88rem;
  opacity: 0.55;
  margin-bottom: 24px;
  line-height: 1.5;
}
