:root {
    /* Color Palette */
    --sun-white: #fdfcf5;
    --sand-beige: #f4f1ea;
    --forest-green: #2d5016;
    --soil-brown: #5c4d3c;
    --moss-green: #7fb069;
    --sky-blue: #87ceeb;
    --clay-orange: #d4a373;
    --sunflower-yellow: #ffd700;
    
    /* Gradients */
    --bg-gradient: linear-gradient(135deg, var(--sun-white) 0%, var(--sand-beige) 100%);
    
    /* Fonts */
    --font-title: 'Space Grotesk', sans-serif;
    --font-body: 'Merriweather', serif;
    --font-mono: 'IBM Plex Mono', monospace;
    
    /* Spacing & Sizing */
    --border-radius-std: 8px;
    --border-radius-lg: 12px;
}

/* Breadcrumb — detail */
.breadcrumb-nav {
    margin: 0 0 14px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.breadcrumb-list > li {
    list-style: none;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--forest-green);
    padding: 4px 8px;
    border-radius: var(--border-radius-std);
    border: 1px dashed rgba(45, 80, 22, 0.35);
    transition: background 0.2s ease;
}

.breadcrumb-item a:hover {
    background: rgba(127, 176, 105, 0.15);
}

.breadcrumb-item span[aria-current="page"] {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--soil-brown);
    padding: 4px 8px;
}

.breadcrumb-separator {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--moss-green);
    user-select: none;
}

.game-star--detail {
    display: inline-flex;
    align-items: center;
    margin: 8px 0 12px;
    padding: 8px 14px;
    border-radius: var(--border-radius-lg);
    background: rgba(244, 241, 234, 0.85);
    border: 1px dashed rgba(92, 77, 60, 0.35);
}

.game-star--detail .detail-rating-visual {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--clay-orange);
    font-size: 1.05rem;
    line-height: 1;
}

.game-star--detail .detail-rating-visual .star-icon {
    margin-right: 0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-gradient);
    color: var(--soil-brown);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    color: var(--forest-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    padding: 0 20px;
    max-width: 1200px;
    margin: 20px auto;
}

.container-box{
    display: flex;
    gap: 20px;
}


/* Main Content Area */
main {
    flex: 1;
    padding: 20px 0;
}

/* Header Component */
header {
    background: linear-gradient(to bottom, #d4a373, #c49262); /* Wood texture simulation */
    padding: 15px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--forest-green);
    flex: 0 1 auto;
    min-width: 0;
}

.logo svg {
    width: 32px;
    height: 32px;
    fill: var(--forest-green);
}

/* Scope to site header only — detail breadcrumbs use .breadcrumb-nav and must not inherit pill-nav styles */
header nav ul {
    display: flex;
    gap: 20px;
}

header nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--sand-beige);
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--forest-green);
    border: 1px solid var(--forest-green);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Desktop nav: prevent wrapping, support tablet "More" overflow */
.desktop-nav {
    flex: 1 1 auto;
    min-width: 0; /* allow shrinking so overflow can be detected */
    display: flex;
    justify-content: flex-end;
}

.desktop-nav ul {
    flex-wrap: nowrap;
    align-items: center;
    min-width: 0;
    width: auto;
    margin-left: auto;
}

.desktop-nav li {
    flex: 0 0 auto;
    min-width: 0;
}

.desktop-nav .menu-link {
    white-space: nowrap;
    flex-wrap: nowrap;
}

.desktop-nav .nav-more {
    position: relative;
}

.desktop-nav .nav-more-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--sand-beige);
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--forest-green);
    border: 1px solid var(--forest-green);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    white-space: nowrap;
    line-height: 1.2;
}

.desktop-nav .nav-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: var(--sun-white);
}

.desktop-nav .nav-more.open .nav-more-btn {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    background: var(--forest-green);
    color: var(--sun-white);
}

.desktop-nav .nav-more-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    min-width: 220px;
    max-width: 320px;
    padding: 12px;
    background: var(--sun-white);
    border: 1px solid rgba(45, 80, 22, 0.25);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.14);
    display: none;
    z-index: 500;
}

.desktop-nav .nav-more.open .nav-more-menu {
    display: block;
}

.desktop-nav .nav-more-menu li {
    margin: 0;
}

.desktop-nav .nav-more-menu li + li {
    margin-top: 8px;
}

.desktop-nav .nav-more-menu a.menu-link {
    width: 100%;
    justify-content: flex-start;
    padding: 7px 14px;
    border-radius: 12px;
    border: 1px solid rgba(45, 80, 22, 0.65);
    background: rgba(244, 241, 234, 0.75);
    box-shadow: none;
    transform: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.desktop-nav .nav-more-menu a.menu-link:hover {
    background: var(--moss-green);
    border-color: var(--moss-green);
    color: var(--sun-white);
    transform: none;
    box-shadow: none;
}

header nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: var(--sun-white);
}

header nav a.active {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    background: var(--forest-green);
    color: var(--sun-white);
}

/* Sidebar Component */
aside {
    width: 250px;
    background: var(--sun-white);
    border: 2px solid var(--forest-green);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.mobile-filter-btn {
    display: none; /* Hidden on desktop */
}

.sidebar-title {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--soil-brown);
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--forest-green);
    padding-bottom: 5px;
}

.category-list li {
    margin-bottom: 10px;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: var(--sand-beige);
    border-radius: var(--border-radius-std);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.category-link:hover {
    background: var(--moss-green);
    color: var(--sun-white);
}

.category-link.active {
    background: var(--moss-green);
    color: var(--sun-white);
}

.category-link.active + .humidity-bar {
    background: rgba(127, 176, 105, 0.35);
}

.category-link.active + .humidity-bar .humidity-fill {
    background: var(--clay-orange);
}

.humidity-bar {
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.humidity-fill {
    height: 100%;
    background: var(--sky-blue);
}

/* Footer Component */
footer {
    margin-top: auto;
    background: var(--forest-green);
    color: var(--sand-beige);
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.footer-decoration {
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C200,40 200,0 400,0 C600,0 600,40 800,40 C1000,40 1000,0 1200,0 V40 H0 Z' fill='%23fdfcf5'/%3E%3C/svg%3E"); /* Simple wave/vine separator */
    transform: rotate(180deg);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-column h3,
.footer-column .footer-title {
    color: var(--sunflower-yellow);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-links a {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--sunflower-yellow);
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(to bottom, #aaddff, #fdfcf5);
    border-radius: var(--border-radius-lg);
    padding: 60px 40px;
    margin-bottom: 40px;
    overflow: hidden;
    text-align: center;
    border: 2px solid var(--forest-green);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 2.6rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 var(--sun-white);
}

.hero p {
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero .hero-headline {
    font-size: clamp(1.15rem, 2vw, 1.6rem);
    margin-bottom: 16px;
    font-weight: 700;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--clay-orange);
    color: var(--sun-white);
    font-family: var(--font-title);
    font-weight: 700;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.cta-button--plain::after {
    content: none !important;
}

.cta-button--plain {
    padding-bottom: 12px !important; /* 固定高度 */
    transition: none !important;     /* 取消 hover 动画 */
}

.cta-button--plain:hover {
    padding-bottom: 12px !important; /* hover 时也保持一致 */
    background: inherit !important;  /* 不改变背景 */
    color: inherit !important;       /* 不改变文字颜色 */
}

.hero-search-input {
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.9) !important; /* 固定一个背景色 */
    color: var(--soil-brown) !important;
}

.hero-search-input:focus,
.hero-search-input:hover {
    background: rgba(255, 255, 255, 0.9) !important; /* 获得焦点 / hover 也保持不变 */
    color: var(--soil-brown) !important;
}

/* 阻止浏览器自动填充/输入后强制改背景色 */
.hero-search-input:-webkit-autofill,
.hero-search-input:-webkit-autofill:hover,
.hero-search-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.9) inset !important;
    box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.9) inset !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--soil-brown) !important;
}

.hero-search-form {
    width: 100%;
}

.hero-search-form .hero-search-input {
    min-width: 0;
}

.cta-button::after {
    content: '🌱';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    transition: bottom 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cta-button:hover {
    padding-bottom: 25px; /* Make space for the sprout */
}

.cta-button:hover::after {
    bottom: 5px;
}

.sun-rays {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: repeating-conic-gradient(
        from 0deg,
        rgba(255, 215, 0, 0.2) 0deg 10deg,
        transparent 10deg 20deg
    );
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.clouds {
    position: absolute;
    top: 20px;
    left: -100px;
    font-size: 3rem;
    opacity: 0.7;
    animation: floatCloud 30s linear infinite;
}

@keyframes floatCloud {
    from { transform: translateX(-100px); }
    to { transform: translateX(1200px); }
}

/* Hot Games Section */
.section-title {
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 15px;
}

.section-header-row h2 {
    flex: 1;
    margin: 0;
}

.section-header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.module-link-more {
    color: var(--moss-green, #6b8f71);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.module-link-more:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.section-title::before {
    content: '';
    display: block;
    width: 8px;
    height: 30px;
    background: var(--moss-green);
    border-radius: 4px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='%23d4a373' fill-opacity='0.1'/%3E%3Cpath d='M0 0h50v50H0z' fill='%23d4a373' fill-opacity='0.2'/%3E%3C/svg%3E"); /* Cork texture simulation */
    padding: 20px;
    border-radius: var(--border-radius-lg);
}

/* Responsive two-column wrapper */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 20px;
    min-width: 0;
}

.game-card {
    background: var(--sun-white);
    width: 100%;
    min-width: 0;
    padding: 10px 10px 30px 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transform: rotate(var(--rotation, 0deg));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    transform: rotate(-3deg) scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    z-index: 10;
}

.brief-comment-game{
    overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.brief-comment-game-one{
    text-align: left;
    overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient: vertical;
  font-size: 0.85rem;
}

.game-thumb {
    width: 100%;
    max-width: 360px;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 220px;
    object-fit: cover;
    display: block;
    background: #e9e4db;
    margin: 0 auto 10px;
    border: 1px solid #ddd;
}

.game-info {
    min-width: 0;
}
.game-title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--soil-brown);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* Eco Contribution */
.eco-dashboard {
    background: var(--sun-white);
    border: 2px solid var(--moss-green);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 40px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--forest-green);
    font-weight: 700;
}

.progress-container {
    flex: 1;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--moss-green);
    width: 0%; /* JS will animate this */
    transition: width 1s ease-out;
}

/* Latest Cultivation */
.new-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    min-width: 0;
}

.new-game-card {
    background: var(--sand-beige);
    width: 100%;
    min-width: 0;
    padding: 10px;
    border-radius: var(--border-radius-std);
    text-align: center;
    position: relative;
    border: 1px dashed var(--forest-green);
    overflow: hidden;
}

.new-game-card a {
    display: block;
    width: 100%;
    min-width: 0;
}

.new-game-title {
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.new-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: inline-block;
    background: var(--forest-green);
    color: var(--sun-white);
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.25;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(253, 252, 245, 0.5);
    box-shadow: 0 2px 6px rgba(45, 80, 22, 0.28);
    white-space: nowrap;
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Game list tags (home + category) */
.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
}

.game-tag {
    display: inline-block;
    padding: 2px 9px;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--forest-green);
    background: rgba(127, 176, 105, 0.28);
    border: 1px solid rgba(45, 80, 22, 0.32);
    border-radius: 999px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seed-packet .game-tags {
    margin-top: 6px;
}

.seed-packet .game-tag {
    font-size: 0.66rem;
}

/* Detail Page */
.detail-header {
    background: var(--sun-white);
    border: 2px solid var(--clay-orange);
    padding: 5px; /* Outer border */
    border-radius: var(--border-radius-lg);
    margin-bottom: 30px;
}

.recommend-section {
    margin-top: 40px;
}

.detail-inner-border {
    border: 1px solid var(--forest-green); /* Inner border */
    padding: 20px;
    border-radius: 6px;
    display: flex;
    gap: 30px;
}

.game-cover-wrapper {
    flex: 1;
    max-width: 400px;
    perspective: 1000px;
}

.game-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.1s;
    border: 8px solid var(--sun-white);
    outline: 1px solid #ddd;
}

.game-meta {
    flex: 2;
}

.game-meta h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.dev-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--sand-beige);
    padding: 5px 10px;
    border-radius: 15px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.game-description {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--soil-brown);
    margin-bottom: 30px;
    border-left: 3px solid var(--moss-green);
    padding-left: 15px;
}

.game-description ul,
.game-description ol {
    padding-left: 0;
    margin-left: 0;
}

.game-description ul li {
    list-style-type: disc;
    list-style-position: inside;
    padding-left: 0;
}

.game-description ol li {
    list-style-type: decimal;
    list-style-position: inside;
    padding-left: 0;
}

.game-description::first-letter {
    font-size: 3rem;
    float: left;
    margin-right: 10px;
    line-height: 1;
    color: var(--forest-green);
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.play-btn {
    background: var(--moss-green);
    color: var(--sun-white);
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 700;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-family: inherit;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s;
}

.play-btn:hover::before {
    left: 120%;
    animation: photosynthesis 1s infinite; /* Simulating shiny effect */
}

.game-modal[hidden] {
    display: none;
}

.game-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.game-modal-content {
    width: min(1100px, 95vw);
    height: min(720px, 95vh);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.game-modal-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 12px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.game-modal-close {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.game-iframe {
    width: 100%;
    height: calc(100% - 56px);
    border: 0;
    display: block;
    background: #000;
}

/* Tags/Category Page */
.seed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.seed-packet {
    background: var(--sun-white);
    border: 1px solid var(--forest-green);
    border-radius: var(--border-radius-std);
    padding: 15px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.seed-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #eee;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.seed-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.new-game-thumb {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 5px;
}

@keyframes imagePlaceholderPulse {
    0% { filter: brightness(0.97); }
    50% { filter: brightness(1.03); }
    100% { filter: brightness(0.97); }
}

.img-placeholder {
    background: linear-gradient(135deg, #efe8dc 0%, #e4dccf 50%, #efe8dc 100%);
    background-size: 200% 200%;
    animation: imagePlaceholderPulse 1.8s ease-in-out infinite;
}

.seed-title {
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seed-packet::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to top, rgba(127, 176, 105, 0.2), transparent);
    transition: height 0.3s ease;
}

.seed-packet:hover {
    transform: rotate(-3deg) scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    z-index: 10;
}

/* Mobile Adaptation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--sun-white);
    border-top: 1px solid var(--forest-green);
    padding: 10px 0;
    z-index: 200;
}

.mobile-nav ul {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: flex-end;
    width: 100%;
    padding: 0 6px;
    box-sizing: border-box;
}

.mobile-nav li {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-width: 0;
}

.mobile-nav li:nth-child(3) {
    align-items: center;
}

.mobile-nav a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 100%;
    font-size: 0.7rem;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
}

.mobile-nav a.active:not(.center-btn) {
    color: var(--forest-green);
    font-weight: 700;
}

.mobile-nav .center-btn {
    transform: translateY(-20px);
    background: var(--sunflower-yellow);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    border: 2px solid var(--forest-green);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    opacity: 0.85;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.mobile-nav .center-btn span:last-child {
    display: none;
}

.mobile-nav .center-btn.active {
    opacity: 1;
    background: var(--clay-orange);
    color: var(--sun-white);
    transform: translateY(-22px) scale(1.06);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        padding-bottom: 0;
    }

    .container {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        padding-left: 12px;
        padding-right: 12px;
        overflow-x: hidden;
    }

    .container-box,
    main {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        display: block;
    }

    footer {
        padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    }
    
    .two-col-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
    }

    .latest-cultivation,
    .new-games-grid,
    .new-game-card,
    .new-game-card a {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .new-games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .new-game-thumb {
        width: 100%;
        max-width: 100%;
    }
    
    /* Mobile Sidebar - Greenhouse Door Style */
    aside {
        position: fixed;
        top: 0;
        left: -280px; /* Hidden off-screen */
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
        overflow-y: auto;
    }
    
    aside.open {
        left: 0;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
    
    .mobile-filter-btn {
        display: block;
        width: 100%;
        padding: 10px;
        background: var(--moss-green);
        color: white;
        text-align: center;
        border-radius: 8px;
        margin-bottom: 15px;
        font-family: var(--font-mono);
        cursor: pointer;
    }
    .seed-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .header-inner nav {
        display: none; /* Hide desktop nav */
    }
    
    .mobile-nav {
        display: block;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }
    
    .detail-inner-border {
        flex-direction: column;
    }

    .game-meta h1 {
        font-size: 1.45rem;
        line-height: 1.25;
    }

    .game-modal {
        padding: 0;
    }

    .game-modal-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .game-modal-header {
        height: calc(56px + env(safe-area-inset-top, 0px));
        padding-top: env(safe-area-inset-top, 0px);
    }

    .game-iframe {
        height: calc(100% - (56px + env(safe-area-inset-top, 0px)));
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-search-form {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .hero-search-form .hero-search-input {
        flex: 1 1 auto !important;
        min-width: 0;
        width: auto;
        height: 42px;
        line-height: 42px;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .hero-search-form .hero-search-btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 96px;
        max-width: none;
        padding-inline: 18px !important;
        height: 42px;
        line-height: 42px;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        white-space: nowrap;
    }
    
    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Unified single-line truncation for game titles in lists */
.game-title,
.title-game,
.title-similar-game,
.card-title,
.sidebar-game-title,
.recommended-name,
.new-game-title {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-info,
.container-game-info,
.sidebar-game-info,
.card-content,
.recommended-info,
.game-meta {
  min-width: 0;
}

/* Unified star rating render */
.game-star {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.85rem;
    color: #ffd700;
    min-height: 1.1em;
}

/* Game lists: stars on their own row (not inline with tags/title) */
.game-card .game-info .game-star,
.new-game-card .game-star,
.seed-packet .game-star {
    display: flex;
    width: 100%;
    align-items: center;
}

.new-game-card .game-star {
    justify-content: center;
}

.game-star .star-icon,
.game-star .star-full,
.game-star .star-empty,
.game-star .fa,
.game-star .fas,
.game-star .far {
    color: inherit;
}

.game-star .star-placeholder {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 215, 0, 0.55);
    letter-spacing: 1px;
    white-space: nowrap;
    animation: starPlaceholderPulse 1.1s ease-in-out infinite;
}

@keyframes starPlaceholderPulse {
    0% { opacity: 0.45; }
    50% { opacity: 0.95; }
    100% { opacity: 0.45; }
}

/* Match rendered star_html structure */
.game-star .star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: inherit;
    color: inherit;
    line-height: 1;
}

.game-star .star-rating .star-icon,
.game-star .star-rating .star-full,
.game-star .star-rating .star-empty,
.game-star .star-rating .fa,
.game-star .star-rating .fas,
.game-star .star-rating .far,
.game-star .star-rating i {
    color: inherit;
    font-size: 0.95em;
}

.game-star .star-rating .star-icon::before,
.game-star .star-rating .star-full::before,
.game-star .star-rating .fa-star::before {
    content: "★";
}

.game-star .star-rating .star-empty::before,
.game-star .star-rating .fa-star-o::before,
.game-star .star-rating .far.fa-star::before,
.game-star .star-rating .fa-regular.fa-star::before {
    content: "☆";
}
