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

body {
  background: #181818;
  color: white;
  font-family: Arial, sans-serif;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
  z-index: 0;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 288px;
  height: 100vh;
  background: #1a1a1a;
  border-right: 1px solid #2e2e2e;
  z-index: 50;
  padding: 28px 24px;
  overflow-y: auto;
}

.side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid #2e2e2e;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: white;
  color: #181818;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.brand h1 {
  font-size: 24px;
  letter-spacing: -1px;
}

.brand span {
  color: #777;
}

.close-btn,
.menu-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
}

.close-btn {
  display: none;
}

.side-menu {
  margin-top: 36px;
}

.side-menu p,
.label {
  color: #666b7a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 18px;
}

.side-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  cursor: pointer;
  text-align: left;
}

.side-menu button:hover {
  background: #2e2e2e;
  color: white;
}

.side-menu button.active {
  background: white;
  color: #181818;
}

.side-menu:first-of-type button.active {
  background: #2e2e2e;
  color: white;
}

.main {
  margin-left: 288px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.topbar {
  height: 76px;
  border-bottom: 1px solid #2e2e2e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(24,24,24,.8);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar span {
  font-size: 12px;
  color: #555b6b;
  font-family: monospace;
}

.menu-btn {
  display: none;
}

.hero {
  padding: 72px 48px 46px;
}

.hero h2 {
  font-size: 86px;
  line-height: .9;
  letter-spacing: -6px;
  font-weight: 900;
}

.hero p {
  color: #787f90;
  margin-top: 24px;
  font-size: 17px;
  font-weight: 600;
}

.search-box {
  max-width: 920px;
  margin: 0 48px 58px;
  position: relative;
}

.search-box span {
  position: absolute;
  left: 30px;
  top: 25px;
  color: #596071;
}

.search-box input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  color: white;
  padding: 26px 28px 26px 84px;
  border-radius: 24px;
  outline: none;
  font-size: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
}

.admin-panel {
  margin: 0 48px 36px;
  max-width: 920px;
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 22px;
  padding: 22px;
}

.admin-panel h3 {
  margin-bottom: 16px;
}

.admin-panel input,
.admin-panel select,
.admin-panel textarea,
.modal-box input {
  width: 100%;
  background: #101010;
  border: 1px solid #333;
  color: white;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  outline: none;
}

.admin-panel textarea {
  min-height: 240px;
  font-family: monospace;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.form-actions button,
.admin-action {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
  background: white;
  color: #181818;
}

.gray {
  background: #333 !important;
  color: white !important;
}

.red {
  background: #dc2626 !important;
  color: white !important;
}

.blue {
  background: #2563eb !important;
  color: white !important;
}

.snippets {
  padding: 0 48px 80px;
}

#snippetList {
  max-width: 920px;
  display: grid;
  gap: 18px;
}

.snippet-item {
  min-height: 118px;
  border: 1px solid #2e2e2e;
  border-radius: 22px;
  background: rgba(26,26,26,.85);
  display: flex;
  align-items: center;
  padding: 22px 28px;
  gap: 22px;
  cursor: pointer;
}

.snippet-item:hover {
  border-color: #444;
  transform: translateY(-1px);
}

.icon-box {
  width: 64px;
  height: 64px;
  background: #101010;
  border: 1px solid #2e2e2e;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #858b9c;
  flex-shrink: 0;
}

.snippet-info {
  flex: 1;
}

.snippet-info h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.tags {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.tags span {
  font-size: 12px;
  font-family: monospace;
  font-weight: 800;
}

.lang {
  background: #131313;
  color: #808797;
  padding: 5px 10px;
  border-radius: 6px;
}

.cat-text {
  color: #22c55e;
}

.locked {
  color: #facc15;
}

.arrow {
  color: #596071;
  font-size: 36px !important;
}

.detail {
  padding: 70px 48px 90px;
  max-width: 1000px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  color: #9ca3af;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 32px;
}

.back-btn:hover {
  background: #2e2e2e;
  color: white;
}

.detail h2 {
  font-size: 54px;
  letter-spacing: -4px;
  margin-bottom: 26px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 52px;
}

.meta div {
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 10px 18px;
  color: #777;
  font-family: monospace;
  font-size: 13px;
}

.meta b {
  color: #22c55e;
  margin-left: 10px;
}

.code-window {
  border: 1px solid #2e2e2e;
  border-radius: 22px;
  background: #1f1f1f;
  overflow: hidden;
}

.window-head {
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 26px;
  border-bottom: 1px solid #2e2e2e;
}

.dots {
  display: flex;
  gap: 10px;
  flex: 1;
}

.dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.dots span:nth-child(1) { background: #ff5f57; }
.dots span:nth-child(2) { background: #ffbd2e; }
.dots span:nth-child(3) { background: #28c840; }

.window-actions {
  display: flex;
  gap: 22px;
}

.window-actions button {
  background: none;
  border: 0;
  color: #9ca3af;
  cursor: pointer;
}

pre {
  margin: 0;
  max-height: 680px;
  overflow: auto;
}

pre code {
  padding: 26px !important;
  font-size: 15px;
  line-height: 1.7;
}

.empty {
  padding: 80px 20px;
  border: 1px dashed #333;
  border-radius: 22px;
  text-align: center;
  color: #666;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-box {
  width: 100%;
  max-width: 380px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 22px;
  padding: 24px;
}

.modal-box h3 {
  margin-bottom: 18px;
}

.password-box {
  max-width: 420px;
  text-align: center;
  padding: 34px 28px;
}

.lock-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #232323, #111);
  border: 1px solid #333;
  display: grid;
  place-items: center;
  box-shadow: 0 0 30px rgba(0,0,0,.4), inset 0 0 20px rgba(255,255,255,.03);
}

.lock-icon .material-icons {
  font-size: 42px;
  color: #facc15;
}

.password-box h3 {
  font-size: 28px;
  margin-bottom: 10px;
  letter-spacing: -1px;
}

.password-box p {
  color: #777;
  margin-bottom: 24px;
  line-height: 1.6;
}

.password-box input {
  text-align: center;
  letter-spacing: 1px;
}

.password-box button {
  flex: 1;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  z-index: 40;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .sidebar {
    left: -288px;
    transition: .3s;
  }

  .sidebar.show {
    left: 0;
  }

  .close-btn,
  .menu-btn {
    display: block;
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    padding: 0 32px;
  }

  .hero {
    padding: 72px 32px 46px;
  }

  .hero h2 {
    font-size: 58px;
    letter-spacing: -3px;
  }

  .search-box,
  .admin-panel {
    margin-left: 32px;
    margin-right: 32px;
  }

  .snippets {
    padding-left: 32px;
    padding-right: 32px;
  }

  .detail {
    padding: 68px 32px 80px;
  }

  .detail h2 {
    font-size: 42px;
  }
}

.logo-menu {
  padding: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #2e2e2e;
  background: #1a1a1a;
  display: grid;
  place-items: center;
}

.logo-menu:hover {
  background: #232323;
}

.small-logo {
  width: 24px;
  height: 24px;
  font-size: 12px;
  border-radius: 7px;
}

.lock-logo {
  width: 42px;
  height: 42px;
  font-size: 16px;
  border-radius: 12px;
}

.favicon-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.lock-favicon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}

.locked {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #facc15;
  font-size: 12px;
  font-weight: 800;
}

.locked img {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  object-fit: cover;
}

.toast {
  position: fixed;
  top: 30px;
  right: 30px;
  min-width: 280px;
  max-width: 420px;

  background: rgba(26,26,26,.96);
  border: 1px solid #2e2e2e;

  color: white;

  padding: 16px 18px;
  border-radius: 16px;

  font-size: 14px;
  font-weight: 700;

  z-index: 9999;

  opacity: 0;
  transform: translateY(-20px);

  transition: .25s;
  pointer-events: none;

  box-shadow:
    0 20px 40px rgba(0,0,0,.35),
    inset 0 0 10px rgba(255,255,255,.02);
}

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

.confirm-box {
  max-width: 420px;
  text-align: center;
}

.confirm-icon {
  width: 78px;
  height: 78px;

  margin: 0 auto 20px;

  border-radius: 22px;

  background: linear-gradient(
    135deg,
    #232323,
    #111
  );

  border: 1px solid #333;

  display: grid;
  place-items: center;
}

.confirm-icon img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.confirm-box h3 {
  font-size: 28px;
  margin-bottom: 10px;
  letter-spacing: -1px;
}

.confirm-box p {
  color: #777;
  line-height: 1.6;
  margin-bottom: 24px;
}