/* top.css */
.top-page-layout {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    padding-bottom: 60px;
}

.side-promo-container {
    width: 160px;
    flex-shrink: 0;
    display: none;
}
@media (min-width: 1280px) {
    .side-promo-container {
        display: block;
    }
}

.main-content-container {
    flex-grow: 1;
    max-width: 1100px; /* Adjust central content max width to allow side ads */
    min-width: 0;
}

.top-main-columns {
    display: block;
}

/* SECTION STYLES */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rime);
    color: #fff;
    text-transform: uppercase;
}

section {
    margin-bottom: 50px;
}

/* SCROLLING GAME LISTS */
.game-list {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    padding-top: 10px;
    margin-bottom: 0;
    position: relative;
    
    /* Match scrollbar with other pages */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

.game-list::-webkit-scrollbar {
    height: 6px;
}
.game-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}
.game-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* CARDS */
.game-card {
    flex: 0 0 240px; /* fixed width for cards */
}

.game-card a {
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    color: #e0e0e0;
    transition: transform 0.3s ease;
    height: 100%;
    position: relative;
}
.game-card a:hover {
    transform: translateY(-8px);
    background: transparent;
    box-shadow: none;
}

.game-image {
    width: 100%;
    height: 135px;
    margin-right: 0;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}
.game-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.4); /* 背景に少し濃い色を敷いておく */
    transition: transform 0.4s ease;
}
.game-card a:hover .game-image img {
    transform: scale(1.08); /* Zoom effect on hover */
}

/* G2A tags/badges style overlay */
.hot-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(219, 0, 77, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-top: 0;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.game-info {
    padding: 0 4px;
}
.game-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
    line-height: 1.4;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal;
    word-break: break-all;
    height: 2.8em; /* 1.4 line-height * 2 lines = 2.8em */
}
.game-info p {
    font-size: 0.85rem;
    color: var(--gray);
}
.release-date {
    color: var(--blue) !important;
    font-weight: 600;
}

/* SEARCH MENU GRID */
.search-menu-section {
    margin-bottom: 40px;
}

.search-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.search-category-card {
    background: var(--frame-color-sub);
    border-radius: 2px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    margin: 10px auto;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--rime);
}

.category-header i {
    font-size: 1.2rem;
}

.category-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-btn,
.category-btn:visited {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #ccc;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-btn:hover {
    background: var(--rime);
    color: #000;
}

.quick-search-form {
    display: flex;
    position: relative;
    margin-bottom: 15px;
}

.quick-search-input {
    width: 100%;
    background: #fff;
    border: none;
    padding: 10px 45px 10px 15px;
    font-size: .9rem;
    border-radius: 2px;
    color: #333;
    transition: ease all .4s;
}

.quick-search-input:focus {
    outline: none;
    box-shadow: inset 0 0 6px 2px #4eaaeb8f;
}

.quick-search-submit {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    height: 100%;
    padding: 5px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.quick-search-submit img {
    width: 20px;
    height: 20px;
}

.quick-search-submit:hover {
    opacity: 0.7;
}

.suggested-searches {
    font-size: 0.8rem;
    color: #888;
}

.suggested-searches a {
    color: #aaa;
    text-decoration: none;
}

.suggested-searches a:hover {
    color: var(--rime);
    text-decoration: underline;
}


/* Vertical Promo (sidebars) */
.vertical-promo {
    height: 600px;
    position: sticky;
    top: 20px;
}

/* ---------------------------------
   MOBILE RESPONSIVE TWEAKS 
--------------------------------- */
@media (max-width: 768px) {
    .top-page-layout {
        gap: 10px;
        margin-top: 20px;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .game-card {
        flex: 0 0 160px; /* スマホ画面でカードが大きすぎないように */
    }
    .game-image {
        height: 100px;
    }
    .game-info h3 {
        font-size: 0.95rem;
    }
    
    .search-menu-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .search-category-card {
        padding: 10px;
    }
}

/* ============================================================
 *   ゲームリクエスト枠
 * ============================================================ */
.latest-requests-section {
    margin-bottom: 40px;
}
.latest-requests-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--rime);
    padding-bottom: 10px;
}
.latest-requests-section .section-header .section-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}
.latest-requests-section .section-header .btn-view-all {
    font-size: 0.85rem;
    padding: 6px 16px;
    background: var(--rime);
    color: #111;
    border: none;
    border-radius: 2px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}
.latest-requests-section .section-header .btn-view-all:hover {
    opacity: .7;
}
