/*
Theme Name: Smile Anime Glass Theme
Theme URI: https://7a5704fd-6a7c-4dbd-af16-e6f69f0f4ca5.vip.gensparksite.com/
Author: Genspark AI
Description: 依照「微笑動漫」首頁風格製作的 WordPress 主題，採用深色玻璃擬態 ACG 入口設計。
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: smile-anime-glass
*/

html { scroll-behavior: smooth; }
body.smile-acg-theme img { max-width: 100%; height: auto; }
body.smile-acg-theme .wp-block-image { margin: 0; }
body.smile-acg-theme.home .site-main,
body.smile-acg-theme.blog .site-main,
body.smile-acg-theme.page-template .site-main { min-height: 40vh; }
body.smile-acg-theme.home #page.site {
  position: relative;
  isolation: isolate;
}
body.smile-acg-theme.home .site-main {
  overflow: clip;
}
.wp-site-blocks, .site { overflow: hidden; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
.home .site-header,
.home .site-footer {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
html:has(body.smile-acg-theme.home) {
  background: linear-gradient(180deg, #1E242B 0%, #181D24 100%);
}
body.smile-acg-theme.home {
  background: linear-gradient(180deg, #1E242B 0%, #181D24 100%);
}
body.smile-acg-theme .hero-section,
body.smile-acg-theme .section,
body.smile-acg-theme .site-footer {
  position: relative;
}
body.smile-acg-theme .hero-section::after {
  content: '';
  position: absolute;
  inset: auto 0 -120px 0;
  height: 220px;
  background: linear-gradient(180deg, rgba(143,107,255,0.08), transparent 72%);
  pointer-events: none;
}
body.smile-acg-theme .poster-item img,
body.smile-acg-theme .anime-card-img,
body.smile-acg-theme .season-card-img {
  transform: translateZ(0);
}
body.smile-acg-theme .nav-link:focus-visible,
body.smile-acg-theme .btn:focus-visible,
body.smile-acg-theme button:focus-visible {
  outline: 2px solid rgba(111,236,255,0.75);
  outline-offset: 2px;
}
.theme-page-wrap {
  padding: 140px 0 80px;
  background: radial-gradient(circle at top, rgba(88,166,255,0.14), transparent 40%), #0b1020;
  min-height: 100vh;
}
.theme-page-card {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px;
  border-radius: 24px;
  background: rgba(10,16,33,0.76);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 24px 60px rgba(0,0,0,0.32);
  color: #e8eefc;
}
.theme-page-card h1, .theme-page-card h2, .theme-page-card h3 { color: #fff; }
.theme-page-card a { color: #7fd3ff; }
.home .theme-page-wrap { padding-top: 0; }
.smile-empty-note {
  padding: 24px 28px;
  border-radius: 20px;
  color: #d7e4ff;
}
.smile-thumb-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99,168,255,0.18), rgba(143,107,255,0.16));
  font-size: 40px;
}
.news-main-link,
.music-card-link,
.anime-card-link,
.wiki-recent-item,
.news-quick-item,
.music-list-item,
.coser-card,
.cosplay-rank-item {
  color: inherit;
  text-decoration: none;
}
.news-main-link { display: block; }
.smile-news-main-media {
  overflow: hidden;
}
.smile-news-main-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.smile-dynamic-grid .anime-card {
  display: block;
}
.smile-dynamic-grid .anime-card-link {
  display: block;
  height: 100%;
}
.smile-dynamic-grid .anime-card-title-ja {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-section-hero {
  padding: 0 0 28px;
}
.theme-section-hero-card {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 40px;
  border-radius: 28px;
}
.theme-section-eyebrow {
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #8ec8ff;
}
.theme-section-title {
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
}
.theme-section-summary {
  max-width: 760px;
  margin: 14px 0 0;
  color: #d9e6ff;
  font-size: 15px;
  line-height: 1.85;
}
.smile-section-page-wrap {
  padding-top: 120px;
}
.smile-section-page-wrap .section {
  padding-top: 18px;
}
.smile-section-page-wrap .section:first-of-type {
  padding-top: 0;
}
.body-lock,
body.mobile-nav-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .theme-section-hero-card {
    width: min(100%, calc(100% - 32px));
    padding: 32px 28px;
  }
  .theme-page-card {
    width: min(100%, calc(100% - 24px));
  }
}

@media (max-width: 900px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: auto;
    min-height: 64px;
    padding: 12px 0;
    gap: 12px;
  }
  .header-actions {
    gap: 8px;
  }
  .header-sponsor-btn,
  .header-login-btn,
  .maximize-btn {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .primary-nav {
    position: fixed;
    top: 76px;
    left: 12px;
    right: 12px;
    z-index: 1200;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    max-height: calc(100vh - 96px);
    padding: 14px;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 22px;
    background: rgba(12, 18, 30, 0.94);
    box-shadow: 0 24px 60px rgba(0,0,0,0.42);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }
  .primary-nav.mobile-open,
  .primary-nav.nav-open {
    display: flex;
  }
  .primary-nav .nav-link,
  .primary-nav .nav-dropdown a {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    font-size: 14px;
    justify-content: space-between;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
  }
  .primary-nav .nav-link.active::after {
    display: none;
  }
  .primary-nav .nav-item::after {
    display: none;
  }
  .primary-nav .nav-dropdown {
    margin-top: 6px;
    padding: 6px 0 0;
  }
  .search-overlay {
    top: 72px;
  }
  .hero-content-wrap,
  .news-layout,
  .music-layout,
  .cosplay-grid,
  .wiki-layout,
  .discussion-grid {
    grid-template-columns: 1fr !important;
  }
  .hero-posters {
    order: -1;
    justify-content: center;
    min-height: unset;
    padding-top: 8px;
  }
  .hero-posters .poster-item:nth-child(2),
  .hero-posters .poster-item:nth-child(3) {
    margin-top: 0 !important;
  }
  .hero-actions {
    flex-wrap: wrap;
  }
  .hero-actions .btn {
    flex: 1 1 220px;
    justify-content: center;
  }
  .section-header,
  .music-section-header,
  .cosplay-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .music-header-right,
  .cosplay-header-right {
    width: 100%;
    align-items: flex-start;
  }
  .tab-switch,
  .weekday-tabs,
  #music-type-tabs,
  .music-charts-tabs,
  .wiki-categories {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .tab-switch::-webkit-scrollbar,
  .weekday-tabs::-webkit-scrollbar,
  #music-type-tabs::-webkit-scrollbar,
  .music-charts-tabs::-webkit-scrollbar,
  .wiki-categories::-webkit-scrollbar {
    display: none;
  }
  .theme-section-hero {
    padding-bottom: 20px;
  }
  .theme-section-hero-card {
    padding: 28px 22px;
    border-radius: 22px;
  }
  .theme-section-summary {
    font-size: 14px;
    line-height: 1.7;
  }
}

@media (max-width: 640px) {
  .theme-page-wrap {
    padding: 104px 0 56px;
  }
  .smile-section-page-wrap {
    padding-top: 98px;
  }
  .theme-page-card {
    width: min(100%, calc(100% - 16px));
    padding: 22px 18px;
    border-radius: 20px;
  }
  .theme-section-hero-card {
    width: min(100%, calc(100% - 16px));
    padding: 24px 18px;
    border-radius: 20px;
  }
  .theme-section-title {
    font-size: 30px;
  }
  .hero-title {
    font-size: clamp(34px, 11vw, 52px);
    line-height: 1.05;
  }
  .hero-subtitle {
    font-size: 14px;
    line-height: 1.75;
  }
  .hero-stats {
    gap: 10px;
    flex-wrap: wrap;
  }
  .hero-stat {
    min-width: calc(50% - 8px);
  }
  .hero-stat-divider {
    display: none;
  }
  .news-main,
  .music-charts-panel,
  .cosplay-featured,
  .vote-card {
    border-radius: 20px;
  }
  .music-featured-cards,
  .coser-cards-grid,
  .wiki-stats-grid {
    grid-template-columns: 1fr !important;
  }
  .season-cards {
    padding-bottom: 8px;
  }
  .news-quick-list,
  .music-charts-list,
  .wiki-recent-list,
  .cosplay-ranking {
    gap: 10px;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 15px;
  }
  .logo-icon-box {
    width: 30px;
    height: 30px;
  }
  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }
  .btn-icon {
    width: 38px;
    height: 38px;
  }
  .hero-actions .btn {
    width: 100%;
    flex-basis: 100%;
  }
  .wiki-search-bar {
    gap: 8px;
    padding: 10px 12px;
  }
  .wiki-search-bar input {
    min-width: 0;
  }
}
