/* ==========================================================================
   PASTY - Super Minimalist Dark Style
   ========================================================================== */

:root {
  --bg: #0d0f12;
  --bg-subtle: #14171d;
  --bg-input: #11141a;
  --border: #232832;
  --border-focus: #3d4554;
  
  --text: #e5e7eb;
  --text-muted: #848c9c;
  --text-faint: #4b5363;

  --accent: #e5e7eb;
  --accent-blue: #3b82f6;
  --danger: #ef4444;
  --danger-muted: #7f1d1d;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  
  --radius: 6px;
}

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

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

/* Layout container */
.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

.logo-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
}

nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 6px;
  border-radius: var(--radius);
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
}

.user-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}

.btn:hover {
  background: #1b1f27;
  border-color: var(--border-focus);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 600;
}

.btn-primary:hover {
  background: #f3f4f6;
  border-color: #f3f4f6;
}

.btn-danger {
  color: #f87171;
  background: transparent;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

/* Main */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 0 40px;
}

.view {
  display: none;
  flex-direction: column;
  flex: 1;
}

.view.active {
  display: flex;
}

/* ==========================================================================
   MINIMAL EDITOR
   ========================================================================== */

.editor-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  overflow: hidden;
}

.editor-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  flex-wrap: wrap;
}

.input-title {
  flex: 1;
  min-width: 180px;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  outline: none;
}

.input-title::placeholder {
  color: var(--text-faint);
}

.editor-selects {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-minimal {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 8px;
  outline: none;
  cursor: pointer;
}

.select-minimal:hover {
  color: var(--text);
  border-color: var(--border-focus);
}

.checkbox-burn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.checkbox-burn input {
  accent-color: var(--danger);
  cursor: pointer;
}

.textarea-paste {
  flex: 1;
  min-height: 480px;
  width: 100%;
  padding: 16px;
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  outline: none;
  resize: vertical;
  tab-size: 2;
  white-space: pre;
}

.textarea-paste::placeholder {
  color: var(--text-faint);
}

.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 12px;
  color: var(--text-muted);
}

.editor-foot-stats {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ==========================================================================
   MINIMAL PASTE VIEW
   ========================================================================== */

.view-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  overflow: hidden;
}

.view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  flex-wrap: wrap;
  gap: 10px;
}

.view-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.view-title {
  font-weight: 600;
  color: var(--text);
}

.view-sub {
  color: var(--text-muted);
  font-size: 12px;
}

.tag-burn {
  font-size: 11px;
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
}

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

.code-pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre;
}

.burned-notice {
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.08);
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
  font-size: 12px;
  color: #fca5a5;
}

/* ==========================================================================
   MINIMAL PASTES LIST
   ========================================================================== */

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.list-header h2 {
  font-size: 16px;
  font-weight: 600;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.list-table th, .list-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.list-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
}

.list-table tr:last-child td {
  border-bottom: none;
}

.list-table tr:hover td {
  background: #141820;
}

.paste-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.paste-link:hover {
  text-decoration: underline;
}

.mono-cell {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.empty-msg {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
}

/* ==========================================================================
   MINIMAL MODALS
   ========================================================================== */

.modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-wrap.active {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 340px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-head h3 {
  font-size: 14px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-label {
  font-size: 12px;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.form-input:focus {
  border-color: var(--border-focus);
}

.form-err {
  display: none;
  font-size: 12px;
  color: #f87171;
  margin-bottom: 12px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-faint);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}
