/* ═══════════════════════════════════════════════════════════
   PasteLink — Premium Design System
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── CSS Variables ──────────────────────────────────────── */
:root {
  /* Colors */
  --bg-primary: #06081a;
  --bg-secondary: #0d1127;
  --bg-card: rgba(13, 17, 45, 0.7);
  --bg-card-hover: rgba(20, 26, 60, 0.8);
  --bg-input: rgba(15, 20, 50, 0.8);
  --bg-input-focus: rgba(20, 28, 65, 0.9);

  --border-color: rgba(100, 120, 255, 0.12);
  --border-hover: rgba(100, 120, 255, 0.25);
  --border-focus: rgba(100, 140, 255, 0.4);
  --border-glow: rgba(80, 120, 255, 0.15);

  --text-primary: #e8ecf4;
  --text-secondary: #8b95b0;
  --text-muted: #5a6380;
  --text-link: #6c8cff;
  --text-link-hover: #8ba4ff;

  --accent-primary: #6c5ce7;
  --accent-secondary: #00b4d8;
  --accent-gradient: linear-gradient(135deg, #6c5ce7 0%, #00b4d8 100%);
  --accent-gradient-hover: linear-gradient(135deg, #7c6cf7 0%, #10c4e8 100%);

  --success: #00c853;
  --error: #ff5252;
  --warning: #ffc107;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(108, 92, 231, 0.15);
  --shadow-glow-accent: 0 0 40px rgba(108, 92, 231, 0.25);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ─── Animated Background ────────────────────────────────── */
.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-mesh::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(108, 92, 231, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 180, 216, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(108, 92, 231, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(0, 180, 216, 0.06) 0%, transparent 40%);
  animation: meshFloat 20s ease-in-out infinite;
}

.bg-mesh::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 70%, rgba(108, 92, 231, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 70% 30%, rgba(0, 180, 216, 0.05) 0%, transparent 40%);
  animation: meshFloat 25s ease-in-out infinite reverse;
}

@keyframes meshFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(2%, -3%) rotate(1deg); }
  50% { transform: translate(-1%, 2%) rotate(-0.5deg); }
  75% { transform: translate(3%, 1%) rotate(0.5deg); }
}

/* Floating particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(108, 140, 255, 0.3);
  animation: particleFloat linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-duration: 18s; animation-delay: 0s; width: 2px; height: 2px; }
.particle:nth-child(2) { left: 25%; animation-duration: 22s; animation-delay: -3s; }
.particle:nth-child(3) { left: 40%; animation-duration: 16s; animation-delay: -6s; width: 4px; height: 4px; }
.particle:nth-child(4) { left: 55%; animation-duration: 20s; animation-delay: -2s; width: 2px; height: 2px; }
.particle:nth-child(5) { left: 70%; animation-duration: 24s; animation-delay: -8s; }
.particle:nth-child(6) { left: 85%; animation-duration: 19s; animation-delay: -5s; width: 4px; height: 4px; }
.particle:nth-child(7) { left: 15%; animation-duration: 21s; animation-delay: -10s; width: 2px; height: 2px; }
.particle:nth-child(8) { left: 60%; animation-duration: 17s; animation-delay: -7s; }

@keyframes particleFloat {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* ─── Layout ─────────────────────────────────────────────── */
.app-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  flex: 1;
  padding: 30px 0 60px;
}

/* ─── Header ─────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(6, 8, 26, 0.75);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: var(--transition-fast);
}

.logo:hover {
  transform: scale(1.03);
}

.logo-text {
  color: var(--text-primary);
}

.logo-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-icon {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  -webkit-text-fill-color: white;
}

.nav-buttons {
  display: flex;
  gap: 10px;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 2px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 4px 25px rgba(108, 92, 231, 0.45);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.3);
}

.btn-secondary {
  background: rgba(100, 120, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(100, 120, 255, 0.18);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(100, 120, 255, 0.08);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: 12px 28px;
  font-size: 0.95rem;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ─── Glass Card ─────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  position: relative;
  overflow: hidden;
  animation: cardFadeIn 0.5s ease-out;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(108, 140, 255, 0.3),
    rgba(0, 180, 216, 0.2),
    transparent
  );
}

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

/* ─── Form Elements ──────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all var(--transition-normal);
  outline: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:hover,
.form-select:hover {
  border-color: var(--border-hover);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1), 0 0 20px rgba(108, 92, 231, 0.05);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238b95b0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Password input group */
.input-group {
  position: relative;
}

.input-group .form-input {
  padding-right: 44px;
}

.input-group-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.input-group-icon:hover {
  color: var(--text-secondary);
}

/* ─── Quill Editor Overrides ─────────────────────────────── */
.editor-wrapper {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.editor-wrapper:hover {
  border-color: var(--border-hover);
}

.editor-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1), 0 0 20px rgba(108, 92, 231, 0.05);
}

.ql-toolbar.ql-snow {
  border: none !important;
  border-bottom: 1px solid var(--border-color) !important;
  background: rgba(15, 20, 50, 0.5) !important;
  padding: 10px 12px !important;
}

.ql-toolbar .ql-stroke {
  stroke: var(--text-secondary) !important;
}

.ql-toolbar .ql-fill {
  fill: var(--text-secondary) !important;
}

.ql-toolbar .ql-picker-label {
  color: var(--text-secondary) !important;
}

.ql-toolbar button:hover .ql-stroke,
.ql-toolbar .ql-picker-label:hover .ql-stroke {
  stroke: var(--text-primary) !important;
}

.ql-toolbar button:hover .ql-fill,
.ql-toolbar .ql-picker-label:hover .ql-fill {
  fill: var(--text-primary) !important;
}

.ql-toolbar button.ql-active .ql-stroke {
  stroke: var(--accent-secondary) !important;
}

.ql-toolbar button.ql-active .ql-fill {
  fill: var(--accent-secondary) !important;
}

.ql-toolbar .ql-picker-options {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-lg) !important;
}

.ql-toolbar .ql-picker-item {
  color: var(--text-secondary) !important;
}

.ql-toolbar .ql-picker-item:hover {
  color: var(--text-primary) !important;
}

.ql-container.ql-snow {
  border: none !important;
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
}

.ql-editor {
  min-height: 280px;
  max-height: 500px;
  overflow-y: auto;
  background: var(--bg-input) !important;
  color: var(--text-primary) !important;
  padding: 16px !important;
  line-height: 1.7 !important;
}

.ql-editor.ql-blank::before {
  color: var(--text-muted) !important;
  font-style: normal !important;
}

.ql-editor a {
  color: var(--text-link) !important;
}

.ql-snow .ql-tooltip {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  box-shadow: var(--shadow-lg) !important;
}

.ql-snow .ql-tooltip input[type=text] {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 4px !important;
}

/* Editor char counter */
.editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.char-counter {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  transition: var(--transition-fast);
}

.char-counter.warning {
  color: var(--warning);
}

.char-counter.danger {
  color: var(--error);
}

/* ─── Form Actions ───────────────────────────────────────── */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

/* ─── Paste View ─────────────────────────────────────────── */
.paste-header {
  margin-bottom: 24px;
}

.paste-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.3;
}

.paste-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.paste-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.paste-meta-item svg {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

.paste-share {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(108, 92, 231, 0.08);
  border: 1px solid rgba(108, 92, 231, 0.15);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.paste-share-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.paste-share-url {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-link);
  word-break: break-all;
  font-weight: 500;
}

.paste-content {
  padding: 24px;
  background: rgba(15, 20, 50, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: break-word;
}

.paste-content a {
  color: var(--text-link);
  text-decoration: none;
  transition: var(--transition-fast);
}

.paste-content a:hover {
  color: var(--text-link-hover);
  text-decoration: underline;
}

.paste-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

/* ─── Password Gate ──────────────────────────────────────── */
.password-gate {
  text-align: center;
  padding: 40px 20px;
}

.password-gate-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: rgba(108, 92, 231, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease-in-out infinite;
}

.password-gate-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent-primary);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.2); }
  50% { box-shadow: 0 0 0 15px rgba(108, 92, 231, 0); }
}

.password-gate h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.password-gate p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.password-form {
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.password-error {
  color: var(--error);
  font-size: 0.85rem;
  display: none;
}

.password-error.show {
  display: block;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ─── Recent Pastes ──────────────────────────────────────── */
.recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.recent-title {
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.recent-title svg {
  color: var(--accent-secondary);
}

.recent-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
}

.paste-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.paste-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(15, 20, 55, 0.3);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  color: var(--text-primary);
  gap: 16px;
}

.paste-item:hover {
  background: rgba(20, 28, 65, 0.5);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.paste-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.paste-item-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(108, 92, 231, 0.1);
  color: var(--accent-primary);
}

.paste-item-icon svg {
  width: 16px;
  height: 16px;
}

.paste-item-icon.protected {
  background: rgba(255, 193, 7, 0.1);
  color: var(--warning);
}

.paste-item-title {
  font-weight: 500;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paste-item-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.paste-item-views {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.paste-item-views svg {
  width: 13px;
  height: 13px;
}

.paste-item-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.page-btn:hover {
  background: rgba(100, 120, 255, 0.1);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.page-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.3);
}

.page-ellipsis {
  padding: 0 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.pagination-info {
  text-align: center;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Toast Notifications ────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 360px;
  cursor: pointer;
}

.toast.removing {
  animation: toastOut 0.3s ease-in forwards;
}

.toast-success {
  background: rgba(0, 200, 83, 0.9);
  border: 1px solid rgba(0, 200, 83, 0.3);
}

.toast-error {
  background: rgba(255, 82, 82, 0.9);
  border: 1px solid rgba(255, 82, 82, 0.3);
}

.toast-info {
  background: rgba(108, 92, 231, 0.9);
  border: 1px solid rgba(108, 92, 231, 0.3);
}

.toast svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(100px) scale(0.9);
  }
}

/* ─── Loading Skeleton ───────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(100, 120, 255, 0.05) 0%,
    rgba(100, 120, 255, 0.1) 50%,
    rgba(100, 120, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 16px;
  margin-bottom: 10px;
}

.skeleton-text:last-child {
  width: 70%;
}

.skeleton-title {
  height: 28px;
  width: 60%;
  margin-bottom: 16px;
}

.skeleton-block {
  height: 200px;
  margin-bottom: 16px;
}

.skeleton-row {
  height: 52px;
  margin-bottom: 4px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ─── Loading Spinner ────────────────────────────────────── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(108, 92, 231, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  background: rgba(6, 8, 26, 0.5);
  backdrop-filter: blur(10px);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

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

/* ─── 404 / Empty State ──────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: rgba(108, 92, 231, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-icon svg {
  width: 36px;
  height: 36px;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 120, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 120, 255, 0.25);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .glass-card {
    padding: 20px;
    border-radius: var(--radius-lg);
  }

  .header-inner {
    height: 56px;
  }

  .logo {
    font-size: 1.15rem;
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .paste-title {
    font-size: 1.3rem;
  }

  .paste-meta {
    gap: 10px;
    font-size: 0.8rem;
  }

  .paste-share {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .paste-item {
    padding: 12px 14px;
  }

  .paste-item-icon {
    display: none;
  }

  .paste-item-views {
    display: none;
  }

  .paste-item-date {
    font-size: 0.75rem;
  }

  .recent-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ─── Fade-in animation utility ──────────────────────────── */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}

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

.fade-in-delay-1 { animation-delay: 0.1s; animation-fill-mode: backwards; }
.fade-in-delay-2 { animation-delay: 0.2s; animation-fill-mode: backwards; }
.fade-in-delay-3 { animation-delay: 0.3s; animation-fill-mode: backwards; }

/* ─── Global Ad Banner ───────────────────────────────────── */
.global-banner {
  background: var(--accent-secondary);
  background: linear-gradient(90deg, #1e88e5 0%, #00b4d8 100%);
  color: white;
  text-align: center;
  padding: 10px 15px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  display: block;
  overflow: hidden;
  position: relative;
  transition: all var(--transition-normal);
}

.global-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.global-banner:hover {
  filter: brightness(1.1);
}

.global-banner:hover::before {
  left: 100%;
}

.global-banner-strong {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  margin-right: 6px;
  font-weight: 700;
}

/* ─── Admin Dashboard ────────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.admin-tab {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.admin-tab:hover {
  background: rgba(100, 120, 255, 0.1);
  color: var(--text-primary);
}

.admin-tab.active {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.3);
}

.admin-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.admin-panel.active {
  display: block;
}

.delete-btn {
  background: rgba(255, 82, 82, 0.1);
  color: var(--error);
  border: 1px solid rgba(255, 82, 82, 0.2);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.delete-btn:hover {
  background: var(--error);
  color: white;
}
