/* ===========================================================
   Index Page — Warm Sunset Theme
   =========================================================== */

/* ─────── Recommend Grid ────── */
.pigkoz-recommend-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 12px;
    padding: 16px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #f1e4d1;
    box-shadow: 0 1px 2px rgba(96, 64, 30, .05), 0 6px 18px rgba(96, 64, 30, .06);
    position: relative;
    overflow: hidden;
}

.pigkoz-recommend-content-hot {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 16px 12px 12px;
    padding: 18px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #f1e4d1;
    box-shadow: 0 1px 2px rgba(96, 64, 30, .05), 0 10px 26px rgba(96, 64, 30, .07);
    position: relative;
    overflow: hidden;
}
.pigkoz-recommend-content-hot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffb830, #ff7a45, #ff5d8f, #ffb830);
    background-size: 220% 100%;
    animation: gradientFlow 5s linear infinite;
}

@keyframes gradientFlow {
    0%   { background-position: 0% 0%; }
    100% { background-position: 220% 0%; }
}

.pigkoz-recommend-content img,
.pigkoz-recommend-content-hot img {
    width: 100%;
}

/* ────── Category Grid Container ─────── */
.category-grid-container {
    margin: 24px 12px;
    padding: 26px 22px 22px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #f1e4d1;
    box-shadow: 0 1px 2px rgba(96, 64, 30, .05), 0 10px 26px rgba(96, 64, 30, .07);
    position: relative;
    overflow: hidden;
}
.category-grid-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffb830, #ff7a45, #ff5d8f);
}

.category-grid-container h2 {
    color: #46362a;
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    font-weight: 800;
    text-align: center;
    letter-spacing: .3px;
    position: relative;
    z-index: 1;
}
.category-grid-container h2::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    background: linear-gradient(90deg, #ff7a45, #ff5d8f);
    margin: 8px auto 0;
    border-radius: 3px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 0;
    position: relative;
    z-index: 1;
}

.category-item {
    position: relative;
    height: 104px;
    background: #fff9f1;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    overflow: hidden;
    border: 1px solid #f1e4d1;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(96, 64, 30, .05);
}
.category-item:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 122, 69, .4);
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(255, 122, 69, .16);
}

/* Per-genre icon chips — each genre gets its own candy gradient */
.category-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(96, 64, 30, .16), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: all .3s ease;
}
.category-item:nth-child(1) .category-icon { background: linear-gradient(135deg, #5fb2ff, #2d7df6); }
.category-item:nth-child(2) .category-icon { background: linear-gradient(135deg, #ff9dbb, #ff5d8f); }
.category-item:nth-child(3) .category-icon { background: linear-gradient(135deg, #ffc94d, #ff8a3d); }
.category-item:nth-child(4) .category-icon { background: linear-gradient(135deg, #4ade94, #0ea573); }
.category-item:nth-child(5) .category-icon { background: linear-gradient(135deg, #b39af7, #7c5cf0); }
.category-item:nth-child(6) .category-icon { background: linear-gradient(135deg, #45cfdd, #149cb5); }
.category-item:nth-child(7) .category-icon { background: linear-gradient(135deg, #ffa06b, #ef5f28); }
.category-item:nth-child(8) .category-icon { background: linear-gradient(135deg, #f79892, #e84f6b); }

.category-item:hover .category-icon {
    transform: scale(1.12) rotate(-6deg);
    box-shadow: 0 8px 18px rgba(96, 64, 30, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.category-icon svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .15));
}

.category-name {
    font-size: .82rem;
    font-weight: 700;
    color: #8d7a68;
    text-align: center;
    z-index: 2;
    line-height: 1.3;
    transition: color .25s ease;
}
.category-item:hover .category-name {
    color: #ef5f28;
}

/* ─────── SEO Content Section ────── */
.seo-content-section {
    background: #ffffff;
    padding: 32px 22px;
    margin: 28px 12px;
    border-radius: 20px;
    border: 1px solid #f1e4d1;
    box-shadow: 0 1px 2px rgba(96, 64, 30, .05), 0 10px 26px rgba(96, 64, 30, .07);
    position: relative;
    overflow: hidden;
}

.seo-content-section h2 {
    color: #46362a;
    text-align: center;
    font-size: 1.4rem;
    margin: 0 0 24px;
    font-weight: 800;
    letter-spacing: -.2px;
    position: relative;
}
.seo-content-section h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #ff7a45, #ff5d8f);
    margin: 10px auto 0;
    border-radius: 3px;
}

.seo-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.benefit-item {
    background: #fff9f1;
    padding: 20px 18px;
    border-radius: 14px;
    border: 1px solid #f1e4d1;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}
.benefit-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #ffb830, #ff5d8f);
    border-radius: 3px;
    transition: height .3s ease;
}
.benefit-item:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 122, 69, .35);
    background: #fffdf9;
    box-shadow: 0 10px 22px rgba(255, 122, 69, .12);
}
.benefit-item:hover::before {
    height: 100%;
}
.benefit-item h3 {
    color: #ef5f28;
    font-size: 1.02rem;
    margin: 0 0 8px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.benefit-item h3::before {
    content: '✦';
    color: #ff5d8f;
    font-size: .9rem;
}
.benefit-item p {
    color: #8d7a68;
    line-height: 1.7;
    font-size: .88rem;
    margin: 0;
}

/* ─────── Game Types Section ─────── */
.game-types-section {
    background: #ffffff;
    padding: 32px 22px;
    margin: 28px 12px;
    border-radius: 20px;
    border: 1px solid #f1e4d1;
    box-shadow: 0 1px 2px rgba(96, 64, 30, .05), 0 10px 26px rgba(96, 64, 30, .07);
    position: relative;
    overflow: hidden;
}

.game-types-section h2 {
    color: #46362a;
    text-align: center;
    font-size: 1.4rem;
    margin: 0 0 24px;
    font-weight: 800;
    letter-spacing: -.2px;
    position: relative;
}
.game-types-section h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #ff7a45, #ff5d8f);
    margin: 10px auto 0;
    border-radius: 3px;
}

.game-type-info h3 {
    color: #ef5f28;
    font-size: 1.08rem;
    margin: 22px 0 8px 0;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.game-type-info h3::before {
    content: '◆';
    color: #ff5d8f;
    font-size: .7rem;
}
.game-type-info h3:first-of-type {
    margin-top: 6px;
}
.game-type-info p {
    color: #8d7a68;
    line-height: 1.75;
    font-size: .92rem;
    margin: 0 0 12px;
    padding-left: 18px;
}

/* ─────── Category Subtitle ────── */
.category-subtitle {
    color: #8d7a68;
    font-size: 1rem;
    text-align: center;
    margin: 14px 0 28px 0;
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ─────── Recommend Item (List style) ─────── */
.recommend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-self: center;
    margin: 14px 0;
    position: relative;
}
.recommend-item a {
    align-items: center;
    justify-self: center;
    text-decoration: none;
    width: 100%;
}
.recommend-item img {
    width: 100%;
    object-fit: contain;
    border-radius: 12px;
}
.recommend-item-info {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    flex-wrap: wrap;
    position: relative;
}
.recommend-item-info h3 {
    color: #46362a;
    font-size: .9rem;
    margin: 0 0 4px;
    font-weight: 800;
}
.recommend-item-info p {
    color: #b7a592;
    font-size: .78rem;
    margin: 4px 0 0;
    font-weight: 500;
}

.recommend-item-btn {
    display: flex;
    width: 100%;
    height: 32px;
    background: linear-gradient(135deg, #ff7a45 0%, #ff5d8f 100%);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(255, 122, 69, .30), inset 0 -2px 0 rgba(146, 46, 20, .15), inset 0 1px 0 rgba(255, 255, 255, .3);
    transition: all .25s ease;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.recommend-item-btn a {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 800;
    font-size: .85rem;
    text-decoration: none;
    letter-spacing: .3px;
    text-shadow: 0 1px 2px rgba(146, 46, 20, .25);
}
.recommend-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(255, 122, 69, .40), inset 0 -2px 0 rgba(146, 46, 20, .15), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.recommend-item-btn img {
    width: 28px;
    height: 16px;
}

/* ─────── Responsive ─────── */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .category-item {
        height: 92px;
        border-radius: 14px;
    }
    .category-icon {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }
    .category-icon svg {
        width: 18px;
        height: 18px;
    }
    .category-name {
        font-size: .78rem;
    }
    .seo-benefits {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .category-grid-container {
        padding: 22px 16px 18px;
        margin: 20px 10px;
    }
    .pigkoz-recommend-content,
    .pigkoz-recommend-content-hot {
        gap: 10px;
        padding: 12px;
        margin: 10px;
    }
    .seo-content-section,
    .game-types-section {
        margin: 22px 10px;
        padding: 24px 18px;
    }
    .category-item {
        height: 80px;
    }
    .category-grid-container h2 {
        font-size: 1.1rem;
    }
}
