:root {
  --bg-dark: #0b0f19;
  --card-bg: rgba(22, 28, 45, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --primary-accent: #6366f1;
  --primary-hover: #4f46e5;
  --cache-color: #10b981;
  --db-color: #3b82f6;
  --danger-color: #ef4444;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  padding: 2rem 1rem;
}

.background-decor {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(11, 15, 25, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-bottom: 0.8rem;
}

.header h1 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--primary-accent);
  color: white;
  width: 100%;
  justify-content: center;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

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

.list-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.list-title-wrap h2 {
  margin-bottom: 0;
}

.source-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
}

.source-badge.cache {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.source-badge.database {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.stats-bar {
  display: flex;
  gap: 1.5rem;
  padding: 0.65rem 0.85rem;
  background: rgba(11, 15, 25, 0.4);
  border-radius: 8px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-item {
  display: flex;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.stat-label {
  color: var(--text-secondary);
}

.stat-val {
  font-weight: 600;
}

.status-online {
  color: #34d399;
}

.items-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  background: rgba(11, 15, 25, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.item-row:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.item-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.item-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.item-date {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.btn-delete {
  background: transparent;
  color: #64748b;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

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

.empty-state, .loading-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.footer-link {
  color: #818cf8;
  text-decoration: none;
}

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