/* Unicode Block Explorer — styles.css — Slate Blue */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary: #636E72;
  --secondary: #B2BEC3;
  --accent: #6C5CE7;
  --bg: #0D1117;
  --bg-card: rgba(13, 17, 23, 0.92);
  --surface: rgba(30, 37, 48, 0.6);
  --border: rgba(108, 92, 231, 0.08);
  --text: #C9D1D9;
  --text-dim: #8B949E;
  --text-muted: #484F58;
  --radius: 12px;
  --radius-sm: 8px;
  --glass: rgba(13, 17, 23, 0.88);
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; overflow: hidden; }

.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--glass); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.logo { width: 30px; height: 30px; background: linear-gradient(135deg, var(--accent), #A29BFE); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.header h1 { font-size: 14px; font-weight: 600; background: linear-gradient(135deg, var(--accent), #A29BFE); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.search-input {
  padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 12px; outline: none;
  font-family: 'Inter', sans-serif; width: 200px;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

.btn {
  padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 500; cursor: pointer; transition: var(--transition);
  width: 100%;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #5A45D6); border-color: transparent; color: #fff; }

.layout {
  display: grid; grid-template-columns: 220px 1fr 280px;
  height: calc(100vh - 50px);
}

.sidebar {
  border-right: 1px solid var(--border); overflow-y: auto; padding: 8px;
}
.sidebar-list { display: flex; flex-direction: column; gap: 2px; }
.block-item {
  padding: 6px 10px; border-radius: 6px; font-size: 11px; cursor: pointer;
  transition: var(--transition); color: var(--text-dim);
}
.block-item:hover { background: var(--surface); color: var(--text); }
.block-item.active { background: rgba(108, 92, 231, 0.12); color: var(--accent); font-weight: 500; }

.main-area { overflow-y: auto; padding: 16px; }
.block-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text-dim); }

.glyph-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 4px;
}
.glyph-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  font-size: 18px; cursor: pointer; transition: var(--transition);
  position: relative;
}
.glyph-cell:hover { border-color: var(--accent); transform: scale(1.1); z-index: 2; background: rgba(108,92,231,0.1); }
.glyph-cell.active { border-color: var(--accent); background: rgba(108,92,231,0.15); }
.glyph-cell::after {
  content: attr(data-cp); position: absolute; bottom: 2px; font-size: 7px;
  color: var(--text-muted); font-family: 'JetBrains Mono', monospace;
}

.detail-panel {
  border-left: 1px solid var(--border); padding: 16px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.detail-char {
  font-size: 64px; text-align: center; padding: 20px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.detail-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); }
.detail-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); }
.detail-value { font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--secondary); }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 20px; font-size: 13px; color: var(--text);
  opacity: 0; transition: all 0.3s ease; z-index: 300; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface); border-radius: 3px; }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; height: auto; }
  .sidebar { max-height: 120px; border-right: none; border-bottom: 1px solid var(--border); }
  .detail-panel { border-left: none; border-top: 1px solid var(--border); }
  body { overflow: auto; }
}
