/*
 * Agonie Home — inner pages (glass cards, shared fonts/vars).
 */

:root {
  --ah-bg0: #1a1f2e;
  --ah-bg1: #0f1419;
  --ah-glass: rgba(0, 0, 0, 0.28);
  --ah-glass-border: rgba(255, 255, 255, 0.08);
  --ah-text: #f5f7fa;
  --ah-muted: rgba(245, 247, 250, 0.65);
  --ah-accent: #5eb0ff;
  --ah-radius: 10px;
  --ah-max: 920px;
}

@font-face {
  font-family: "Pacifico-Regular";
  font-display: swap;
  src: url("../font/Pacifico-Regular.woff2") format("woff2");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.agonie-inner {
  margin: 0;
  min-height: 100vh;
  color: var(--ah-text);
  font-family: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(94, 176, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 160, 90, 0.12), transparent 50%),
    linear-gradient(165deg, var(--ah-bg0), var(--ah-bg1) 60%, #0a0d12);
  background-attachment: fixed;
}

a {
  color: var(--ah-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(15, 20, 25, 0.72);
  border-bottom: 1px solid var(--ah-glass-border);
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.site-brand__name {
  font-family: "Pacifico-Regular", cursive;
  font-size: 1.45rem;
  color: var(--ah-text);
}

.site-brand:hover {
  text-decoration: none;
}

.site-nav {
  flex: 1;
  min-width: 0;
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.site-nav__list a {
  color: var(--ah-muted);
  font-size: 0.95rem;
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item > a,
.site-nav__list a[aria-current="page"] {
  color: var(--ah-text);
  text-decoration: none;
}

.site-search input {
  width: 160px;
  max-width: 40vw;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--ah-glass-border);
  background: var(--ah-glass);
  color: var(--ah-text);
  outline: none;
}

.site-search input:focus {
  border-color: rgba(94, 176, 255, 0.5);
}

.site-main {
  padding: 2rem 1.25rem 3rem;
}

.site-main__inner {
  max-width: var(--ah-max);
  margin: 0 auto;
}

body.agonie-blog .site-main__inner,
body.agonie-single-post .site-main__inner {
  max-width: 860px;
}

body.agonie-page-music .site-main__inner,
body.agonie-page-start .site-main__inner {
  max-width: 1100px;
}

.page-title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Blog index */
.blog-hero {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--ah-glass-border);
}

.blog-hero__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ah-accent);
}

.blog-hero__title {
  margin: 0 0 0.45rem;
}

.blog-hero__desc {
  margin: 0;
  color: var(--ah-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 36em;
}

.blog-list {
  gap: 1rem;
}

.entry-card--post {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  margin-bottom: 0;
}

.entry-card--post.entry-card--no-media {
  grid-template-columns: 1fr;
}

.entry-card--post:hover {
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.36);
}

.entry-card__media {
  display: block;
  min-height: 160px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.entry-card__img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.entry-card--post:hover .entry-card__img {
  transform: scale(1.04);
}

.entry-card__body {
  padding: 1.15rem 1.25rem 1.2rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.entry-card__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.entry-card__cat {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--ah-accent);
  background: rgba(94, 176, 255, 0.12);
  border: 1px solid rgba(94, 176, 255, 0.22);
  text-decoration: none;
}

.entry-card__cat:hover {
  background: rgba(94, 176, 255, 0.22);
  text-decoration: none;
  color: #cfe8ff;
}

.entry-card__dot {
  margin: 0 0.2rem;
  opacity: 0.55;
}

.entry-card__more {
  margin-top: 0.75rem;
  align-self: flex-start;
  font-size: 0.88rem;
  color: var(--ah-accent);
  text-decoration: none;
}

.entry-card__more:hover {
  color: #9fd0ff;
  text-decoration: none;
}

.entry-thumb {
  display: block;
  margin: 0.65rem 0 0.85rem;
  border-radius: 8px;
  overflow: hidden;
}

.entry-thumb img,
.entry-single__thumb img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.entry-single__back {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.entry-single__back a {
  color: var(--ah-muted);
}

.entry-single__back a:hover {
  color: var(--ah-accent);
  text-decoration: none;
}

.entry-single__thumb {
  margin: 0 0 1.25rem;
}

.entry-single__tags {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ah-glass-border);
  color: var(--ah-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.entry-single__tags-label {
  margin-right: 0.5rem;
  color: var(--ah-text);
  font-weight: 600;
}

.entry-single__tags a {
  color: var(--ah-muted);
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  background: var(--ah-glass);
  border: 1px solid var(--ah-glass-border);
  border-radius: var(--ah-radius);
  padding: 0.9rem 1rem;
  min-width: 0;
}

.post-navigation .nav-next {
  text-align: right;
}

.post-navigation a {
  color: var(--ah-text);
  text-decoration: none;
  display: block;
}

.post-navigation a:hover {
  color: var(--ah-accent);
  text-decoration: none;
}

.post-navigation .nav-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--ah-muted);
  margin-bottom: 0.25rem;
}

.post-navigation .nav-title {
  display: block;
  font-size: 0.95rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .entry-card--post {
    grid-template-columns: 1fr;
  }

  .entry-card__media {
    min-height: 180px;
    max-height: 220px;
  }

  .entry-card__img {
    min-height: 180px;
    max-height: 220px;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .post-navigation .nav-next {
    text-align: left;
  }
}

/* Compact chrome when blog is opened inside homepage iframe popup */
body.agonie-embedded .site-header {
  position: sticky;
}

body.agonie-embedded .site-nav,
body.agonie-embedded .site-search {
  display: none;
}

body.agonie-embedded .site-header__inner {
  justify-content: space-between;
}

body.agonie-embedded .site-main {
  padding-top: 1.25rem;
}

body.agonie-embedded .site-footer__back {
  display: none;
}

.glass-card {
  background: var(--ah-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--ah-glass-border);
  border-radius: var(--ah-radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  transition: transform 0.2s, background 0.2s;
}

.glass-card:hover {
  background: rgba(0, 0, 0, 0.36);
}

.glass-card.entry-card--post {
  padding: 0;
  margin-bottom: 0;
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.entry-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.entry-card__title a {
  color: var(--ah-text);
}

.entry-card__meta {
  color: var(--ah-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.entry-card__excerpt {
  color: var(--ah-muted);
  line-height: 1.65;
  margin: 0;
}

.entry-single .entry-header {
  margin-bottom: 1.25rem;
}

.entry-single .entry-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
}

.entry-content {
  line-height: 1.8;
  font-size: 1.05rem;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.entry-content p {
  margin: 0 0 1em;
}

.link-groups {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.link-group__title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  color: var(--ah-muted);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.link-tile {
  display: block;
  padding: 1rem;
  border-radius: var(--ah-radius);
  background: var(--ah-glass);
  border: 1px solid var(--ah-glass-border);
  color: var(--ah-text);
  transition: transform 0.2s, background 0.2s;
}

.link-tile:hover {
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.4);
  text-decoration: none;
  color: var(--ah-text);
}

.link-tile__name {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.link-tile__desc {
  font-size: 0.85rem;
  color: var(--ah-muted);
}

.pagination {
  margin-top: 1.75rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  background: var(--ah-glass);
  border: 1px solid var(--ah-glass-border);
  color: var(--ah-text);
}

.pagination .current {
  background: rgba(94, 176, 255, 0.25);
}

.site-footer {
  padding: 1.5rem 1.25rem 2.5rem;
  text-align: center;
  color: var(--ah-muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--ah-muted);
}

.site-footer__back {
  margin-top: 0.5rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ah-muted);
}

/* —— Special secondary pages —— */
.special-page__head {
  margin-bottom: 1.25rem;
}

.special-page__sub {
  margin: -0.75rem 0 0;
  color: var(--ah-muted);
  font-size: 0.9rem;
}

.text-hidden {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Start / search — only for legacy markup; page-start.php uses home-views.css */
body.agonie-page-start .site-main__inner > .start-page {
  min-height: min(70vh, 640px);
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 64px;
}

body.agonie-page-start .search-wrap {
  width: min(100%, 720px);
  min-height: 280px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 72px;
  box-sizing: border-box;
}

/* Legacy start-search* kept for safety if old markup remains */
.start-search {
  position: relative;
  width: min(100%, 720px);
}

.start-search__mask {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: transparent;
}

.start-search__bar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--ah-glass-border);
  backdrop-filter: blur(12px);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.start-search.is-focus .start-search__bar,
.start-search.is-open .start-search__bar {
  background: #fff;
  border-color: transparent;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.start-search.is-focus .start-search__input,
.start-search.is-open .start-search__input,
.start-search.is-focus .start-search__engine-label,
.start-search.is-open .start-search__engine-label,
.start-search.is-focus .start-search__go,
.start-search.is-open .start-search__go {
  color: #2a2a2a;
}

.start-search__engine,
.start-search__go {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #f2f2f2;
  cursor: pointer;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font: inherit;
}

.start-search__engine:hover,
.start-search__go:hover {
  background: rgba(255, 255, 255, 0.14);
}

.start-search.is-focus .start-search__engine:hover,
.start-search.is-open .start-search__engine:hover,
.start-search.is-focus .start-search__go:hover,
.start-search.is-open .start-search__go:hover {
  background: rgba(0, 0, 0, 0.08);
}

.start-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #f2f2f2;
  font-size: 1.05rem;
  padding: 0.55rem 0.25rem;
}

.start-search__engines {
  position: absolute;
  z-index: 7;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.35rem;
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.92);
  border: 1px solid var(--ah-glass-border);
  backdrop-filter: blur(14px);
  max-height: 280px;
  overflow: auto;
}

.start-search__engine-item {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: var(--ah-muted);
  cursor: pointer;
  font-size: 0.9rem;
}

.start-search__engine-item:hover,
.start-search__engine-item.is-active {
  background: rgba(94, 176, 255, 0.18);
  color: var(--ah-text);
}

.start-search__hint {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--ah-muted);
  font-size: 0.82rem;
}

/* Music */
.music-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 1rem;
  min-height: 480px;
}

.music-controller {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 420px;
}

.music-meta__label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ah-muted);
  margin-bottom: 0.55rem;
}

.music-meta__name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.music-meta__artist {
  color: var(--ah-muted);
  font-size: 0.95rem;
}

.music-lrc {
  flex: 1;
  min-height: 180px;
  overflow: auto;
  text-align: center;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  scrollbar-width: none;
}

.music-lrc::-webkit-scrollbar {
  display: none;
}

.music-lrc__line {
  padding: 0.25rem 0.35rem;
  color: rgba(245, 247, 250, 0.4);
  font-size: 0.88rem;
  line-height: 1.55;
  transition: color 0.2s, font-size 0.2s, transform 0.2s;
}

.music-lrc__line.is-near {
  color: rgba(245, 247, 250, 0.7);
  font-size: 0.95rem;
}

.music-lrc__line.is-current {
  color: #efefef;
  font-size: 1.1rem;
  font-weight: 600;
  transform: scale(1.02);
}

.music-playlist {
  min-height: 420px;
  padding: 0.85rem;
}

.music-player-wrap,
.agonie-meting,
.agonie-meting .aplayer {
  height: 100%;
}

.agonie-meting .aplayer {
  background: transparent;
  box-shadow: none;
  margin: 0;
  color: var(--ah-text);
}

.agonie-meting .aplayer .aplayer-info .aplayer-music .aplayer-title,
.agonie-meting .aplayer .aplayer-info .aplayer-music .aplayer-author {
  color: var(--ah-text);
}

.agonie-meting .aplayer .aplayer-list ol li {
  border-top-color: var(--ah-glass-border);
  color: var(--ah-muted);
}

.agonie-meting .aplayer .aplayer-list ol li:hover,
.agonie-meting .aplayer .aplayer-list ol li.aplayer-list-light {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ah-text);
}

/* Articles curated list */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.articles-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ah-text);
  margin-bottom: 0;
  transition: transform 0.15s, background 0.2s;
}

.articles-item:hover {
  text-decoration: none;
  color: var(--ah-text);
  transform: translateY(-1px);
}

.articles-item__title {
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.articles-item__date {
  flex-shrink: 0;
  color: var(--ah-muted);
  font-size: 0.85rem;
}

/* Shuoshuo timeline */
.shuoshuo-list .entry-card__title {
  font-size: 1.05rem;
}

.shuoshuo-list .entry-card__excerpt {
  white-space: pre-wrap;
}

.entry-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.btn-cta {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: var(--ah-radius);
  background: rgba(94, 176, 255, 0.22);
  border: 1px solid rgba(94, 176, 255, 0.35);
  color: var(--ah-text);
  font-weight: 600;
}

.btn-cta:hover {
  background: rgba(94, 176, 255, 0.32);
  text-decoration: none;
  color: var(--ah-text);
}

@media (max-width: 820px) {
  .music-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-search input {
    width: 100%;
    max-width: none;
  }
  .site-nav__list {
    gap: 0.35rem 0.75rem;
  }
}
