/* ========================================
   Home Page Specific Styles
   首頁專屬樣式
   ========================================
   僅包含首頁特有的樣式，共用樣式已移至 style-integrated.css
   ======================================== */

/* ========================================
   Hero Search Section
   尺寸: 1200 x 278
   Padding: 40 60 40 60
   間隔: 32px
   ======================================== */
.hero-search-section {
    width: 100%;
    max-width: 1200px;
    height: 278px;
    margin: 0 auto;
    padding: 40px 60px;
    background-color: var(--bg-white);
    background-image: '{{asset 'screen_banner_category.png'}}';
    background-size: 125%;
    background-position: top -20px left;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ========================================
   Title Block
   尺寸: 497 x 116
   ======================================== */
.title-block {
    width: 497px;
    height: 116px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 900;
    font-size: 40px;
    line-height: 100%;
    letter-spacing: 0px;
    text-align: left;
    color: #FF6400;
    margin: 0 0 16px 0;
}

.sub-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 30px;
    letter-spacing: 0px;
    text-align: left;
    color: #FFFFFF;
    margin: 0;
}

/* ========================================
   熱門問題區塊
   尺寸: 1200 x 516
   Padding: 40 60 40 60
   Gap: 32px
   ======================================== */
.hot-questions-section {
    width: 100%;
    max-width: 1200px;
    min-height: 516px;
    margin: 0 auto;
    padding: 40px 60px;
    background-color: var(--bg-white);
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.hot-questions-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ========================================
   熱門問題標題區塊
   尺寸: 440 x 76, gap 8
   ======================================== */
.hot-questions-header {
    width: 440px;
    height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.hot-questions-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 900;
    font-size: 32px;
    line-height: 100%;
    letter-spacing: 0px;
    text-align: left;
    color: #FF6400;
    margin: 0;
}

.hot-questions-subtitle {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 30px;
    letter-spacing: 0px;
    text-align: left;
    color: #333333;
    margin: 0;
}

/* ========================================
   熱門問題列表
   每個項目: 1080 x 60, padding 16 20, gap 20
   ======================================== */
.hot-questions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hot-question-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1080px;
    height: 60px;
    padding: 16px 20px;
    background-color: #FAFAFA;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 20px;
}

.hot-question-item:hover {
    background-color: #FFF5F0;
    border-color: #FF6400;
    box-shadow: 0 2px 8px rgba(255, 100, 0, 0.1);
    text-decoration: none;
}

.hot-question-item-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 28px;
    letter-spacing: 0px;
    color: #1A1A1A;
    flex: 1;
}

.hot-question-item:hover .hot-question-item-title {
    color: #FF6400;
}

.hot-question-item-arrow {
    width: 20px;
    height: 20px;
    color: #87929D;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.hot-question-item:hover .hot-question-item-arrow {
    color: #FF6400;
    transform: translateX(4px);
}

/* ========================================
   遊戲分類區塊
   ======================================== */
.games-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px 60px 60px;
    background-color: var(--bg-white);
}

.games-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 60px 50px;
    justify-content: flex-start;
    width: 100%;
}

/* ========================================
   遊戲卡片 - 版本 B
   尺寸: 232 x 322
   左上角三角形裁切: 50x50
   錨點: 右下角，往左上放大
   ======================================== */
.game-card {
    position: relative;
    width: 232px;
    height: 322px;
    border-radius: 12px;
    overflow: visible;
    clip-path: inset(-100px -0px 0px -100px);
    background-color: transparent;
    text-decoration: none;
    display: block;
}

/* 圖片容器 - 錨點右下角往左上放大 */
.game-card-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 232px;
    height: 322px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #FFFFFF;
    transform-origin: bottom right;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* 左上角 50x50 三角形裁切 */
    clip-path: polygon(50px 0, 100% 0, 100% 100%, 0 100%, 0 50px);
}

.game-card:hover .game-card-image-wrapper {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

/* 背景圖片 */
.game-card-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
}

/* 角色圖片 - 右側與底部限制，在 wrapper 外面 */
.game-card-character {
    position: absolute;
    bottom: 0;
    right: 0;
    object-fit: contain;
    object-position: bottom right;
    transform-origin: bottom right;
    transition: transform 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.game-card:hover .game-card-character {
    transform: scale(1.10);
}

/* 漸層區塊 - 錨點右下角
   尺寸: 232 x 113
   Padding: 20 24 20 24
*/
.game-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 232px;
    height: 113px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    border-radius: 0 0 12px 12px;
    transform-origin: bottom right;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.game-card:hover .game-card-overlay {
    transform: scale(1.05);
}

/* Category 文字區 - 不動
   尺寸: 184 x 48
   文字靠左
*/
.game-card-text {
    position: absolute;
    bottom: 20px;
    left: 24px;
    width: 184px;
    height: 48px;
    z-index: 2;
    pointer-events: none;
}

.game-card-title {
    font-family: 'Roboto', 'Noto Sans TC', sans-serif;
    font-weight: 800;
    font-size: 32px;
    line-height: 48px;
    letter-spacing: 0px;
    color: #FFFFFF;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   Responsive Design - 響應式設計
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .hero-search-section {
        height: auto;
        min-height: 240px;
        padding: 32px 40px;
        flex-direction: column;
        align-items: flex-start;
        background-size: cover;
        background-position: center center;
    }

    .title-block {
        width: 100%;
        height: auto;
    }

    .main-title {
        font-size: 32px;
    }

    .sub-title {
        font-size: 18px;
        line-height: 28px;
    }

    .search-input-wrapper {
        width: 100%;
        max-width: 400px;
    }

    .hot-questions-section {
        padding: 32px 40px;
    }

    .hot-questions-header {
        width: 100%;
        height: auto;
    }

    .games-section {
        padding: 32px 40px;
    }

    .games-grid {
        gap: 40px 32px;
        justify-content: center;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .hero-search-section {
        height: auto;
        min-height: 220px;
        padding: 24px 20px;
        background-size: cover;
        background-position: center center;
    }

    .main-title {
        font-size: 28px;
    }

    .sub-title {
        font-size: 16px;
        line-height: 24px;
    }

    .hot-questions-section {
        padding: 24px 20px;
        min-height: auto;
    }

    .hot-questions-title {
        font-size: 24px;
    }

    .hot-questions-subtitle {
        font-size: 16px;
        line-height: 24px;
    }

    .hot-question-item {
        height: auto;
        min-height: 56px;
        padding: 14px 16px;
    }

    .hot-question-item-title {
        font-size: 15px;
        line-height: 24px;
    }

    .games-section {
        padding: 24px 20px;
    }

    .games-grid {
        gap: 32px 24px;
        justify-content: center;
    }

    /* Game Card - 保持原始尺寸但調整 clip-path */
    .game-card {
        width: 200px;
        height: 278px;
    }

    .game-card-image-wrapper {
        width: 200px;
        height: 278px;
        clip-path: polygon(40px 0, 100% 0, 100% 100%, 0 100%, 0 40px);
    }

    .game-card-overlay {
        width: 200px;
        height: 98px;
    }

    .game-card-text {
        bottom: 16px;
        left: 20px;
        width: 160px;
        height: 42px;
    }

    .game-card-title {
        font-size: 28px;
        line-height: 42px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .hero-search-section {
        height: auto;
        min-height: 200px;
        padding: 20px 16px;
        background-size: cover;
        background-position: center center;
    }

    .main-title {
        font-size: 24px;
    }

    .sub-title {
        font-size: 14px;
        line-height: 22px;
    }

    .hot-questions-section {
        padding: 20px 16px;
    }

    .hot-questions-header {
        gap: 6px;
    }

    .hot-questions-title {
        font-size: 22px;
    }

    .hot-questions-subtitle {
        font-size: 14px;
        line-height: 22px;
    }

    .hot-questions-list {
        gap: 12px;
    }

    .hot-question-item {
        padding: 14px 16px;
        border-radius: 8px;
    }

    .hot-question-item-title {
        font-size: 15px;
    }

    .hot-question-item-arrow {
        width: 20px;
        height: 20px;
    }

    .games-section {
        padding: 20px 16px;
    }

    .games-grid {
        gap: 24px 16px;
        justify-content: center;
    }

    /* Game Card - 縮小尺寸適應小螢幕 */
    .game-card {
        width: 160px;
        height: 222px;
    }

    .game-card-image-wrapper {
        width: 160px;
        height: 222px;
        clip-path: polygon(35px 0, 100% 0, 100% 100%, 0 100%, 0 35px);
    }

    .game-card-overlay {
        width: 160px;
        height: 80px;
    }

    .game-card-text {
        bottom: 14px;
        left: 16px;
        width: 128px;
        height: 36px;
    }

    .game-card-title {
        font-size: 24px;
        line-height: 36px;
    }
}