/* Dependency License Viewer — Pink/Magenta theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #EC4899;
  --primary-dim: rgba(236,72,153,0.12);
  --primary-glow: rgba(236,72,153,0.3);
  --secondary: #F472B6;
  --accent: #FBCFE8;
  --bg: #1A1A2E;
  --bg-card: #222240;
  --bg-input: #141428;
  --bg-hover: #2A2A4E;
  --border: rgba(236,72,153,0.15);
  --border-focus: rgba(236,72,153,0.5);
  --text: #F0E6F6;
  --text-dim: #A090B8;
  --text-muted: #605878;
  --green: #34D399;
  --green-dim: rgba(52,211,153,0.12);
  --yellow: #FBBF24;
  --yellow-dim: rgba(251,191,36,0.12);
  --red: #F87171;
  --red-dim: rgba(248,113,113,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.2s ease;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }
body::before { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at top, rgba(236,72,153,0.05), transparent 50%); pointer-events: none; }

.header { border-bottom: 1px solid var(--border); background: rgba(34,34,64,0.9); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.2rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); border-radius: var(--radius-sm); }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }
.header-actions { display: flex; gap: 6px; align-items: center; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-family: var(--font); font-size: 0.8rem; font-weight: 500; border: none; border-radius: 6px; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #DB2777); color: white; font-weight: 600; }
.btn-primary:hover { box-shadow: 0 4px 16px var(--primary-glow); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--primary); background: var(--primary-dim); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }

.sel { padding: 6px 24px 6px 8px; font-family: var(--font); font-size: 0.78rem; color: var(--accent); background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; outline: none; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23A090B8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; }

.main { max-width: 1100px; margin: 0 auto; padding: 20px; }

.pkg-editor { width: 100%; padding: 14px; font-family: var(--mono); font-size: 0.82rem; line-height: 1.7; color: var(--text); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); outline: none; resize: vertical; }
.pkg-editor:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--primary-dim); }
.pkg-editor::placeholder { color: var(--text-muted); }
.input-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.dep-count { font-size: 0.78rem; color: var(--text-muted); font-family: var(--mono); }

.summary-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.summary-card { display: flex; flex-direction: column; align-items: center; padding: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.card-num { font-size: 1.6rem; font-weight: 700; }
.card-label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.permissive .card-num { color: var(--green); }
.copyleft .card-num { color: var(--red); }
.unknown-s .card-num { color: var(--yellow); }
.total-s .card-num { color: var(--primary); }

.filter-bar { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.filter-btn { padding: 5px 12px; font-size: 0.75rem; font-weight: 600; border: 1px solid var(--border); border-radius: 20px; background: transparent; color: var(--text-dim); cursor: pointer; transition: all var(--transition); font-family: var(--font); }
.filter-btn.active, .filter-btn:hover { background: var(--primary-dim); border-color: var(--primary); color: var(--primary); }

.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); overflow-x: auto; }
.dep-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.dep-table th { padding: 10px 14px; text-align: left; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; color: var(--text-dim); border-bottom: 1px solid var(--border); background: var(--bg-hover); }
.dep-table td { padding: 10px 14px; border-bottom: 1px solid rgba(236,72,153,0.06); }
.dep-table tbody tr:hover { background: var(--bg-hover); }
.dep-table tbody tr:last-child td { border-bottom: none; }

.pkg-name { font-family: var(--mono); font-weight: 600; color: var(--primary); }
.badge { padding: 3px 8px; font-size: 0.68rem; font-weight: 700; border-radius: 4px; text-transform: uppercase; }
.badge.permissive { background: var(--green-dim); color: var(--green); }
.badge.copyleft { background: var(--red-dim); color: var(--red); }
.badge.unknown { background: var(--yellow-dim); color: var(--yellow); }
.risk-low { color: var(--green); }
.risk-high { color: var(--red); font-weight: 600; }
.risk-medium { color: var(--yellow); }

.loading-bar { margin-top: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; }
.loading-bar[hidden] { display: none; }
.loading-fill { height: 3px; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 2px; transition: width 0.3s ease; margin-bottom: 8px; }
.loading-text { font-size: 0.78rem; color: var(--text-dim); }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast { padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: 0.82rem; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  .summary-bar { grid-template-columns: repeat(2, 1fr); }
  .header-inner { flex-wrap: wrap; gap: 8px; }
}
