/* ═══════════════════════════════════════════════
   CLIPSHARE — MODERN DARK UI
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;600;700;900&family=Syne:wght@400;700;800&family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface-2: #16161f;
  --surface-3: #1d1d28;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.13);
  --text: #e8e8f0;
  --text-muted: #6b6b85;
  --accent: #7c6fff;
  --accent-2: #a8ff57;
  --accent-glow: rgba(124, 111, 255, 0.35);
  --accent2-glow: rgba(168, 255, 87, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body:not(.dark-mode) {
  --bg: #fcfaf8;
  --surface: #ffffff;
  --surface-2: #f5f1eb;
  --surface-3: #eae3d9;
  --border: rgba(60, 50, 40, 0.08);
  --border-2: rgba(60, 50, 40, 0.14);
  --text: #2d2a27;
  --text-muted: #8c857e;
  --accent: #5b52e8;
  --accent-2: #3a8f00;
  --accent-glow: rgba(91, 82, 232, 0.20);
  --accent2-glow: rgba(58, 143, 0, 0.15);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  padding-top: 0;
  margin: 0;
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* ── Noise texture background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.6;
}

body:not(.dark-mode)::before {
  opacity: 0.3;
}

/* ── Glow orbs ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 40% at 20% 60%, rgba(124, 111, 255, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 80% 30%, rgba(168, 255, 87, 0.09) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(124, 111, 255, 0.08) 0%, transparent 60%);
  animation: orbDrift 18s ease-in-out infinite alternate;
}

@keyframes orbDrift {
  from {
    opacity: 0.7;
    transform: scale(1);
    filter: blur(0px);
  }

  to {
    opacity: 1;
    transform: scale(1.04);
    filter: blur(2px);
  }
}

/* ── Topbar / Nav ── */
.cs-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

body:not(.dark-mode) .cs-topbar {
  background: rgba(244, 244, 248, 0.80);
}

.cs-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.cs-topbar-brand img {
  height: 28px;
  width: 28px;
  object-fit: contain;
}

.cs-topbar-brand span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}

.cs-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Icon Buttons (topbar) ── */
.cs-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all var(--transition);
}

.cs-icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Legacy theme-toggle & info-toggle compatibility ── */
.theme-toggle,
#info-toggle {
  position: fixed;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 1001;
}

.theme-toggle {
  bottom: 28px;
  right: 28px;
}

#info-toggle {
  top: 11px;
  right: 74px;
}

.theme-toggle:hover,
#info-toggle:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Hero Section ── */
.cs-hero {
  position: relative;
  z-index: 1;
  padding: 110px 20px 40px;
}

.cs-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.cs-hero-title .accent-purple {
  color: var(--accent);
}

.cs-hero-title .accent-green {
  color: var(--accent-2);
}

.cs-hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 38px;
  font-weight: 400;
}

/* ── Mode Toggle Pills ── */
.cs-mode-toggle {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 50px;
  padding: 4px;
  gap: 2px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.cs-mode-btn {
  padding: 8px 28px;
  border-radius: 50px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.cs-mode-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.cs-mode-btn:not(.active):hover {
  color: var(--text);
  background: var(--surface-3);
}

/* ── Legacy toggle-btns alias ── */
.toggle-btns {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 0 0 32px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 50px;
  padding: 4px;
  width: fit-content;
  margin: 0 auto 32px;
}

.toggle-btns button {
  padding: 8px 28px;
  border-radius: 50px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
  color: var(--text-muted);
}

.toggle-btns button.btn-light,
.toggle-btns .active {
  background: var(--accent) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.toggle-btns button.btn-dark {
  background: transparent !important;
  color: var(--text-muted) !important;
  border: none !important;
}

.toggle-btns button:not(.btn-light):hover {
  color: var(--text) !important;
  background: var(--surface-3) !important;
}

/* ── Main Content Area ── */
.cs-main {
  position: relative;
  z-index: 1;
  padding-bottom: 80px;
}

/* ── Panel Card ── */
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: left;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.panel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.panel-card:hover::before {
  opacity: 1;
}

.panel-card:hover {
  border-color: rgba(124, 111, 255, 0.3);
  box-shadow: 0 0 40px rgba(124, 111, 255, 0.08);
}

/* ── Upload Box ── */
.upload-box {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: 100%;
  text-align: left;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.upload-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.upload-box:hover::before {
  opacity: 1;
}

.upload-box:hover {
  border-color: rgba(124, 111, 255, 0.3);
  box-shadow: 0 0 40px rgba(124, 111, 255, 0.07);
}

/* ── Hidden file input inside drop-zone ── */
.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  font-size: 0;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  appearance: none;
  -webkit-appearance: none;
}

/* ── Drop Zone ── */
.drop-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-sm);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface-2);
  position: relative;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(124, 111, 255, 0.06);
  box-shadow: inset 0 0 30px rgba(124, 111, 255, 0.05);
}

.drop-zone-icon {
  font-size: 2.2rem;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
  transition: transform var(--transition);
}

.drop-zone:hover .drop-zone-icon {
  transform: translateY(-4px);
}

.drop-zone-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.drop-zone-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Section Labels ── */
.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

/* ── Inputs / Textarea ── */
.form-control {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.9rem !important;
  padding: 10px 14px !important;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
}

.form-control:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
  outline: none !important;
  background: var(--surface-3) !important;
}

.form-control::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.6;
}

/* ── Upload Button ── */
.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  transition: all var(--transition);
  box-shadow: 0 4px 20px var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.upload-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.upload-btn:hover::after {
  opacity: 1;
}

.upload-btn:active {
  transform: translateY(0px);
}

/* ── Divider ── */
.panel-divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 20px 0;
}

/* ── File Preview List ── */
#filePreviewList li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 4px 0;
}

/* ── OTP / Code Inputs ── */
.code-input-wrapper {
  max-width: 280px;
  margin: 0 auto;
}

.code-input {
  width: 56px;
  height: 64px;
  font-size: 1.8rem;
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  border: 2px solid var(--border-2);
  outline: none;
  text-align: center;
  transition: all var(--transition);
  caret-color: var(--accent);
}

.code-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 0 16px var(--accent-glow);
  background: var(--surface-3);
  transform: scale(1.04);
}

.code-input.filled {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Receive Button ── */
.receive-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--surface-3);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  transition: all var(--transition);
  border: 1px solid var(--border-2);
}

.receive-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-2px);
}

/* ── Result Panel ── */
#result {
  animation: fadeSlideUp 0.4s ease both;
}


.result-panel {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.result-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ── Success Badge ── */
.success-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(168, 255, 87, 0.12);
  color: var(--accent-2);
  border: 1px solid rgba(168, 255, 87, 0.25);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ── Big Code Display ── */
.big-code {
  font-family: 'Space Grotesk', monospace;
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: 0.12em;
  line-height: 1;
  margin: 4px 0 10px;
  text-shadow: 0 0 40px var(--accent2-glow), 0 0 80px var(--accent2-glow);
  animation: codeGlow 3s ease-in-out infinite alternate;
}

@keyframes codeGlow {
  from {
    text-shadow: 0 0 30px var(--accent2-glow);
  }

  to {
    text-shadow: 0 0 60px var(--accent2-glow), 0 0 100px var(--accent2-glow);
  }
}

.code-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

/* ── Share Link ── */
.share-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 14px 0;
  text-align: left;
}

.share-link-box #codeDisplay {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-muted);
  word-break: break-all;
  font-family: 'Inter', monospace;
  font-weight: 400;
}

/* ── Action Buttons Row ── */
.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
}

.btn-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: 50px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 18px var(--accent-glow);
}

.btn-action-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 7px 24px var(--accent-glow);
}

.btn-action-outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: 50px;
  border: 1.5px solid var(--border-2);
  background: transparent;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-action-outline:hover {
  background: var(--surface-3);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── QR Code ── */
.qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.qr-frame {
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  display: inline-block;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.qr-frame img {
  display: block;
  border-radius: 6px;
  max-width: 140px;
}

.qr-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Copy Flash ── */
#copyMsg {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(168, 255, 87, 0.12);
  border-radius: 50px;
  padding: 3px 12px;
  animation: fadeSlideUp 0.2s ease both;
}

/* ── Receive Error ── */
#receiveError {
  font-size: 0.82rem;
  color: #f87171;
  margin-top: 10px;
}

/* ── Brand Title (legacy) ── */
.brand-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.brand-title span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.brand-title img {
  height: 36px;
}

.brand-line {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

/* ── Scan label override ── */
.scann {
  font-family: 'Inter', sans-serif;
}

/* ── Home Button ── */
.home-btn {
  position: fixed;
  top: 11px;
  left: 14px;
  z-index: 1050;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  padding: 6px 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Modal ── */
.modal-content {
  font-family: 'Inter', sans-serif;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 24px 16px;
}

.modal-body {
  padding: 20px 24px;
  color: var(--text);
}

.modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.modal-body a {
  color: var(--accent);
  text-decoration: none;
}

.modal-body a:hover {
  text-decoration: underline;
}

.btn-close {
  filter: invert(0%);
}

body.dark-mode .btn-close {
  filter: invert(100%);
}


/* ── Card (display pages) ── */
.card {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: var(--radius) !important;
}

/* ── Shared Text Area ── */
#sharedText {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: var(--radius-sm) !important;
  font-family: 'Space Grotesk', monospace !important;
  font-size: 0.88rem !important;
  line-height: 1.7;
}

/* ── Copy Text Button ── */
#copyTextBtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 24px;
  border-radius: 50px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 18px var(--accent-glow);
}

#copyTextBtn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

#copyTextMsg {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
}

/* ── Download Button ── */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--accent), #9b8aff);
  color: #fff;
  border: none;
  transition: all var(--transition);
  box-shadow: 0 6px 24px var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.download-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.download-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px var(--accent-glow);
  color: #fff;
}

.download-btn:hover::after {
  opacity: 1;
}

/* ── file-card overrides for display pages ── */
.file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: background var(--transition), transform var(--transition);
}

.file-card:hover {
  background: var(--surface-3);
  transform: translateY(-2px);
  border-color: rgba(124, 111, 255, 0.25);
}

/* ══════════════════════════════════════
   MINIMAL CENTERED LAYOUT
   ══════════════════════════════════════ */

/* Full-page centered column */
.min-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 16px 40px;
  position: relative;
  z-index: 1;
}

/* Brand row */
.min-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.min-logo {
  height: 56px;
  width: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(124, 111, 255, 0.35));
}

.min-title {
  font-family: 'Outfit', 'Syne', sans-serif;
  font-size: 3.4rem;
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}

.min-title .title-clip {
  font-weight: 200;
  opacity: 0.6;
  letter-spacing: -0.02em;
}

.min-title .title-share {
  font-weight: 900;
  letter-spacing: -0.05em;
}

/* Subtitle */
.min-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* Send / Receive toggle */
.min-toggle {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
  width: 100%;
  max-width: 560px;
  flex-shrink: 0;
}

.min-tab {
  flex: 1;
  padding: 9px 0;
  border-radius: 7px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.min-tab.active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.min-tab:not(.active):hover {
  color: var(--text);
}

/* Panel card */
.min-panel {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  transition: opacity 0.2s ease;
}

.min-panel.panel-switching {
  opacity: 0;
}

/* Drop zone */
.min-drop {
  border: 1.5px dashed var(--border-2);
  border-radius: var(--radius-sm);
  padding: 28px 20px 22px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.min-drop:hover,
.min-drop.drag-over {
  border-color: var(--accent);
  background: rgba(124, 111, 255, 0.04);
}

.min-drop-icons {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  font-size: 1.6rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.min-drop-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
}

.min-drop-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 18px;
  line-height: 1.5;
}

.min-drop-sub kbd {
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
}

.min-drop-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

/* Buttons */
.min-btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 8px;
  border: none;
  background: var(--text);
  color: var(--bg);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.min-btn-solid:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.min-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 8px;
  border: 1.5px solid var(--border-2);
  background: transparent;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.min-btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--text-muted);
}

/* File preview list */
.min-file-list {
  margin: 10px 0 0;
  padding: 0 4px 0 0;
  max-height: 168px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.min-file-list::-webkit-scrollbar {
  width: 4px;
}

.min-file-list::-webkit-scrollbar-track {
  background: transparent;
}

.min-file-list::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 4px;
}

.min-file-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}



/* Textarea */
.min-textarea {
  width: 100%;
  background: var(--surface-2) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.9rem !important;
  padding: 12px 14px !important;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
  outline: none;
}

.min-textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
  background: var(--surface-3) !important;
}

.min-textarea::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.6;
}

/* Back link */
.min-back-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  padding: 8px 0 0;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.min-back-link:hover {
  color: var(--text);
}

/* Receive panel */
.min-receive-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 4px;
}

.min-receive-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 20px;
}

.min-otp {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.min-error {
  font-size: 0.82rem;
  color: #f87171;
  text-align: center;
  margin-top: 12px;
}

/* TTL row */
.min-ttl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 12px;
  flex-wrap: wrap;
}

.min-ttl-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.min-ttl-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.min-ttl-pill {
  padding: 4px 11px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.min-ttl-pill:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-check:checked+.min-ttl-pill,
.min-ttl-pill.active-pill {
  background: var(--surface-3);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.min-ttl-custom-wrap {
  width: 100%;
  flex-basis: 100%;
  margin-top: 6px;
  animation: fadeSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.min-ttl-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  padding: 7px 12px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.min-ttl-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.min-ttl-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* ── Action bar ── */
.action-bar {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.action-bar-ghost {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.action-bar-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--text-muted);
}

.action-bar-solid {
  flex: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  border: none;
  background: var(--text);
  color: var(--bg);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.action-bar-solid:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ── Result banner (inline after upload) ── */
.result-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.qr-icon-btn {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.qr-icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--accent);
}

/* ── Code block inline ── */
.code-block-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
}

.code-block-number {
  font-family: 'Space Grotesk', monospace;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text);
  flex: 1;
}

.code-copy-btn {
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: 7px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.code-copy-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.code-copy-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── File list rows ── */
.min-file-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin-bottom: 8px;
  transition: all var(--transition);
}

.min-file-list li:hover {
  background: var(--surface-3);
  border-color: var(--border-2);
}

.file-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--bg);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-left: 4px;
}

.file-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
  overflow: hidden;
  text-align: left;
}

.min-file-list .file-row-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.min-file-list .file-row-size {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.min-file-list .file-row-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  transition: all var(--transition);
}

.min-file-list .file-row-remove:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

/* ── QR Modal ── */
.qr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.qr-modal-box {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 32px 28px 24px;
  max-width: 420px;
  width: 90%;
  position: relative;
  text-align: left;
  animation: fadeSlideUp 0.25s ease both;
}

.qr-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.qr-modal-close:hover {
  background: var(--surface-3);
  color: var(--text);
}

.qr-modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 18px;
  padding-right: 36px;
}

.qr-modal-img-wrap {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.qr-modal-img-wrap img {
  width: 100%;
  max-width: 260px;
  border-radius: 8px;
}

.qr-modal-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.qr-modal-link {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Footer note */
.min-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 20px;
  opacity: 0.6;
  text-align: center;
}

/* Corner fixed buttons (replaces topbar on this page) */
.corner-btn {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 1000;
}

.corner-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.corner-info {
  top: 16px;
  left: 16px;
}

.corner-about {
  top: 16px;
  right: 16px;
}

.corner-theme {
  bottom: 16px;
  right: 16px;
}

@media (max-width: 640px) {
  .new-btn {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    justify-content: center;
  }

  .new-btn .btn-label {
    display: none !important;
  }
}

/* @media (max-width: 640px) {
  .action-bar-ghost .btn-label {
    display: none !important;
  }
  .action-bar-ghost {
    flex: none !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    gap: 0 !important;
    min-width: unset !important;
    overflow: visible !important;
    white-space: normal !important;
  }
} */

/* ── Error Toast ── */
.error-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1a0f0f;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #f87171;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 90vw;
  white-space: normal;
}

.error-toast-close {
  background: none;
  border: none;
  color: #f87171;
  cursor: pointer;
  padding: 0 0 0 6px;
  font-size: 13px;
  opacity: 0.7;
  flex-shrink: 0;
}

.error-toast-close:hover {
  opacity: 1;
}

@keyframes toastIn {
  from {
    transform: translateX(-50%) translateY(-80px);
    opacity: 0;
  }

  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  from {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }

  to {
    transform: translateX(-50%) translateY(-80px);
    opacity: 0;
  }
}

/* ── Cursor spotlight ── */
#cursor-glow {
  pointer-events: none;
  position: fixed;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 111, 255, 0.12) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: left 0.08s ease, top 0.08s ease;
  z-index: 0;
  opacity: 1;
  will-change: left, top;
}

body:not(.dark-mode) #cursor-glow {
  background: radial-gradient(circle, rgba(91, 82, 232, 0.25) 0%, transparent 70%);
}

/* ── Utilities ── */
/* ── Asteroid Background Animation ── */
#asteroids-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.asteroid {
  position: absolute;
  width: 2px;
  height: 60px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0), rgba(124, 111, 255, 0.8));
  border-radius: 50%;
  animation: meteorFall linear forwards;
  opacity: 0;
}

body:not(.dark-mode) .asteroid {
  background: linear-gradient(to top, rgba(255, 255, 255, 0), rgba(91, 82, 232, 0.5));
}

@keyframes meteorFall {
  0% {
    transform: translate(0, -50px) rotate(45deg) scale(var(--scale, 1));
    opacity: 1;
  }
  100% {
    transform: translate(-1500px, 1500px) rotate(45deg) scale(var(--scale, 1));
    opacity: 0;
  }
}

.z1 {
  position: relative;
  z-index: 1;
}

.fade-in {
  animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fade-in-delay-1 {
  animation-delay: 0.12s;
}

.fade-in-delay-2 {
  animation-delay: 0.22s;
}

.fade-in-delay-3 {
  animation-delay: 0.32s;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .cs-hero {
    padding: 90px 16px 30px;
  }

  .big-code {
    font-size: 3.5rem;
  }

  .upload-box {
    padding: 20px 16px;
  }

  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-action-primary,
  .btn-action-outline {
    justify-content: center;
  }

  .zip-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── TTL Selector Pills ── */
.ttl-pill {
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--text-muted);
  transition: all 0.2s;
  user-select: none;
}

.ttl-pill:hover {
  background: var(--surface-4);
  color: var(--text);
}

.btn-check:checked+.ttl-pill {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* ── Editor Text Box UI ── */
.editor-inner-box {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 24px 32px;
  height: 100%;
  transition: all 0.3s ease;
}

.editor-inner-box:hover {
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 0 10px rgba(255,255,255,0.02);
  background: rgba(0,0,0,0.25);
}

.editor-text-content {
  margin: 0;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.95rem;
  color: #d4d4d4;
  white-space: pre;
  word-wrap: normal;
  line-height: 1.7;
  letter-spacing: 0.01em;
  tab-size: 4;
}

@media (max-width: 576px) {
  .editor-inner-box {
    padding: 16px 20px;
  }
}