/*
Theme Name: 佩恩竞技档案 V2
Theme URI: https://pecdk.com/
Author: 佩恩手游
Description: 为佩恩手游制作的黑紫色科幻电竞游戏资料主题。
Version: 0.4.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: peien-arena
*/

:root {
    --bg: #07050d;
    --panel: #100b1b;
    --panel-2: #171025;
    --text: #f7f3ff;
    --muted: #a49aaf;
    --purple: #9b5cff;
    --violet: #6b28d9;
    --cyan: #76eaff;
    --line: rgba(255, 255, 255, .1);
    --shadow: 0 22px 70px rgba(44, 15, 86, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; line-height: 1.7; }
body::before { content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .15; background-image: linear-gradient(rgba(255, 255, 255, .024) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, #000, transparent 86%); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
::selection { color: #fff; background: var(--purple); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.peien-shell { width: min(1380px, calc(100% - 48px)); margin: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 46; height: 82px; border-bottom: 1px solid var(--line); background: rgba(7, 5, 13, .88); backdrop-filter: blur(18px); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 13px; flex: 0 0 auto; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy b { font-size: 18px; letter-spacing: .12em; }
.brand-copy small { color: #8f839d; font-size: 8px; letter-spacing: .22em; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; position: relative; transform: rotate(45deg); border: 1px solid rgba(187, 119, 255, .6); background: linear-gradient(145deg, rgba(164, 80, 255, .32), rgba(67, 21, 124, .08)); box-shadow: 0 0 24px rgba(139, 72, 255, .18); }
.brand-mark::before, .brand-mark::after, .brand-mark i { content: ""; position: absolute; border: 1px solid rgba(194, 139, 255, .5); }
.brand-mark::before { inset: 6px; border-radius: 50%; }
.brand-mark::after { width: 4px; height: 4px; border-radius: 50%; background: #c596ff; box-shadow: 0 0 9px #b56dff; }
.brand-mark i { width: 25px; height: 8px; border-left: 0; border-right: 0; transform: rotate(-45deg); }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(16px, 2vw, 32px); }
.site-nav a { color: #bbb2c5; font-size: 12px; letter-spacing: .05em; white-space: nowrap; transition: color .2s; }
.site-nav a:hover { color: #fff; }
.nav-admin { padding: 8px 13px; border: 1px solid rgba(165, 97, 255, .35); border-radius: 4px; }
.nav-toggle { display: none; color: #fff; background: none; border: 0; font-size: 25px; }

/* Hero */
.hero { min-height: 650px; height: 78vh; max-height: 760px; padding: 76px 0 64px; position: relative; overflow: hidden; display: flex; align-items: center; background: radial-gradient(circle at 76% 42%, rgba(113, 45, 191, .24), transparent 28%), radial-gradient(circle at 14% 78%, rgba(89, 28, 140, .13), transparent 30%), linear-gradient(135deg, #090511, #06040a 64%); }
.hero::before { content: ""; position: absolute; width: 54vw; height: 54vw; right: -14vw; top: -25vw; border: 1px solid rgba(166, 100, 255, .14); border-radius: 50%; }
.hero-grid { position: absolute; inset: 0; opacity: .28; background-image: linear-gradient(rgba(138, 79, 209, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(138, 79, 209, .1) 1px, transparent 1px); background-size: 74px 74px; transform: perspective(500px) rotateX(60deg) translateY(50%); transform-origin: bottom; mask-image: linear-gradient(to top, #000, transparent 72%); }
.hero-orbit { position: absolute; border: 1px solid rgba(167, 100, 255, .13); border-radius: 50%; pointer-events: none; }
.hero-orbit--one { width: 340px; height: 340px; right: 5%; top: 12%; animation: spin 32s linear infinite; }
.hero-orbit--two { width: 180px; height: 180px; right: 11%; top: 27%; border-style: dashed; animation: spin-reverse 24s linear infinite; }
.hero-inner { position: relative; z-index: 2; }
.hero-content { width: min(720px, 60vw); }
.eyebrow, .section-index { color: #b985ff; font-size: 11px; letter-spacing: .22em; font-weight: 700; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
.eyebrow::before { content: ""; width: 32px; height: 1px; background: #ad6aff; box-shadow: 0 0 8px #a24cff; }
.hero h1 { margin: 0; font-size: clamp(52px, 6.4vw, 92px); font-weight: 900; line-height: .96; letter-spacing: -.055em; }
.hero h1 em { display: block; font-style: normal; color: transparent; -webkit-text-stroke: 1px rgba(203, 162, 255, .84); text-shadow: 0 0 40px rgba(125, 49, 238, .24); }
.hero-copy { width: min(630px, 100%); margin: 22px 0 24px; color: #c7bdd0; font-size: 16px; line-height: 1.9; }
.hero-search { width: min(630px, 100%); min-height: 54px; display: flex; position: relative; border: 1px solid rgba(180, 113, 255, .42); background: rgba(12, 8, 19, .78); box-shadow: 0 16px 45px rgba(41, 11, 79, .28); }
.hero-search::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 3px; background: #a764ff; box-shadow: 0 0 16px #a764ff; }
.hero-search input[type="search"] { flex: 1; min-width: 0; padding: 0 20px; color: #fff; background: transparent; border: 0; outline: 0; }
.hero-search input::placeholder { color: #756b80; }
.hero-search button { min-width: 132px; padding: 0 18px; color: #fff; border: 0; border-left: 1px solid rgba(180, 113, 255, .34); background: linear-gradient(135deg, #8b4de5, #6525c5); cursor: pointer; }
.hero-search button span { margin-left: 9px; }
.hero-actions, .action-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-actions { margin-top: 18px; }
.primary-button, .secondary-button { min-height: 50px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 20px; border: 1px solid #ba82ff; font-size: 13px; letter-spacing: .04em; cursor: pointer; transition: .25s; }
.primary-button { color: #fff; background: linear-gradient(135deg, #9656f5, #6a26ce); box-shadow: 0 10px 35px rgba(91, 31, 177, .28); }
.secondary-button { color: #c8bece; background: rgba(255, 255, 255, .03); border-color: var(--line); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); border-color: #ba82ff; }
.hero-stats { display: flex; gap: clamp(25px, 3.4vw, 54px); margin-top: 30px; }
.hero-stats div { display: flex; flex-direction: column; padding-left: 14px; border-left: 1px solid #59307f; }
.hero-stats strong { font-size: 18px; font-family: ui-monospace, monospace; }
.hero-stats span { margin-top: 3px; color: #807789; font-size: 10px; letter-spacing: .1em; }
.hero-stats--single { gap: 0; }
.hero-stats--single div { min-width: 145px; }
.hero-console { position: absolute; right: 6vw; top: 50%; width: 330px; text-align: center; transform: translateY(-50%); pointer-events: none; }
.console-ring { width: 286px; height: 286px; margin: auto; display: grid; place-items: center; position: relative; border: 1px solid rgba(181, 110, 255, .22); border-radius: 50%; animation: float 6s ease-in-out infinite; }
.console-ring::before { content: ""; position: absolute; inset: 28px; border: 1px dashed rgba(201, 145, 255, .36); border-radius: 50%; animation: spin 22s linear infinite; }
.console-ring::after { content: ""; position: absolute; inset: 66px; border: 1px solid rgba(193, 125, 255, .45); border-radius: 50%; background: radial-gradient(circle, rgba(148, 70, 235, .42), rgba(74, 20, 133, .08) 58%, transparent 60%); box-shadow: 0 0 70px rgba(125, 45, 227, .28); }
.console-ring span { position: relative; z-index: 2; font-size: 68px; font-weight: 900; text-shadow: 0 0 30px #ac64ff; }
.hero-console p { margin: 22px 0 3px; color: #b892e5; font: 12px ui-monospace, monospace; letter-spacing: .3em; }
.hero-console small { color: #5fdd9a; font: 8px ui-monospace, monospace; letter-spacing: .2em; }

/* Sections and game grids */
.section { padding: 92px 0; }
.game-section--featured { background: linear-gradient(180deg, #08050e, #0b0712); }
.game-section--latest, .game-section--upcoming, .benefits-section { border-top: 1px solid var(--line); background: #09060f; }
.game-section--upcoming { background: radial-gradient(circle at 72% 30%, rgba(103, 48, 173, .12), transparent 32%), #08050e; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
.section-heading h2, .contact-panel h2, .archive-hero h1, .content-title { margin: 8px 0 0; font-size: clamp(34px, 4vw, 58px); letter-spacing: -.04em; }
.section-heading > p { max-width: 540px; margin: 0; color: var(--muted); font-size: 14px; }
.section-heading--center { align-items: center; }
.section-heading--center h2 span { color: #b36aff; }
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.game-grid--featured { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.game-grid--featured.cards-1 { grid-template-columns: minmax(0, 460px); justify-content: center; }
.game-grid--featured.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 920px; margin-inline: auto; }
.game-grid--featured.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.game-grid--featured.cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 940px; margin-inline: auto; }
.game-grid--featured.cards-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.game-grid--featured.cards-5 .game-card { grid-column: span 2; }
.game-grid--featured.cards-5 .game-card:nth-child(4) { grid-column: 2 / span 2; }
.game-grid--featured.cards-5 .game-card:nth-child(5) { grid-column: 4 / span 2; }
.game-grid--featured.cards-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.game-grid--latest.cards-1 { grid-template-columns: minmax(0, 390px); justify-content: center; }
.game-grid--latest.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 780px; margin-inline: auto; }
.game-grid--latest.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1040px; margin-inline: auto; }
.game-grid--latest.cards-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.game-grid--latest.cards-5 .game-card { grid-column: span 2; }
.game-grid--latest.cards-5 .game-card:nth-child(4) { grid-column: 2 / span 2; }
.game-grid--latest.cards-5 .game-card:nth-child(5) { grid-column: 4 / span 2; }
.game-grid--latest.cards-6, .game-grid--latest.cards-9 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.game-grid--latest.cards-7, .game-grid--latest.cards-10, .game-grid--latest.cards-11 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.game-grid--latest.cards-7 .game-card, .game-grid--latest.cards-10 .game-card, .game-grid--latest.cards-11 .game-card { grid-column: span 2; }
.game-grid--latest.cards-7 .game-card:nth-child(5), .game-grid--latest.cards-11 .game-card:nth-child(9) { grid-column: 2 / span 2; }
.game-grid--latest.cards-10 .game-card:nth-child(9) { grid-column: 3 / span 2; }
.game-card { min-height: 405px; position: relative; overflow: hidden; border: 1px solid var(--line); background: #0d0914; transition: .3s; }
.game-card::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity .25s; }
.game-card:hover { border-color: var(--accent); transform: translateY(-5px); box-shadow: var(--shadow); }
.game-card:hover::after { opacity: 1; }
.card-art { height: 62%; position: relative; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 62%), linear-gradient(145deg, #171020, #08060d); }
.card-art.has-image::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(7, 5, 13, .78), transparent 65%); }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.game-card:hover .card-art img { transform: scale(1.035); }
.card-art.no-image::before { content: ""; position: absolute; width: 160px; height: 160px; border: 1px solid var(--accent); opacity: .35; transform: rotate(45deg); box-shadow: 0 0 45px var(--accent-soft); }
.card-art.no-image::after { content: ""; position: absolute; width: 122px; height: 122px; border: 1px dashed var(--accent); opacity: .35; border-radius: 50%; animation: spin 25s linear infinite; }
.card-glyph { position: relative; z-index: 2; color: var(--accent); font-size: 64px; font-weight: 900; text-shadow: 0 0 24px var(--accent-soft); }
.card-number { position: absolute; z-index: 2; left: 18px; top: 15px; color: var(--accent); font: 10px ui-monospace, monospace; letter-spacing: .15em; }
.card-badge { position: absolute; z-index: 3; right: 14px; top: 14px; padding: 5px 8px; color: #08050d; background: var(--accent); font-size: 10px; font-weight: 700; }
.card-content { min-height: 38%; padding: 20px 21px; display: flex; flex-direction: column; justify-content: center; }
.card-content p { margin: 0 0 6px; color: var(--accent); font-size: 10px; letter-spacing: .1em; }
.card-content h3 { margin: 0; font-size: 24px; line-height: 1.35; }
.card-summary { margin-top: 7px; color: #8f8498; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-link { margin-top: 13px; color: #948b9d; font-size: 11px; display: flex; justify-content: space-between; }
.card-link b { color: var(--accent); font-size: 17px; }
.game-card--compact { min-height: 340px; }
.game-card--compact .card-art { height: 62%; }
.game-card--compact .card-content { min-height: 38%; padding: 16px 17px; }
.game-card--compact .card-content h3 { font-size: 20px; }
.section-more { margin-top: 34px; text-align: center; }
.section-more .secondary-button { min-width: 190px; }
.empty-panel { padding: 55px; border: 1px dashed #5b367b; background: #0d0914; text-align: center; color: var(--muted); }
.home-lobby-strip { padding: 32px 0; border-top: 1px solid var(--line); background: #0d0913; }
.home-lobby-strip .peien-shell { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.home-lobby-strip span { color: #82788b; font-size: 12px; }
.home-lobby-strip a { color: #d5c9df; font-size: 13px; letter-spacing: .04em; }
.home-lobby-strip b { margin-left: 14px; color: #ae68ff; font-size: 18px; }

/* Benefit and contact areas */
.benefit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.benefit-card { min-height: 300px; padding: 32px; position: relative; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(20, 12, 32, .96), rgba(10, 7, 16, .96)); }
.benefit-card::before { content: ""; position: absolute; width: 180px; height: 180px; right: -80px; bottom: -90px; border: 1px solid rgba(166, 98, 255, .18); border-radius: 50%; }
.benefit-card > span { color: #7f4db8; font: 11px ui-monospace, monospace; letter-spacing: .18em; }
.benefit-icon { width: 62px; height: 62px; margin: 28px 0 22px; display: grid; place-items: center; border: 1px solid #9257df; transform: rotate(45deg); color: #cfabff; background: rgba(125, 55, 206, .12); box-shadow: 0 0 28px rgba(133, 62, 221, .18); font-weight: 800; }
.benefit-icon i { font-style: normal; transform: rotate(-45deg); }
.benefit-card h3 { margin: 0 0 10px; font-size: 24px; }
.benefit-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.benefit-note { margin: 24px 0 0; color: #776e80; text-align: center; font-size: 11px; }
.contact-section { background: radial-gradient(circle at 50% 50%, rgba(102, 37, 177, .12), transparent 55%); }
.contact-panel { padding: 76px clamp(25px, 8vw, 110px); text-align: center; position: relative; overflow: hidden; border: 1px solid #553272; background: radial-gradient(circle at center, rgba(133, 54, 217, .18), transparent 55%), #0d0815; }
.contact-panel::before, .contact-panel::after { content: ""; position: absolute; width: 190px; height: 190px; border: 1px solid rgba(177, 105, 255, .18); transform: rotate(45deg); }
.contact-panel::before { left: -110px; top: -110px; }
.contact-panel::after { right: -110px; bottom: -110px; }
.contact-scan { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 45%, rgba(167, 96, 255, .08) 50%, transparent 55%); background-size: 100% 120px; animation: scan 7s linear infinite; pointer-events: none; }
.contact-panel h2, .contact-panel > p, .contact-panel > a, .contact-panel > span { position: relative; z-index: 2; }
.contact-panel > p:not(.section-index) { max-width: 720px; margin: 18px auto 28px; color: var(--muted); }
.contact-panel .primary-button, .contact-panel .secondary-button { margin: auto; }

/* Archive */
.archive-hero { padding: 100px 0 70px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 75% 40%, rgba(125, 54, 210, .2), transparent 32%), #0a0710; }
.archive-tools { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-top: 32px; }
.game-search { display: flex; width: min(560px, 100%); }
.game-search input { flex: 1; min-width: 0; height: 48px; padding: 0 15px; color: #fff; background: #0c0912; border: 1px solid var(--line); }
.game-search button { width: 90px; color: #fff; background: #7e3ad9; border: 1px solid #a66aff; }
.category-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.category-list a { padding: 7px 12px; color: #a89eaf; border: 1px solid var(--line); font-size: 12px; }
.category-list a:hover { color: #fff; border-color: #a66aff; }
.category-list a.is-active { color: #fff; border-color: #a66aff; background: rgba(126, 58, 217, .2); }
.archive-pagination { margin-top: 40px; }
.archive-pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.archive-pagination .page-numbers { min-width: 38px; min-height: 38px; padding: 6px 11px; display: grid; place-items: center; border: 1px solid var(--line); color: #a99eaf; }
.archive-pagination .current, .archive-pagination a:hover { color: #fff; border-color: #a66aff; background: rgba(126, 58, 217, .2); }

/* Game detail */
.detail-hero { min-height: 590px; padding: 105px 0 75px; position: relative; overflow: hidden; display: flex; align-items: center; background: radial-gradient(circle at 76% 45%, var(--accent-soft), transparent 33%), linear-gradient(135deg, #0c0911, #07050b); }
.detail-intro { width: min(700px, 62vw); position: relative; z-index: 2; }
.back-link { display: inline-block; margin-bottom: 42px; color: #8c8295; font-size: 12px; }
.detail-intro h1 { margin: 15px 0; font-size: clamp(64px, 8vw, 118px); line-height: .92; letter-spacing: -.07em; }
.detail-subtitle { color: #d0c7d8; font-size: 18px; }
.feature-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 25px 0; }
.feature-tags span { padding: 7px 12px; color: var(--accent); border: 1px solid var(--accent); background: rgba(255, 255, 255, .02); font-size: 11px; }
.detail-symbol { position: absolute; right: 7vw; top: 50%; width: min(40vw, 500px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 50%; opacity: .3; transform: translateY(-50%); }
.detail-symbol::before { content: ""; position: absolute; inset: 12%; border: 1px dashed var(--accent); border-radius: 50%; animation: spin 28s linear infinite; }
.detail-symbol span { color: var(--accent); font-size: clamp(100px, 14vw, 200px); font-weight: 900; text-shadow: 0 0 60px var(--accent-soft); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, .7fr); gap: clamp(40px, 7vw, 100px); }
.detail-main, .detail-side { min-width: 0; }
.detail-block { margin-bottom: 65px; }
.detail-block h2 { margin: 8px 0 24px; font-size: clamp(30px, 3.5vw, 48px); }
.prose { color: #b5abbc; }
.prose p { line-height: 2; }
.prose img { border: 1px solid var(--line); }
.notice-block { padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); background: linear-gradient(135deg, rgba(22, 13, 35, .96), rgba(10, 7, 16, .96)); box-shadow: inset 3px 0 0 var(--accent); }
.notice-block h2 { margin-bottom: 18px; }
.notice-content { overflow-wrap: anywhere; }
.notice-content > :first-child { margin-top: 0; }
.notice-content > :last-child { margin-bottom: 0; }
.side-card { padding: 24px; margin-bottom: 18px; border: 1px solid var(--line); background: #0d0914; }
.side-card h3 { margin: 0 0 18px; font-size: 18px; }
.info-row { padding: 11px 0; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); font-size: 12px; }
.info-row:last-child { border: 0; }
.info-row span { color: #83798c; }
.side-actions { display: grid; gap: 9px; }
.side-actions a { min-height: 46px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; color: #c8bece; border: 1px solid var(--line); font-size: 13px; }
.side-actions a:first-child { color: #fff; border-color: var(--accent); background: var(--accent-soft); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gallery-grid a { aspect-ratio: 16 / 10; display: block; overflow: hidden; border: 1px solid var(--line); background: #100b1b; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: .25s; }
.gallery-grid a:hover img { transform: scale(1.03); }
.codes { display: grid; gap: 10px; }
.code-card { padding: 18px; display: grid; grid-template-columns: minmax(110px, .5fr) 1.5fr auto; gap: 18px; align-items: center; border: 1px solid var(--line); background: #0d0914; }
.code-card strong { color: var(--accent); font: 700 15px ui-monospace, monospace; }
.code-copy { padding: 7px 11px; color: var(--accent); border: 1px solid var(--accent); background: transparent; cursor: pointer; }
.code-meta { color: #8d8396; font-size: 11px; }
.contact-chips { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-chip { padding: 13px 16px; border: 1px solid var(--line); background: #0d0914; }
.contact-chip small { display: block; color: #817789; }
.contact-chip b { display: block; margin-top: 3px; }
.next-game { min-height: 155px; padding: 35px 0; border-top: 1px solid var(--line); background: #0d0913; }
.next-game a { display: flex; align-items: center; justify-content: space-between; }
.next-game small { color: #9f63ed; letter-spacing: .15em; }
.next-game strong { display: block; margin-top: 5px; font-size: clamp(25px, 3vw, 40px); }
.next-game b { color: #aa6aff; font-size: 40px; }

/* Footer and music */
.site-footer { padding: 32px 0; color: #766d80; border-top: 1px solid var(--line); font-size: 11px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-mark { width: 31px; height: 31px; }
.music-player { position: fixed; z-index: 48; right: 22px; bottom: 22px; }
.music-toggle { min-width: 220px; padding: 9px 15px 9px 9px; display: flex; align-items: center; gap: 11px; color: #fff; border: 1px solid rgba(181, 110, 255, .44); border-radius: 999px; background: rgba(12, 8, 19, .9); box-shadow: 0 15px 45px rgba(24, 7, 49, .48); backdrop-filter: blur(14px); cursor: pointer; }
.music-disc { width: 40px; height: 40px; flex: 0 0 auto; position: relative; display: grid; place-items: center; border: 1px solid #a768ff; border-radius: 50%; background: radial-gradient(circle, #d3b0ff 0 7%, #6f2ebf 8% 18%, #171020 19% 62%, #8a4de2 63% 65%, #0c0912 66%); box-shadow: 0 0 19px rgba(161, 91, 255, .28); }
.music-disc i { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.music-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.35; }
.music-copy b { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.music-copy small { color: #968b9f; font-size: 9px; }
.music-player.is-playing .music-disc { animation: spin 3.8s linear infinite; }
.music-player.is-playing .music-disc::after { content: ""; position: absolute; inset: -5px; border: 1px solid rgba(176, 104, 255, .25); border-radius: 50%; animation: pulse 1.8s ease-out infinite; }
.mobile-actions { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes scan { to { background-position: 0 120px; } }
@keyframes pulse { from { opacity: .8; transform: scale(.9); } to { opacity: 0; transform: scale(1.25); } }

@media (max-width: 1120px) {
    .site-nav { gap: 15px; }
    .hero-console { right: -2vw; opacity: .45; }
    .hero-content { width: 70vw; }
    .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .detail-symbol { right: -10vw; opacity: .18; }
    .detail-intro { width: 80vw; }
}

@media (max-width: 820px) {
    html { scroll-padding-top: 70px; }
    .peien-shell { width: min(calc(100% - 32px), 1380px); }
    .site-header { height: 70px; }
    .brand-copy b { font-size: 14px; }
    .brand-mark { width: 34px; height: 34px; }
    .nav-toggle { display: block; }
    .site-nav { display: none; position: absolute; left: 16px; right: 16px; top: 70px; padding: 15px; align-items: stretch; flex-direction: column; gap: 0; border: 1px solid var(--line); background: rgba(16, 11, 27, .98); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 10px 11px; }
    .hero { height: auto; min-height: 650px; padding: 70px 0 52px; }
    .hero-content { width: 100%; }
    .hero h1 { font-size: clamp(48px, 14vw, 72px); }
    .hero-copy { margin: 18px 0; font-size: 14px; }
    .hero-console { right: -175px; top: 32%; opacity: .13; }
    .hero-orbit { display: none; }
    .hero-stats { margin-top: 28px; gap: 18px; }
    .section { padding: 68px 0; }
    .section-heading { margin-bottom: 28px; align-items: flex-start; flex-direction: column; gap: 15px; }
    .game-grid, .game-grid--featured, .game-grid--latest, .game-grid--featured.cards-2, .game-grid--featured.cards-3, .game-grid--featured.cards-4, .game-grid--featured.cards-5, .game-grid--featured.cards-6, .game-grid--latest.cards-2, .game-grid--latest.cards-3 { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .game-grid.game-grid--latest { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .game-grid--featured.cards-1, .game-grid--latest.cards-1 { grid-template-columns: minmax(0, 1fr); }
    .game-grid .game-card { grid-column: auto !important; }
    .game-grid--featured.cards-3 .game-card:last-child, .game-grid--featured.cards-5 .game-card:last-child, .game-grid--latest.cards-3 .game-card:last-child, .game-grid--latest.cards-5 .game-card:last-child, .game-grid--latest.cards-7 .game-card:last-child, .game-grid--latest.cards-9 .game-card:last-child, .game-grid--latest.cards-11 .game-card:last-child { grid-column: 1 / -1 !important; }
    .game-card, .game-card--compact { min-height: 315px; }
    .card-art, .game-card--compact .card-art { height: 60%; }
    .card-content, .game-card--compact .card-content { min-height: 40%; padding: 14px; }
    .card-content h3, .game-card--compact .card-content h3 { font-size: clamp(16px, 5vw, 21px); }
    .card-summary { display: none; }
    .card-art.no-image::before { width: 105px; height: 105px; }
    .card-art.no-image::after { width: 82px; height: 82px; }
    .card-glyph { font-size: 48px; }
    .benefit-grid { grid-template-columns: 1fr; }
    .benefit-card { min-height: 255px; }
    .contact-panel { padding: 55px 20px; }
    .archive-hero { padding: 75px 0 52px; }
    .archive-tools { align-items: flex-start; flex-direction: column; }
    .detail-hero { min-height: 570px; padding: 85px 0 70px; }
    .detail-intro { width: 100%; }
    .detail-intro h1 { font-size: clamp(56px, 19vw, 88px); }
    .detail-symbol { width: 100vw; right: -58vw; }
    .detail-layout { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
    .code-card { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
    .home-lobby-strip .peien-shell { align-items: flex-start; flex-direction: column; gap: 8px; }
    .music-player { right: 12px; bottom: 12px; }
    .music-toggle { min-width: 0; padding: 7px; }
    .music-copy { display: none; }
    .mobile-actions { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; padding: 9px; display: flex; gap: 8px; border-top: 1px solid var(--line); background: rgba(7, 5, 13, .94); }
    .mobile-actions a { flex: 1; padding: 10px 7px; color: #fff; background: #6f31c6; text-align: center; font-size: 12px; }
    .single-peien_game .site-footer { padding-bottom: 80px; }
    .single-peien_game .music-player { bottom: 70px; }
}

@media (max-width: 480px) {
    .hero-search { min-height: 50px; }
    .hero-search button { min-width: 105px; padding-inline: 10px; font-size: 12px; }
    .hero-actions .primary-button, .hero-actions .secondary-button { flex: 1; min-width: 0; padding-inline: 12px; }
    .hero-stats span { letter-spacing: 0; }
    .game-card, .game-card--compact { min-height: 285px; }
    .card-content p { font-size: 9px; }
    .card-link { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
