/* ── RESET & BASE ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0c0c0d;
  --surface: #141416;
  --surface2: #1c1c1f;
  --border: #2a2a2e;
  --accent: #e8ff47;
  --accent-dim: rgba(232,255,71,.12);
  --text: #f0f0ef;
  --text-muted: #6b6b72;
  --text-dim: #3a3a40;
  --red: #ff5757;
  --green: #47ffb0;
  --radius: 10px;
  --font-body: 'DM Mono', monospace;
  --font-display: 'Syne', sans-serif;
  --shadow: 0 8px 40px rgba(0,0,0,.5);
  --transition: .18s cubic-bezier(.4,0,.2,1);
  --header-h: 56px;
}

html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── SCREENS ──────────────────────────────────────── */
.screen { display: none; height: 100vh; }
.screen.active { display: block; }

/* ── AUTH ─────────────────────────────────────────── */
#auth-screen {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  height: 100vh;
}
#auth-screen.active { display: flex; }

.auth-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(232,255,71,.07) 0%, transparent 70%);
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .35;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.auth-container {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 36px;
}

.brand { text-align: center; }
.brand-mark { font-size: 20px; color: var(--accent); display: block; margin-bottom: 4px; }
.brand h1 {
  font-family: var(--font-display);
  font-size: 52px; font-weight: 800;
  letter-spacing: -2px; color: var(--text); line-height: 1;
}
.brand-sub { color: var(--text-muted); font-size: 13px; margin-top: 8px; }

.auth-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.tab-row {
  display: flex; gap: 4px;
  background: var(--bg);
  border-radius: 8px; padding: 4px;
  margin-bottom: 24px;
}
.tab {
  flex: 1; font-family: var(--font-body); font-size: 13px;
  padding: 8px; border: none; background: transparent;
  color: var(--text-muted); border-radius: 6px;
  cursor: pointer; transition: var(--transition);
}
.tab.active { background: var(--surface2); color: var(--text); }

.tab-panel { display: none; flex-direction: column; gap: 14px; }
.tab-panel.active { display: flex; }

.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 11px; color: var(--text-muted); letter-spacing: .5px; text-transform: uppercase; }

/* ── INPUTS ───────────────────────────────────────── */
input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  font-family: var(--font-body); font-size: 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px; outline: none;
  transition: border-color var(--transition);
  resize: none;
}
input:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--text-dim); }

/* ── BUTTONS ──────────────────────────────────────── */
.btn-primary {
  font-family: var(--font-body); font-size: 14px;
  padding: 12px 22px;
  background: var(--accent); color: #0c0c0d;
  border: none; border-radius: var(--radius);
  cursor: pointer; font-weight: 500;
  transition: var(--transition); white-space: nowrap;
}
.btn-primary:hover { background: #f5ff80; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.btn-ghost {
  font-family: var(--font-body); font-size: 13px;
  padding: 7px 14px;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: var(--transition);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn-ghost.small { padding: 5px 10px; font-size: 12px; }

/* ── ERROR / FEEDBACK ─────────────────────────────── */
.error-msg {
  background: rgba(255,87,87,.1);
  border: 1px solid rgba(255,87,87,.3);
  color: var(--red); border-radius: var(--radius);
  padding: 10px 14px; font-size: 13px;
}
.feedback {
  font-size: 13px; padding: 10px 14px;
  border-radius: var(--radius); margin-top: 10px;
}
.feedback.success { background: rgba(71,255,176,.08); border: 1px solid rgba(71,255,176,.25); color: var(--green); }
.feedback.error   { background: rgba(255,87,87,.08);  border: 1px solid rgba(255,87,87,.25);  color: var(--red); }
.hidden { display: none !important; }

/* ── DASHBOARD LAYOUT ─────────────────────────────── */
#dashboard-screen {
  display: none;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
#dashboard-screen.active { display: flex; }

/* ── HEADER ───────────────────────────────────────── */
header {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  z-index: 10;
}
.header-brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { color: var(--accent); }
.header-title {
  font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -1px;
}
.header-right { display: flex; align-items: center; gap: 12px; }
.user-email { color: var(--text-muted); font-size: 12px; }

/* ── MAIN — FULL HEIGHT SPLIT ─────────────────────── */
main {
  flex: 1;
  display: grid;
  grid-template-columns: 380px 1fr;
  overflow: hidden;
}

@media (max-width: 780px) {
  main { grid-template-columns: 1fr; }
  .drops-panel { display: none; }
}

/* ── SHARE PANEL (LEFT SIDEBAR) ───────────────────── */
.share-panel {
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex; flex-direction: column;
  padding: 24px;
  gap: 16px;
  overflow-y: auto;
}

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.panel-header h2 {
  font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.5px;
}

/* ── TYPE TOGGLE ──────────────────────────────────── */
.type-toggle {
  display: flex; gap: 4px;
  background: var(--bg); border-radius: 8px; padding: 3px;
}
.toggle-btn {
  font-family: var(--font-body); font-size: 12px;
  padding: 5px 16px;
  border: none; background: transparent;
  color: var(--text-muted); border-radius: 6px;
  cursor: pointer; transition: var(--transition);
}
.toggle-btn.active { background: var(--surface2); color: var(--text); }

/* ── TEXT INPUT AREA ──────────────────────────────── */
.input-area { display: none; flex-direction: column; gap: 12px; flex: 1; }
.input-area.active { display: flex; }

.input-area textarea {
  flex: 1;
  min-height: 180px;
}

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

/* ── FILE INPUT AREA ──────────────────────────────── */
#file-input-area { display: none; flex-direction: column; gap: 12px; flex: 1; }
#file-input-area.active { display: flex; }

.drop-zone {
  flex: 1; min-height: 180px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.drop-zone:hover, .drop-zone.dragging {
  border-color: var(--accent); background: var(--accent-dim);
}
.drop-zone.has-file { border-color: var(--green); background: rgba(71,255,176,.05); }
.drop-zone-inner { pointer-events: none; }
.drop-icon { display: block; font-size: 26px; color: var(--accent); margin-bottom: 10px; }
.drop-zone p { color: var(--text-muted); font-size: 13px; }
.drop-limit { font-size: 11px !important; color: var(--text-dim) !important; margin-top: 4px; }
.file-label { color: var(--accent); cursor: pointer; pointer-events: all; }
.file-name { display: block; font-size: 12px; color: var(--green); margin-top: 10px; word-break: break-all; }

/* ── PROGRESS BAR ─────────────────────────────────── */
.progress-bar {
  flex: 1; height: 5px;
  background: var(--bg); border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: var(--accent); border-radius: 99px;
  transition: width .25s ease;
}

/* ── DROPS PANEL (RIGHT FEED) ─────────────────────── */
.drops-panel {
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.drops-panel .panel-header {
  flex-shrink: 0;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.drops-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex; flex-direction: column; gap: 8px;
}

.empty-state { color: var(--text-dim); font-size: 13px; text-align: center; padding: 60px 0; }

/* ── DROP ITEM ────────────────────────────────────── */
.drop-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: var(--transition);
  animation: fadeUp .2s ease;
}
.drop-item:hover { background: var(--surface2); border-color: #38383d; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.drop-icon-badge {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.drop-icon-badge.text-type { color: var(--accent); }
.drop-icon-badge.file-type { color: #74b3ff; }

.drop-info { flex: 1; min-width: 0; }
.drop-name {
  font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drop-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.drop-actions { display: flex; gap: 5px; flex-shrink: 0; }
.action-btn {
  font-family: var(--font-body); font-size: 11px;
  padding: 5px 10px;
  background: var(--surface2); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; transition: var(--transition);
  text-decoration: none; display: inline-flex; align-items: center;
}
.action-btn:hover { color: var(--text); border-color: var(--text-muted); }
.action-btn.accent { color: var(--accent); border-color: rgba(232,255,71,.3); background: var(--accent-dim); }
.action-btn.accent:hover { background: rgba(232,255,71,.2); }
.action-btn.danger { color: var(--red); border-color: rgba(255,87,87,.3); background: rgba(255,87,87,.08); }
.action-btn.danger:hover { background: rgba(255,87,87,.18); border-color: var(--red); }

.expiry { color: var(--text-dim); font-size: 10px; }

/* ── MODAL ────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
}
.modal-box {
  position: relative; z-index: 1;
  width: 100%; max-width: 640px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow);
  animation: modalIn .2s cubic-bezier(.4,0,.2,1);
}
@keyframes modalIn {
  from { opacity:0; transform: scale(.96) translateY(8px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-label { font-size: 13px; color: var(--text); font-weight: 500; display: block; }
.modal-author { font-size: 11px; color: var(--text-dim); display: block; margin-top: 2px; }
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 14px; cursor: pointer; padding: 4px;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }
.modal-content {
  padding: 20px; font-family: var(--font-body); font-size: 13px;
  color: var(--text); line-height: 1.7;
  max-height: 55vh; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word; background: var(--bg);
}
.modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
}

/* ── GLOBAL DROP OVERLAY ──────────────────────────── */
.global-drop-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(12,12,13,.92); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  border: 3px dashed var(--accent); pointer-events: none;
}
.global-drop-overlay.hidden { display: none; }
.global-drop-inner { text-align: center; }
.global-drop-icon {
  display: block; font-size: 56px; color: var(--accent); margin-bottom: 16px;
  animation: bounce .6s ease infinite alternate;
}
@keyframes bounce {
  from { transform: translateY(-8px); }
  to   { transform: translateY(8px); }
}
.global-drop-inner p {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  color: var(--text); letter-spacing: -.5px;
}

/* ── SCROLLBAR ────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
