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

:root {
  --ui-bg-deep: #04050b;
  --ui-bg-soft: #091226;
  --ui-text-main: #f0f7ff;
  --ui-text-muted: rgba(240, 247, 255, 0.74);
  --ui-cyan: #7cf8ff;
  --ui-magenta: #ff5be8;
  --ui-violet: #8d73ff;
  --ui-lime: #b3ff72;
  --ui-border: rgba(124, 248, 255, 0.24);
  --ui-panel: rgba(12, 18, 36, 0.62);
  --ui-panel-strong: rgba(8, 12, 27, 0.8);
  --ui-shadow: 0 16px 48px rgba(7, 11, 22, 0.58), 0 0 44px rgba(124, 248, 255, 0.13);
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Space Grotesk', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body) !important;
  color: var(--ui-text-main) !important;
  background:
    radial-gradient(900px 420px at 8% -6%, rgba(124, 248, 255, 0.21), transparent 62%),
    radial-gradient(900px 420px at 96% 6%, rgba(255, 91, 232, 0.17), transparent 60%),
    radial-gradient(720px 460px at 50% 120%, rgba(141, 115, 255, 0.16), transparent 60%),
    linear-gradient(180deg, #020309 0%, var(--ui-bg-deep) 62%, var(--ui-bg-soft) 100%) !important;
  letter-spacing: 0.16px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.06), transparent 26%),
    radial-gradient(circle at 78% 28%, rgba(124, 248, 255, 0.05), transparent 36%);
  mix-blend-mode: soft-light;
  opacity: 0.8;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.02) 1px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0) 8px
  );
  opacity: 0.23;
}

#hinh-reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--ui-cyan), var(--ui-magenta), var(--ui-violet));
  box-shadow: 0 0 18px rgba(124, 248, 255, 0.44), 0 0 24px rgba(255, 91, 232, 0.42);
  z-index: 999;
}

.wrap {
  width: min(1120px, 94vw) !important;
  max-width: min(1120px, 94vw) !important;
  padding: clamp(24px, 3.8vw, 58px) 18px 78px !important;
}

h1,
h2,
h3,
.big,
.latestTitle {
  font-family: var(--font-head) !important;
  letter-spacing: 0.35px;
}

.mono,
code,
pre,
.date {
  font-family: var(--font-mono) !important;
}

p,
li,
.excerpt,
.latestDesc {
  color: var(--ui-text-muted) !important;
  line-height: 1.78 !important;
}

a {
  color: var(--ui-cyan) !important;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-shadow 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #dbfdff !important;
  text-decoration: none !important;
  text-shadow: 0 0 16px rgba(124, 248, 255, 0.3);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(124, 248, 255, 0.7);
  outline-offset: 2px;
}

.card {
  position: relative;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.012)),
    var(--ui-panel) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 22px !important;
  box-shadow: var(--ui-shadow) !important;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(124, 248, 255, 0.05), transparent 42%, rgba(255, 91, 232, 0.08) 82%, transparent);
}

.hinh-nav,
.hinh-backnav,
.wrap > .mono:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px !important;
  padding: 8px 13px;
  border: 1px solid rgba(124, 248, 255, 0.24);
  border-radius: 999px;
  background: rgba(5, 12, 30, 0.42);
  box-shadow: 0 10px 30px rgba(6, 10, 22, 0.26);
}

.hero {
  isolation: isolate;
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto -10% -58% -10%;
  height: 58%;
  background: radial-gradient(closest-side, rgba(124, 248, 255, 0.19), transparent 72%);
  filter: blur(34px);
  z-index: -1;
}

.home-page .big {
  font-size: clamp(2.2rem, 5vw, 3.35rem) !important;
  line-height: 1.03 !important;
  text-shadow: 0 0 20px rgba(124, 248, 255, 0.25), 0 0 26px rgba(255, 91, 232, 0.2);
}

.home-page .btn {
  border-radius: 14px !important;
  border-color: rgba(124, 248, 255, 0.3) !important;
  background:
    linear-gradient(135deg, rgba(10, 28, 53, 0.9), rgba(37, 8, 42, 0.78)) !important;
  transition: transform 0.14s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-page .btn:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 248, 255, 0.56) !important;
  box-shadow: 0 10px 24px rgba(6, 12, 24, 0.5), 0 0 18px rgba(124, 248, 255, 0.24);
}

.home-page .recentItem {
  border: 1px solid rgba(124, 248, 255, 0.2) !important;
  background:
    linear-gradient(120deg, rgba(6, 12, 28, 0.5), rgba(22, 8, 34, 0.36));
  border-radius: 12px !important;
  transition: transform 0.14s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-page .recentItem:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 248, 255, 0.5) !important;
  box-shadow: 0 10px 20px rgba(4, 8, 19, 0.45), 0 0 14px rgba(124, 248, 255, 0.18);
}

article.card {
  max-width: 92ch;
  margin: 0 auto;
}

.post-page article.card h1 {
  font-size: clamp(1.95rem, 4vw, 2.7rem) !important;
  line-height: 1.08 !important;
  margin-bottom: 10px !important;
}

.post-page .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(240, 247, 255, 0.54) !important;
}

.post-page p {
  font-size: clamp(1rem, 1.7vw, 1.08rem) !important;
}

.post-page .tagpill,
.archive-page .tagpill,
.tags-page .tagCount {
  border-color: rgba(124, 248, 255, 0.3) !important;
  background: rgba(8, 16, 35, 0.52) !important;
}

.hinh-sep,
hr {
  border: none !important;
  border-top: 1px solid rgba(124, 248, 255, 0.28) !important;
  margin: 26px 0 18px !important;
}

.hinh-widget {
  border: 1px solid rgba(124, 248, 255, 0.2);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(5, 10, 24, 0.86), rgba(16, 8, 28, 0.72));
  padding: clamp(12px, 2vw, 18px);
  box-shadow: 0 12px 30px rgba(4, 9, 20, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hinh-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.hinh-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 35px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(124, 248, 255, 0.24);
  background: rgba(7, 16, 34, 0.58);
  color: rgba(240, 247, 255, 0.75);
  font-size: 12px;
}

.hinh-sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 12px;
  color: rgba(240, 247, 255, 0.66);
}

#hinh-sort {
  height: 33px;
  border-radius: 10px;
  padding: 0 10px;
  border: 1px solid rgba(124, 248, 255, 0.26);
  background: rgba(5, 10, 26, 0.88);
  color: rgba(240, 247, 255, 0.86);
}

.hinh-btn {
  position: relative;
  border: 1px solid rgba(124, 248, 255, 0.35);
  color: #ecf8ff;
  background: linear-gradient(135deg, rgba(16, 34, 66, 0.93), rgba(31, 9, 44, 0.85));
  border-radius: 12px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hinh-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 248, 255, 0.62);
  box-shadow: 0 10px 22px rgba(8, 12, 26, 0.46), 0 0 14px rgba(124, 248, 255, 0.24);
}

.hinh-btn:disabled {
  opacity: 0.62;
  cursor: wait;
}

.hinh-btn.kudo-pop {
  animation: hinhKudoPop 0.38s ease;
}

@keyframes hinhKudoPop {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-1px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

.hinh-status {
  min-height: 1.25rem;
  margin: 2px 0 10px;
  font-size: 12px;
  color: rgba(240, 247, 255, 0.56);
}

.hinh-status.ok { color: rgba(179, 255, 114, 0.88); }
.hinh-status.warn { color: rgba(255, 230, 129, 0.92); }
.hinh-status.error { color: rgba(255, 131, 157, 0.95); }
.hinh-status.busy { color: rgba(124, 248, 255, 0.9); }

.hinh-comment-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.hinh-muted {
  color: rgba(240, 247, 255, 0.52);
  font-size: 13px;
  padding: 6px 2px;
}

.hinh-cmt {
  border: 1px solid rgba(124, 248, 255, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(10, 20, 44, 0.78), rgba(19, 8, 33, 0.62));
  padding: 11px 12px;
  transition: transform 0.14s ease, border-color 0.2s ease;
}

.hinh-cmt:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 248, 255, 0.46);
}

.hinh-cmt-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 12px;
  color: rgba(240, 247, 255, 0.54);
}

.hinh-who {
  color: rgba(240, 247, 255, 0.87);
  font-weight: 600;
}

.hinh-cmt-body {
  color: rgba(240, 247, 255, 0.77);
  line-height: 1.65;
  font-size: 14px;
  word-wrap: break-word;
}

.hinh-form {
  border: 1px solid rgba(124, 248, 255, 0.2);
  border-radius: 14px;
  padding: 10px;
  background: rgba(7, 14, 31, 0.64);
  display: grid;
  gap: 8px;
}

.hinh-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hinh-row-end {
  justify-content: flex-end;
}

.hinh-char-count,
.hinh-tip {
  font-size: 11px;
  color: rgba(240, 247, 255, 0.5);
}

#hinh-name,
#hinh-content {
  width: 100%;
  border: 1px solid rgba(124, 248, 255, 0.24);
  background: rgba(3, 10, 24, 0.68);
  color: #ecf7ff;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-body);
}

#hinh-content {
  min-height: 132px;
  resize: vertical;
  line-height: 1.58;
}

#hinh-name::placeholder,
#hinh-content::placeholder {
  color: rgba(240, 247, 255, 0.44);
}

.archive-page .item,
.tags-page li {
  border-top-color: rgba(124, 248, 255, 0.18) !important;
}

.archive-page .item {
  padding: 13px 0 !important;
}

.archive-page .item > div:first-child a,
.tags-page li > a {
  color: #f2fbff !important;
  font-weight: 600;
}

@media (max-width: 920px) {
  .wrap {
    width: min(100%, 100vw) !important;
    max-width: min(100%, 100vw) !important;
    padding: 18px 14px 54px !important;
  }

  .card {
    border-radius: 18px !important;
    padding: 16px !important;
  }

  .home-page .big {
    font-size: clamp(2rem, 8vw, 2.65rem) !important;
  }

  .hinh-toolbar {
    gap: 8px;
  }

  .hinh-sort-wrap {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  body::after {
    opacity: 0.16;
  }

  .hinh-chip {
    font-size: 11px;
    padding: 0 10px;
    height: 32px;
  }

  .hinh-btn {
    width: 100%;
    justify-content: center;
  }

  .hinh-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hinh-row-end {
    align-items: stretch;
  }

  .hinh-tip {
    text-align: left;
  }

  #hinh-content {
    min-height: 120px;
  }

  .hinh-cmt-meta {
    flex-direction: column;
    gap: 3px;
  }
}

