
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(145deg, #f9f1e0 0%, #f5e6ce 50%, #e9d5b5 100%);
    color: #4a3b2c;
    line-height: 1.4;
    min-height: 100vh;
}

/* decorative floating circles (garden bubbles) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(255, 210, 150, 0.3) 0%, rgba(255, 230, 190, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.garden-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 2rem 1.5rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* header + tagline */
.garden-header {
    text-align: center;
    margin-bottom: 2rem;
}

.garden-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(125deg, #f5a97f, #e26d5c, #b05e3a);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.05);
}

.garden-header p {
    font-size: 1rem;
    background: rgba(255, 245, 225, 0.7);
    backdrop-filter: blur(4px);
    display: inline-block;
    padding: 0.3rem 1.2rem;
    border-radius: 40px;
    margin-top: 0.5rem;
    color: #a56b3e;
}

/* central search box (large and prominent) */
.garden-search-area {
    width: 100%;
    max-width: 600px;
    margin: 1rem auto 2rem;
    position: relative;
}

.garden-search-area i {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: #f09d4c;
    font-size: 1.3rem;
    z-index: 1;
}

#gardenSearchInput {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    background: rgba(255, 253, 245, 0.95);
    border: 2px solid #ffcf9a;
    border-radius: 60px;
    color: #4a3b2c;
    font-family: 'Quicksand', sans-serif;
    transition: 0.2s;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
}

#gardenSearchInput:focus {
    outline: none;
    border-color: #f5a97f;
    box-shadow: 0 0 0 4px rgba(245, 169, 127, 0.3);
}

/* circular category grid (2x3 or responsive) */
.garden-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0 2.5rem;
}

.cat-garden-btn {
    background: #fff9f0;
    border-radius: 100px;
    padding: 0.8rem 1.8rem;
    font-weight: 700;
    font-size: 1rem;
    color: #7a583b;
    text-decoration: none;
    border: 2px solid #ffdaa5;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.02);
}

.cat-garden-btn i {
    font-size: 1.1rem;
}

.cat-garden-btn.active {
    background: linear-gradient(115deg, #f5a97f, #e26d5c);
    border-color: #ffffff;
    color: white;
    box-shadow: 0 8px 18px rgba(226, 109, 92, 0.3);
}

.cat-garden-btn:hover:not(.active) {
    transform: translateY(-5px);
    background: #ffefdb;
    border-color: #f5a97f;
}

/* stats row (playful) */
.garden-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 250, 235, 0.8);
    backdrop-filter: blur(4px);
    padding: 0.3rem 1.2rem;
    border-radius: 60px;
    font-size: 0.9rem;
    color: #a56b3e;
}

.garden-stats span {
    font-weight: 800;
    color: #e26d5c;
    font-size: 1.1rem;
}

/* game grid - garden card style (rounded, soft shadows) */
.garden-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    width: 100%;
}

.garden-card {
    background: rgba(255, 252, 240, 0.9);
    backdrop-filter: blur(2px);
    border-radius: 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #ffddb0;
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.1);
}

.garden-card:hover {
    transform: translateY(-12px);
    border-color: #f5a97f;
    box-shadow: 0 22px 32px -12px rgba(226, 109, 92, 0.3);
    background: #ffffff;
}

.garden-card-img {
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: #fbead5;
    border-bottom: 3px solid #ffcf9a;
}

.garden-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.garden-card:hover .garden-card-img img {
    transform: scale(1.06);
}

.garden-card-info {
    padding: 1.2rem 1.2rem 1.3rem;
}

.garden-card-title {
    font-size: 1.35rem;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.garden-card-title a {
    color: #5e3e2b;
    text-decoration: none;
    transition: color 0.2s;
}

.garden-card-title a:hover {
    color: #e26d5c;
}

.garden-card-cat {
    font-size: 0.7rem;
    background: #ffefdb;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-weight: 700;
    color: #c27e55;
}

.hot-garden-badge {
    background: #ff8a6c;
    font-size: 0.6rem;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    margin-left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: white;
}

/* ========== 限制游戏描述：最多2行，超出省略 ========== */
.garden-card-desc {
    font-size: 0.82rem;
    color: #816e58;
    margin: 0.6rem 0 1rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.garden-play-link {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #e26d5c;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: 0.2s;
}

.garden-card:hover .garden-play-link {
    gap: 12px;
    color: #f5a97f;
}

.no-results-garden {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 245, 225, 0.8);
    border-radius: 2rem;
    grid-column: 1 / -1;
    border: 1px dashed #f5a97f;
    color: #a56b3e;
}

/* 500+ words description (garden story) */
.garden-description {
    margin: 1.5rem 0 2rem;
    padding: 2rem 2.2rem;
    background: rgba(255, 250, 235, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 2rem;
    border-left: 10px solid #f5a97f;
    border-right: 1px solid #ffddb0;
}

.garden-description h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #c96f48;
    margin-bottom: 1rem;
}

.garden-description p {
    margin-bottom: 1rem;
    line-height: 1.65;
    color: #6e543e;
}

.garden-description strong {
    color: #e26d5c;
}

.garden-footer {
    text-align: center;
    padding: 1rem 0 0.5rem;
    border-top: 1px solid #ffddb0;
    font-size: 0.75rem;
    color: #a77f5e;
}

.garden-footer a {
    color: #e26d5c;
    text-decoration: none;
}

/* back to top - blooming flower button */
.garden-btt {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: #f5a97f;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
    z-index: 999;
    color: white;
    box-shadow: 0 4px 12px rgba(245, 169, 127, 0.4);
    border: none;
}

.garden-btt.show {
    opacity: 1;
    visibility: visible;
}

.garden-btt:hover {
    background: #e26d5c;
    transform: scale(1.05) rotate(5deg);
}
a {
    text-decoration: none;
}

/* ========== 手机端：一行显示3个卡片 ========== */
@media (max-width: 768px) {
    .garden-container {
        padding: 1rem;
    }

    .garden-header h1 {
        font-size: 2.4rem;
    }

    .garden-categories {
        gap: 0.8rem;
    }

    .cat-garden-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }

    .garden-btt {
        left: 1rem;
        bottom: 1rem;
    }

    /* 手机端强制一行3个卡片 */
    .garden-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .garden-card-img {
        height: 120px;
    }

    .garden-card-info {
        padding: 0.8rem 0.7rem 1rem;
    }

    .garden-card-title {
        font-size: 1rem;
        gap: 4px;
    }

    .garden-card-title a {
        font-size: 0.9rem;
    }

    .garden-card-cat {
        font-size: 0.55rem;
        padding: 0.1rem 0.5rem;
    }

    .hot-garden-badge {
        font-size: 0.5rem;
        padding: 0.1rem 0.4rem;
    }

    .garden-card-desc {
        font-size: 0.7rem;
        margin: 0.4rem 0 0.7rem;
        -webkit-line-clamp: 2; /* 手机端也限制2行 */
    }

    .garden-play-link {
        font-size: 0.6rem;
    }
}

/* 更小的手机（宽度≤480px）保持3列，略微压缩 */
@media (max-width: 480px) {
    .garden-grid {
        gap: 0.8rem;
    }

    .garden-card-img {
        height: 100px;
    }

    .garden-card-title {
        font-size: 0.85rem;
    }

    .garden-card-title a {
        font-size: 0.8rem;
    }

    .garden-card-desc {
        font-size: 0.65rem;
        -webkit-line-clamp: 2;
    }
}