/* anime-grid.css - 静态样式表 */
.ag-wrap { width: 100%; max-width: 100%; box-sizing: border-box; }
.ag-search-header { text-align: center; padding: 40px 0 20px 0; margin-bottom: 20px; }
.ag-search-title { font-size: 24px; font-weight: bold; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.5); margin: 0; }
.ag-search-keyword { color: var(--ag-tg-bg); border-bottom: 2px solid var(--ag-tg-bg); padding-bottom: 2px; }

.ag-filter-bar { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 30px; }
.ag-btn { position: relative; padding: 6px 18px; font-size: var(--ag-f-s); font-weight: bold; color: var(--ag-f-c); background: var(--ag-f-bg); border: 1px solid var(--ag-f-c); text-decoration: none; transition: 0.3s; cursor: pointer; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.ag-btn:hover, .ag-btn.active { background: var(--ag-f-h-bg); color: var(--ag-f-h-c); box-shadow: 0 0 15px var(--ag-f-h-bg); border-color: var(--ag-f-h-bg); }

.ag-container { display: grid; gap: 20px; margin-bottom: 20px; grid-template-columns: repeat(9, 1fr); perspective: 1200px; }
@media (max-width: 1400px) { .ag-container { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 768px) { .ag-container { grid-template-columns: repeat(3, 1fr); } }

.anime-resource-unit-wrapper-complex-v9 { background: var(--ag-bg-color); border-radius: 8px; position: relative; aspect-ratio: var(--ag-ratio); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 15px; cursor: pointer; opacity: 1; transform-style: preserve-3d; }
.anime-resource-unit-wrapper-complex-v9.is-ad { aspect-ratio: auto !important; height: auto !important; display: block !important; padding: 0 !important; min-height: 0 !important; }
.anime-resource-unit-wrapper-complex-v9::after { content:''; position:absolute; inset:0; background: var(--ag-bg-color); opacity: var(--ag-bg-opacity); z-index:-1; border-radius:8px; }

.anime-border-visual-layer-special-x { position: absolute; inset: 0; border: 2px solid var(--card-color); border-radius: 6px; box-shadow: 0 0 5px var(--card-color); z-index: 0; pointer-events: none; background: rgba(255,255,255,0.02); opacity: 0; transition: 0.3s; }
.ag-img-box { position: absolute; inset: 5px; bottom: 50px; overflow: hidden; border-radius: 4px; z-index: 1; opacity: 0; transition: 0.3s; }
.is-ad .ag-img-box { position: relative !important; inset: auto !important; width: 100% !important; height: auto !important; padding: 5px; box-sizing: border-box; display: block; background: transparent !important; bottom:0 !important; }
.ag-img-box img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.is-ad .ag-img-box img { width: 100% !important; height: auto !important; object-fit: contain !important; display: block; }

.ag-views-count { position: absolute; z-index: 99; font-size: var(--ag-v-s); color: var(--ag-v-c); top: var(--ag-v-top); bottom: var(--ag-v-bottom); left: var(--ag-v-left); right: var(--ag-v-right); text-shadow: 0 1px 3px rgba(0,0,0,0.9); font-weight: bold; pointer-events: none; background:rgba(0,0,0,0.3); padding:2px 4px; border-radius:4px; }
.ag-tags { position: absolute; top: var(--ag-tg-t); left: var(--ag-tg-l); z-index: 5; display: flex; pointer-events: none; gap: var(--ag-tg-gap); }
.ag-tag { background: var(--ag-tg-bg); color: var(--ag-tg-c); font-size: var(--ag-tg-s); padding: 2px 6px; border-bottom-right-radius: 4px; line-height: 1.2; }
.ag-hot-icon { position: absolute; top: -5px; left: -5px; z-index: 7; font-size: 20px; animation: fireBurn 1s infinite alternate; filter: drop-shadow(0 0 5px orange); }
@keyframes fireBurn { from { transform: scale(1); } to { transform: scale(1.2) rotate(5deg); } }
.ag-play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); width: 40px; height: 40px; background: rgba(0,0,0,0.6); border-radius: 50%; border: 2px solid var(--card-color); z-index: 6; pointer-events: none; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.ag-play-icon::before { content: ''; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 12px; border-color: transparent transparent transparent #fff; margin-left: 2px; }
.anime-resource-unit-wrapper-complex-v9:hover .ag-play-icon { transform: translate(-50%, -50%) scale(1); }
.ag-ribbon { position: absolute; top: 0; right: 0; z-index: 6; width: 40px; height: 40px; pointer-events: none; overflow: hidden; }
.ag-ribbon span { position: absolute; top: 7px; right: -15px; width: 60px; background: var(--card-color); color: #000; font-size: 9px; font-weight: 800; text-align: center; line-height: 16px; transform: rotate(45deg); box-shadow: 0 2px 4px rgba(0,0,0,0.3); }

.ag-title { z-index: 2; font-size: var(--ag-t-s); font-weight: bold; color: var(--card-color); text-decoration: none; margin-top: 5px; transform: translateY(var(--ag-t-offset)); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; padding: 0 5px; text-shadow: 0 1px 2px rgba(0,0,0,0.8); opacity: 0; transition:0.3s; line-height: 1.4; height: auto; }
.ag-cats-wrap { z-index: 2; margin-top: var(--ag-c-m); display: flex; gap: 5px; font-size: var(--ag-c-s); opacity: 0; transform: translateY(var(--ag-c-offset)); animation: fadeInSimple 0.5s ease 1s forwards; padding-bottom:0; }
.ag-cat-link, .ag-year { color: var(--ag-c-c); text-decoration: none; } .ag-cat-link:hover { color: #fff; }
.ag-year { opacity: 0.7; font-size: 0.9em; margin-left: 2px; }

.effect-50 .anime-border-visual-layer-special-x { animation: mechaBorderStrike 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards; }
.effect-50 .ag-img-box { animation: mechaImgStrike 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards; }
.effect-50 .ag-title { animation: fadeInSimple 0.5s ease 0.4s forwards; }
.anime-resource-unit-wrapper-complex-v9:hover .anime-border-visual-layer-special-x { transform: translate(-6px, 6px) scale(0.95); opacity: 0.5; border-style: dashed; }
.anime-resource-unit-wrapper-complex-v9:hover .ag-img-box { transform: translate(6px, -6px) scale(1.05); box-shadow: -5px 5px 20px var(--card-color); z-index: 5; }
@keyframes mechaBorderStrike { 0% { opacity: 0; transform: translateX(-80px) scaleY(1.2); filter: blur(5px); } 60% { opacity: 1; transform: translateX(10px) scaleY(0.9); } 100% { opacity: 1; transform: translateX(0) scaleY(1); filter: blur(0); } }
@keyframes mechaImgStrike { 0% { opacity: 0; transform: translateX(80px) scaleY(1.2); filter: blur(5px); } 60% { opacity: 1; transform: translateX(-10px) scaleY(0.9); filter: brightness(2); } 100% { opacity: 1; transform: translateX(0) scaleY(1); filter: brightness(1); } }
@keyframes fadeInSimple { to { opacity: 1; } }

.ag-container.exit-dissolve.ag-page-leaving .anime-resource-unit-wrapper-complex-v9 { animation: agDissolve 0.5s ease-in forwards !important; pointer-events: none; }
@keyframes agDissolve { 0% { opacity: 1; transform: translateY(0) scaleY(1); filter: blur(0); } 100% { opacity: 0; transform: translateY(-30px) scaleY(1.5); filter: blur(10px); } }
.ag-container.exit-blackhole.ag-page-leaving .anime-resource-unit-wrapper-complex-v9 { animation: agBlackHole 0.6s ease-in forwards !important; pointer-events: none; }
@keyframes agBlackHole { 0% { opacity: 1; transform: scale(1) rotate(0); } 100% { opacity: 0; transform: scale(0) rotate(720deg); } }
.ag-container.exit-warp.ag-page-leaving .anime-resource-unit-wrapper-complex-v9 { animation: agWarp 0.5s ease-in forwards !important; pointer-events: none; }
@keyframes agWarp { 0% { opacity: 1; transform: translateZ(0); } 40% { transform: translateZ(-50px); opacity: 0.8; } 100% { opacity: 0; transform: translateZ(-1000px); } }
.ag-container.exit-drop.ag-page-leaving .anime-resource-unit-wrapper-complex-v9 { animation: agDrop 0.6s ease-in forwards !important; pointer-events: none; }
@keyframes agDrop { 0% { opacity: 1; transform: rotateX(0); } 100% { opacity: 0; transform: rotateX(45deg) translateY(100vh); } }
.ag-container.exit-slide.ag-page-leaving .anime-resource-unit-wrapper-complex-v9 { animation: agSlide 0.4s ease-in forwards !important; pointer-events: none; }
@keyframes agSlide { to { opacity: 0; transform: translateX(-50px) skewX(-10deg); } }

.ag-ad-row { grid-column: 1 / -1; display: none; width: 100%; gap: 20px; margin: 15px 0; }
.ag-ad-row .anime-resource-unit-wrapper-complex-v9 { flex: 1; }
.show-pc-mo { display: flex; } @media (max-width: 768px) { .show-pc-mo { flex-direction: column; } }
@media (min-width: 1401px) { .show-pad { display: none; } } @media (max-width: 1400px) and (min-width: 769px) { .show-pc-mo { display: none; } .show-pad { display: flex; } }

.ag-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; font-family: 'Courier New', monospace; }
.ag-pg-link, .ag-pg-btn { padding: 8px 14px; background: var(--ag-pg-bg); color: var(--ag-pg-c); border: 1px solid var(--ag-pg-c); text-decoration: none; font-size: var(--ag-pg-s); font-weight: bold; cursor: pointer; transition: 0.2s; clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
.ag-pg-link:hover, .ag-pg-btn:hover { background: var(--ag-pg-a-bg); color: var(--ag-pg-a-c); border-color: var(--ag-pg-c); transform: translateY(-2px); }
.ag-pg-link.current { background: var(--ag-pg-c); color: #000; border-color: var(--ag-pg-c); box-shadow: 0 0 10px var(--ag-pg-a-bg); }
.ag-pg-home { margin-right: 15px; color: #ff0055; border-color: #ff0055; background: rgba(255, 0, 85, 0.05); }
.ag-pg-home:hover { background: #ff0055; color: #fff; border-color: #ff0055; box-shadow: 0 0 10px rgba(255, 0, 85, 0.4); }
.ag-pg-input { width: var(--ag-pi-w); height: 36px; box-sizing: border-box; padding: 0; background: var(--ag-pi-bg); border: 1px solid #444; color: var(--ag-pi-c); text-align: center; outline: none; }
.ag-pg-go { height: 36px; padding: 0 12px; background: var(--ag-go-bg); color: var(--ag-go-c); border: 1px solid #444; cursor: pointer; }

body.search .ag-ad-row, body.search-results .ag-ad-row, body.search .is-ad, body.search-results .is-ad { display: none !important; }
body.search .anime-resource-unit-wrapper-complex-v9, body.search-results .anime-resource-unit-wrapper-complex-v9 { justify-content: flex-start !important; padding: 0 !important; overflow: hidden !important; position: relative !important; }
body.search .ag-img-box, body.search-results .ag-img-box { position: absolute !important; top: 5px !important; left: 5px !important; width: calc(100% - 10px) !important; height: calc(100% - 55px) !important; bottom: auto !important; margin: 0 !important; background: transparent !important; z-index: 1 !important; border-radius: 4px !important; }
body.search .ag-img-box img, body.search-results .ag-img-box img { width: 100% !important; height: 100% !important; object-fit: cover !important; position: absolute !important; top: 0 !important; left: 0 !important; }
body.search .ag-title, body.search-results .ag-title { position: absolute !important; bottom: 25px !important; top: auto !important; left: 0 !important; width: 100% !important; margin: 0 !important; transform: none !important; z-index: 10 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; height: 20px !important; line-height: 20px !important; padding: 0 5px !important; }
body.search .ag-cats-wrap, body.search-results .ag-cats-wrap { position: absolute !important; bottom: 5px !important; top: auto !important; left: 0 !important; width: 100% !important; margin: 0 !important; transform: none !important; z-index: 10 !important; height: 18px !important; }