:root {
  --bg: #090303;
  --panel: rgba(34, 7, 7, 0.92);
  --panel-soft: rgba(63, 13, 13, 0.92);
  --border: rgba(255, 90, 90, 0.24);
  --primary: #ff2020;
  --primary-strong: #ff0000;
  --secondary: #35ff72;
  --accent: #38a8ff;
  --text: #fff5f5;
  --muted: #d6b6b6;
  --danger: #ff6262;
  --shadow: 0 14px 40px rgba(255, 0, 0, 0.22);
  --code-bg: #0b0f18;
  --code-line: rgba(255, 66, 66, 0.18);
  --code-head: rgba(17, 28, 40, 0.9);
  --copied: #24d26a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 0, 0, 0.18), transparent 28%),
    linear-gradient(180deg, #140202 0%, #090303 38%, #050202 100%);
  color: var(--text);
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 320px;
  background: linear-gradient(180deg, rgba(53, 9, 9, 0.98), rgba(15, 4, 4, 0.98));
  border-right: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
  position: relative;
}

.brand-card,
.assistant-card,
.new-chat-btn,
.chat-item,
.hero-panel,
.composer,
.topbar,
.file-preview,
.dropdown-menu,
.context-menu,
.api-key-section {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.brand-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}
.brand-mark,
.new-chat-wo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: white;
  background: linear-gradient(145deg, var(--primary-strong), #7f0000);
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.42);
}
.brand-title { font-weight: 800; font-size: 1.15rem; color: var(--primary); }
.brand-subtitle { color: var(--muted); font-size: 0.92rem; }

.new-chat-btn {
  width: 100%;
  margin-top: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 0, 0, 0.14), rgba(255, 0, 0, 0.08));
  padding: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: center;
  color: var(--text);
}
.new-chat-text {
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--primary);
  align-self: end;
}
.new-chat-label {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: left;
}

.assistant-card {
  margin-top: 16px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 0, 0, 0.04));
  overflow: hidden;
}
.assistant-visual-wrap {
  position: relative;
  padding: 14px;
}
.assistant-visual {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 20px;
  display: block;
  background: linear-gradient(135deg, #240707, #090303);
}
.assistant-glow {
  position: absolute;
  inset: auto 28px 24px 28px;
  height: 60px;
  filter: blur(28px);
  background: rgba(255, 0, 0, 0.42);
  z-index: 0;
}
.assistant-info { padding: 0 16px 16px; }
.assistant-info h2 { margin: 0 0 6px; font-size: 1.05rem; }
.assistant-info p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.assistant-info code { color: var(--secondary); }

/* NOUVEAU : Styles pour la section clé API */
.api-key-section {
  margin-top: 16px;
  border-radius: 20px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(53, 255, 114, 0.04));
  border-color: rgba(53, 255, 114, 0.18);
}
.api-key-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.api-key-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--secondary);
}
.api-key-toggle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.api-key-input-wrapper {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.api-key-input {
  flex: 1;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.9rem;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.api-key-input:focus {
  border-color: rgba(53, 255, 114, 0.45);
  box-shadow: 0 0 0 3px rgba(53, 255, 114, 0.12);
}
.api-key-save {
  border-radius: 12px;
  border: 1px solid rgba(53, 255, 114, 0.3);
  background: rgba(53, 255, 114, 0.08);
  color: var(--secondary);
  font-weight: 700;
  padding: 0 14px;
  white-space: nowrap;
}
.api-key-status {
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 18px;
}
.api-key-status.valid {
  color: var(--secondary);
}
.api-key-status.invalid {
  color: var(--danger);
}

.sidebar-section-title {
  margin: 18px 4px 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.chat-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 120px;
}
.chat-item {
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
}
.chat-item.pinned { border-color: rgba(53, 255, 114, 0.38); }
.chat-item-title {
  display: block;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item-meta { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }

.chat-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 0, 0, 0.08), transparent 26%),
    linear-gradient(180deg, #1a0303 0%, #120202 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(27, 5, 5, 0.92);
  backdrop-filter: blur(14px);
}
.topbar-title-wrap { flex: 1; min-width: 0; }
.topbar-title { font-weight: 800; font-size: 1.12rem; color: var(--primary); }
.topbar-subtitle { color: var(--muted); font-size: 0.88rem; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.file-btn { font-size: 1.5rem; line-height: 1; }
.hidden-file { display: none; }

.dropdown-menu,
.context-menu {
  position: fixed;
  background: rgba(21, 4, 4, 0.98);
  border-radius: 18px;
  padding: 8px;
  min-width: 180px;
  z-index: 80;
}
.dropdown-menu button,
.context-menu button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  color: var(--text);
  background: transparent;
}
.dropdown-menu button:hover,
.context-menu button:hover { background: rgba(255,255,255,0.06); }
.context-menu .danger { color: var(--danger); }
.hidden { display: none !important; }

.hero-panel {
  margin: 16px;
  border-radius: 30px;
  padding: 18px;
  background:
    radial-gradient(circle at 80% 20%, rgba(56, 168, 255, 0.18), transparent 24%),
    radial-gradient(circle at 20% 20%, rgba(53, 255, 114, 0.12), transparent 22%),
    linear-gradient(160deg, rgba(255, 0, 0, 0.2), rgba(255, 255, 255, 0.02));
  position: relative;
  overflow: hidden;
}
.hero-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 700;
}
.hero-panel h1 { margin: 14px 0 10px; font-size: 1.6rem; }
.hero-panel p { margin: 0; max-width: 640px; color: var(--muted); line-height: 1.55; }
.hero-orb {
  position: absolute;
  right: -40px;
  top: -30px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,0,0,0.48), rgba(56,168,255,0.14) 46%, transparent 70%);
  filter: blur(12px);
}

.messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.message-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}
.message-row.user { flex-direction: row-reverse; }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  flex: 0 0 auto;
  background: linear-gradient(145deg, #410909, #180404);
  border: 1px solid var(--border);
  box-shadow: 0 0 16px rgba(255,0,0,0.2);
  background-size: cover;
  background-position: center;
}
.message-row.assistant .avatar {
  background-image: url('assets/worn.jpg');
}
.message-row.user .avatar {
  background: linear-gradient(145deg, rgba(56,168,255,0.9), rgba(53,255,114,0.82));
}
.bubble-wrap { max-width: min(88%, 860px); min-width: 0; }
.message-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}
.message-author { font-weight: 700; }
.bubble {
  padding: 11px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  line-height: 1.44;
  white-space: normal;
  word-break: break-word;
  overflow: hidden;
}
.message-row.user .bubble {
  background: linear-gradient(180deg, rgba(255, 0, 0, 0.28), rgba(255, 0, 0, 0.18));
}
.message-row.assistant .bubble {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
}
.message-row.error .bubble {
  border-color: rgba(255, 98, 98, 0.45);
  background: rgba(255, 98, 98, 0.1);
}
.message-actions {
  margin-top: 7px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tiny-btn {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 10px;
  transition: .18s ease;
}
.tiny-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.tiny-btn.copied,
.code-copy-btn.copied {
  background: rgba(36, 210, 106, 0.14);
  border-color: rgba(36, 210, 106, 0.45);
  color: var(--copied);
}
.typing-dots::after {
  content: ' .';
  animation: dots 1.2s infinite steps(4);
}
@keyframes dots {
  0% { content: ' .'; }
  33% { content: ' ..'; }
  66% { content: ' ...'; }
  100% { content: ' .'; }
}

.file-preview {
  margin: 0 16px 10px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(53, 255, 114, 0.08);
}
.file-chip-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(53,255,114,0.25);
  color: var(--text);
  font-size: 0.88rem;
}

.file-thumb {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.08);
}

.file-chip-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-chip-text strong,
.file-chip-text small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-chip-text small {
  color: var(--muted);
}

.file-remove-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.composer-wrap {
  padding: 12px 16px 16px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(15,4,4,0), rgba(15,4,4,0.96) 34%);
}
.composer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  border-radius: 24px;
  padding: 9px;
  background: rgba(37, 7, 7, 0.96);
}
#messageInput {
  flex: 1;
  resize: none;
  max-height: 180px;
  overflow-y: auto;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  padding: 9px 11px;
  line-height: 1.4;
}
#messageInput::placeholder { color: #c89b9b; }
.send-btn {
  border: 0;
  border-radius: 16px;
  padding: 13px 17px;
  font-weight: 800;
  color: white;
  background: linear-gradient(145deg, var(--primary-strong), #750000);
  min-width: 104px;
}
.send-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.composer-hint {
  margin-top: 8px;
  padding-left: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.empty-state {
  margin: 10px 16px 24px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--border);
  color: var(--muted);
}

/* Rendu riche assistant */
.bubble-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.rich-block:last-child {
  margin-bottom: 0;
}

.rich-heading {
  margin: 2px 0 0;
  color: #ff7e1c;
  font-weight: 900;
  line-height: 1.2;
}
.rich-heading.h1 { font-size: 1.32rem; }
.rich-heading.h2 { font-size: 1.16rem; }
.rich-heading.h3 { font-size: 1.03rem; }

.rich-text {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  font-size: 0.96rem;
}

.rich-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rich-list li {
  line-height: 1.42;
  color: var(--text);
  font-size: 0.96rem;
}
.rich-list li::marker {
  color: #ff8b2b;
  font-weight: 800;
}

.rich-separator {
  height: 1px;
  margin: 6px 0 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,125,125,0.45), rgba(255,255,255,0.06));
  border: 0;
}

.inline-code {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(53, 255, 114, 0.12);
  color: #6fff9a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  border: 1px solid rgba(53,255,114,0.18);
}

.code-block {
  border: 1px solid var(--code-line);
  border-radius: 18px;
  overflow: hidden;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(7,11,18,0.98), rgba(4,6,12,0.98));
  box-shadow: 0 12px 30px rgba(0,0,0,0.28);
}
.code-block + .code-block {
  margin-top: 4px;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  background: linear-gradient(180deg, rgba(14,24,35,0.94), rgba(10,18,29,0.94));
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.code-lang {
  color: #35ddff;
  font-weight: 800;
  font-size: 0.98rem;
  text-transform: lowercase;
}
.code-copy-btn {
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: #35ddff;
  border-radius: 999px;
  padding: 7px 11px;
  min-width: 96px;
  font-weight: 700;
  transition: .18s ease;
}
.code-copy-btn:hover {
  background: rgba(255,255,255,0.07);
}
.code-pre {
  margin: 0;
  padding: 12px 12px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(180deg, rgba(3,8,18,0.98), rgba(2,5,12,0.98));
  color: #edf3ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.5;
}
.code-pre code {
  white-space: pre;
  display: block;
  min-width: max-content;
}

.token-keyword { color: #c084fc; font-weight: 700; }
.token-string { color: #6ee7b7; }
.token-number { color: #fbbf24; }
.token-comment { color: #94a3b8; font-style: italic; }
.token-symbol { color: #60a5fa; }

.kbd-run {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255,125,0,0.12);
  color: #ffc06b;
  border: 1px solid rgba(255, 144, 0, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

strong {
  color: #fff;
  font-weight: 800;
}

@media (max-width: 920px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    transform: translateX(-102%);
    transition: transform .22s ease;
    max-width: 90vw;
  }
  .sidebar.open { transform: translateX(0); }
  .hero-panel h1 { font-size: 1.35rem; }
  .bubble-wrap { max-width: 100%; }
}

@media (max-width: 520px) {
  .topbar, .hero-panel, .messages, .composer-wrap { padding-left: 12px; padding-right: 12px; }
  .hero-panel { margin: 12px; }
  .topbar { gap: 10px; }
  .icon-btn { width: 40px; height: 40px; border-radius: 12px; }
  .send-btn { min-width: 84px; padding: 12px 13px; }
  .bubble { padding: 10px 11px; border-radius: 17px; }
  .message-meta { font-size: 0.76rem; }
  .composer { gap: 8px; padding: 8px; }
  #messageInput { padding: 8px 10px; font-size: 0.96rem; }
  .code-header { padding: 8px 9px; }
  .code-copy-btn { min-width: 84px; padding: 6px 10px; }
  .code-pre { padding: 10px; font-size: 0.85rem; }
  .rich-heading.h1 { font-size: 1.18rem; }
  .rich-heading.h2 { font-size: 1.08rem; }
  .rich-heading.h3 { font-size: 0.98rem; }
  .rich-text, .rich-list li { font-size: 0.92rem; }
  .file-chip { width: 100%; }
}

/* Welcome */
.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at center, rgba(255,0,0,0.18), transparent 30%),
    linear-gradient(180deg, #190303 0%, #090202 100%);
  overflow: hidden;
}
.welcome-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,0,0,0.24), transparent 22%),
    radial-gradient(circle at 20% 80%, rgba(56,168,255,0.12), transparent 20%),
    radial-gradient(circle at 80% 78%, rgba(53,255,114,0.10), transparent 18%);
  filter: blur(6px);
}
.welcome-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  border-radius: 32px;
  padding: 26px 22px 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(43, 7, 7, 0.96), rgba(18, 4, 4, 0.96));
  border: 1px solid rgba(255, 70, 70, 0.24);
  box-shadow: 0 20px 60px rgba(255,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.05);
}
.welcome-ring {
  position: absolute;
  inset: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255,0,0,0.10);
  pointer-events: none;
}
.welcome-avatar {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 2px auto 16px;
  border: 2px solid rgba(255, 40, 40, 0.7);
  box-shadow: 0 0 22px rgba(255,0,0,0.55), 0 0 60px rgba(255,0,0,0.18);
  animation: redBreathe 2.8s ease-in-out infinite;
  background: #130303;
}
.welcome-kicker {
  color: var(--secondary);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 700;
}
.welcome-title-screen {
  margin: 0;
  color: #ff2f2f;
  font-size: 2.3rem;
  line-height: 1.05;
  text-shadow: 0 0 20px rgba(255,0,0,0.35);
}
.welcome-text-screen {
  margin: 12px 0 22px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.98rem;
}
.start-btn-screen {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #ff0000, #8a0000);
  box-shadow: 0 0 20px rgba(255,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
}
.start-btn-screen:active { transform: scale(0.985); }
.app-hidden { display: none; }
.screen-fade-out { animation: screenFadeOut .55s ease forwards; }
@keyframes redBreathe {
  0%,100% { transform: scale(1); box-shadow: 0 0 22px rgba(255,0,0,0.55), 0 0 60px rgba(255,0,0,0.18); }
  50% { transform: scale(1.055); box-shadow: 0 0 34px rgba(255,0,0,0.82), 0 0 92px rgba(255,0,0,0.25); }
}
@keyframes screenFadeOut {
  from { opacity: 1; visibility: visible; }
  to { opacity: 0; visibility: hidden; }
}
.community-card{
  margin-top:15px;
  padding:12px;
  border-radius:20px;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,0,0,0.2);
}
.community-title{
  font-weight:700;
  margin-bottom:8px;
}
.community-links{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.community-btn{
  padding:10px;
  border-radius:12px;
  text-align:center;
  color:#fff;
  text-decoration:none;
  font-weight:700;
}
.community-btn.whatsapp{
  background:#0d8f47;
}
.community-btn.telegram{
  background:#1c7dd8;
}

.rename-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
}
.rename-modal-card {
  width: min(92vw, 420px);
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(34, 7, 7, 0.98), rgba(15, 4, 4, 0.98));
  box-shadow: var(--shadow);
  padding: 18px;
}
.rename-modal-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}
.rename-modal-input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 14px;
  outline: none;
}
.rename-modal-input:focus {
  border-color: rgba(53, 255, 114, 0.45);
  box-shadow: 0 0 0 3px rgba(53, 255, 114, 0.12);
}
.rename-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.rename-cancel-btn,
.rename-save-btn {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px 14px;
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
.rename-save-btn {
  background: linear-gradient(180deg, rgba(255, 0, 0, 0.24), rgba(255, 0, 0, 0.16));
}


.scroll-to-bottom-btn {
  position: fixed;
  right: 18px;
  bottom: 104px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 214, 10, 0.45);
  background: rgba(255, 214, 10, 0.24);
  color: rgba(255, 235, 140, 0.98);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  z-index: 70;
}

.scroll-to-bottom-btn:hover {
  background: rgba(255, 214, 10, 0.32);
}

.scroll-to-bottom-btn:active {
  transform: scale(0.96);
}

@media (max-width: 920px) {
  .scroll-to-bottom-btn {
    right: 14px;
    bottom: 96px;
  }
}