/* ==========================================
   全域變數與基礎設定
========================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

:root {
    --bg-dark: #0a1026;
    --text-white: #ffffff;
    --accent-pink: #f72f97;
    --btn-text: #0a1026;
    --header-height: 80px;
}

/* ✅ SEO：提供給搜尋引擎與螢幕閱讀器讀取的隱藏文字設定 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Sans TC", "PingFang TC", "Heiti TC", "Microsoft JhengHei", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
    background-color: #f5f5f5;
    overflow-x: hidden;
    padding-top: var(--header-height);
}

/* 嚴格綁定語系字型 */
html:lang(zh) body, html:lang(zh-TW) body {
    font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif !important;
}

html:lang(ja) body, html:lang(jp) body {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif !important;
}

html:lang(en) body {
    font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif !important;
}

/* ==========================================
   1. Header 導覽列設定
========================================== */
header {
    background-color: var(--bg-dark);
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.logo-area {
    display: flex;
    align-items: center;
    padding-left: 30px;
    text-decoration: none;
    color: var(--text-white);
    gap: 12px;
}

.logo-img-container {
    display: flex;
    align-items: center;
}

.logo-img-container img {
    width: auto;
    height: auto;
    max-height: 50px;
    object-fit: contain;
}

.desktop-nav {
    display: flex;
    align-items: stretch;
}

.nav-links {
    display: flex;
    align-items: stretch;
    list-style: none;
}

.nav-links li {
    display: flex;
}

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-size: 15px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-pink);
}

.lang-menu-container {
    position: relative;
    display: flex;
    align-items: stretch;
}

.lang-toggle {
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 25px;
    cursor: pointer;
    font-size: 15px;
    transition: color 0.3s ease;
    background: none;
    border: none;
    font-family: inherit;
}

.lang-icon {
    width: auto;
    height: auto;
    object-fit: contain;
}

.lang-toggle:hover {
    color: var(--accent-pink);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    list-style: none;
}

.lang-menu-container:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
}

.lang-dropdown li a {
    color: var(--text-white);
    text-decoration: none;
    display: block;
    padding: 15px 0;
    text-align: center;
    font-size: 15px;
    transition: color 0.3s ease;
}

.lang-dropdown li a:hover {
    color: var(--accent-pink);
}

.contact-menu-container {
    position: relative;
    display: flex;
    align-items: stretch;
}

.contact-btn {
    background-color: var(--accent-pink);
    color: var(--btn-text);
    display: flex;
    align-items: center;
    padding: 0 35px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    font-size: 15px;
    transition: opacity 0.3s ease;
}

.contact-btn:hover {
    opacity: 0.9;
}

.contact-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    list-style: none;
}

.contact-dropdown.active {
    opacity: 1;
    visibility: visible;
}

.contact-dropdown li a {
    display: flex;
    justify-content: center;
    padding: 15px 0;
    transition: background-color 0.3s ease;
}

.contact-dropdown li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.contact-icon {
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: pixelated;
}

.mobile-controls {
    display: none;
    align-items: center;
    padding-right: 20px;
}

.mobile-lang-container {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-lang-toggle {
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 20px;
    font-size: 16px;
    text-decoration: none;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

.mobile-lang-icon {
    width: auto;
    height: auto;
    object-fit: contain;
}

.mobile-lang-dropdown {
    position: absolute;
    top: 100%;
    right: 20px;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    list-style: none;
    margin-top: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    min-width: 80px;
}

.mobile-lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-lang-dropdown li a {
    color: var(--text-white);
    text-decoration: none;
    display: block;
    padding: 12px 0;
    text-align: center;
    font-size: 15px;
    transition: color 0.3s ease;
}

.mobile-lang-dropdown li a:hover {
    color: var(--accent-pink);
}

.hamburger {
    width: 35px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--accent-pink);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav.active {
    max-height: 500px;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 20px 30px;
    gap: 25px;
}

.mobile-nav-links a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
}

.mobile-nav-links a:hover {
    color: var(--accent-pink);
}

.mobile-contact-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-contact-btn {
    background-color: var(--accent-pink);
    color: var(--btn-text);
    padding: 20px 30px;
    font-weight: bold;
    font-size: 16px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    width: 100%;
    display: block;
}

.mobile-contact-dropdown {
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 30px;
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0;
}

.mobile-contact-dropdown.active {
    max-height: 100px;
    padding: 20px 0;
}

.mobile-contact-dropdown li a {
    display: block;
    padding: 0;
}

.mobile-contact-icon {
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: pixelated;
}

/* ==========================================
   2. Hero Page 主視覺區塊
========================================== */
.hero-section {
    position: relative;
    width: 100%;
    aspect-ratio: 1420 / 580;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-bottom: 6px solid var(--bg-dark);
    background-color: #57d0de;
}

.map-container {
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(72, 1fr);
    grid-template-rows: repeat(30, 1fr);
    gap: 0;
    background-color: #57d0de;
    overflow: hidden;
}

.grid-cell {
    width: 100%;
    height: 100%;
    position: relative;
}

.grid-cell.land {
    background-color: transparent !important;
    z-index: 3;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                z-index 0s 0.2s;
}

.grid-cell.land::before {
    content: '';
    position: absolute;
    top: -0.5px;
    left: -1px;
    width: calc(100% + 2px);
    height: calc(133.33% + 1px);
    background-size: 100% 100% !important;
    background-position: top center !important;
    background-repeat: no-repeat !important;
    image-rendering: pixelated;
    z-index: -1;
    transition: height 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grid-cell.land.bg-1::before {
    background-image: url('./images/Hero_TerrainTile_1.png') !important;
}

.grid-cell.land.bg-2::before {
    background-image: url('./images/Hero_TerrainTile_2.png') !important;
}

.grid-cell.land.forest::before {
    background-image: url('./images/Hero_TerrainTile_4.png') !important;
}

.grid-cell.land.house::before {
    background-image: url('./images/Hero_TerrainTile_6.png') !important;
}

.grid-cell.land.house.spawn {
    animation: house-spawn-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
}

@keyframes house-spawn-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3) translateY(-10px); }
    100% { transform: scale(1); }
}

.grid-cell.land:hover {
    transform: translateY(-8px) scale(1.02);
    z-index: 10;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                z-index 0s 0s;
}

.grid-cell.land:hover::before {
    height: calc(124.69% + 1px);
}

.grid-cell.land::after {
    display: none !important;
}

.grid-cell.water {
    z-index: 1;
}

.grid-cell.water.deep {
    background-color: #57d0de !important;
    outline: 1px solid #57d0de;
}

.grid-cell.water.deep.wave {
    background-image: url('./images/Hero_TerrainTile_5.png') !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: pixelated;
}

.grid-cell.water.coast {
    background-color: #60e6e7 !important;
    outline: 1px solid #60e6e7;
}

.grid-cell.water.shore {
    background-color: #60e6e7 !important;
    outline: 1px solid #60e6e7;
    z-index: 2;
}

.grid-cell.water.shore::before {
    content: '';
    position: absolute;
    top: 33.33%;
    left: -1px;
    width: calc(100% + 2px);
    height: 100%;
    background-image: url('./images/Hero_TerrainTile_3.png') !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: pixelated;
    z-index: 1;
}

.cloud-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 40;
}
.cloud {
    position: absolute;
    left: 100%;
    animation: drift linear infinite;
    object-fit: contain;
    image-rendering: pixelated;
}

.cloud.size-lg { width: 120px; height: auto; }
.cloud.size-sm { width: 180px; height: auto; }

@keyframes drift {
    from { left: 100%; transform: translateX(0); }
    to { left: -200px; transform: translateX(-150px); }
}

.hero-text-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30;
    padding: 0 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.hero-text-container img {
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

/* ==========================================
   3. 內容 Section 共用架構
========================================== */
.strength-section {
    width: 100%;
    background-color: #e2e2e2;
    position: relative;
    overflow: hidden;
    scroll-margin-top: var(--header-height);
}

.strength-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.strength-bg-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.parallax-deco {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    /* 移除強制寬高，以原始尺寸呈現 */
    pointer-events: none;
    image-rendering: pixelated;
    will-change: transform;
}

.deco-bottom {
    z-index: 0;
}

.deco-top {
    z-index: 0;
}

.retro-header-bar {
    width: 100%;
    display: flex;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    background-image: url("./images/bar_retro.png");
    background-repeat: repeat-x;
    background-position: left top;
    min-height: 58px;
}

.header-left-block {
    width: 110px;
    height: 138px;
    flex-shrink: 0;
    background-image: url("./images/bar_deco_header_2.png");
    background-size: contain;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    position: relative;
    z-index: 2;
}

.header-stairs {
    position: absolute;
    left: 108px;
    top: 58px;
    width: 385px;
    height: 80px;
    background-image: url("./images/bar_deco_header_1.png");
    background-size: contain;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    z-index: 1;
}

.retro-footer-bar {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    margin-top: 55px;
    position: relative;
    z-index: 1;
    background-image: url("./images/bar_retro.png");
    background-repeat: repeat-x;
    background-position: left bottom;
    min-height: 58px;
}

.footer-right-block {
    width: 110px;
    height: 138px;
    flex-shrink: 0;
    background-image: url("./images/bar_deco_footer_2.png");
    background-size: contain;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    position: relative;
    z-index: 2;
}

.footer-stairs {
    position: absolute;
    right: 108px;
    bottom: 58px;
    width: 323px;
    height: 80px;
    background-image: url("./images/bar_deco_footer_1.png");
    background-size: contain;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    z-index: 1;
}

.retro-header-title {
    color: #f72c95;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 1px;
    transform: skewX(-6deg);
    position: absolute;
    left: 130px;
    top: 58px;
    height: 60px;
    display: flex;
    align-items: center;
    z-index: 2;
}

.strength-subtitle-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 45px 0;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.strength-subtitle {
    color: #f72c95;
    font-size: 50px;
    font-weight: 900;
    text-align: center;
    letter-spacing: 2.5px;
    transform: skewX(-5deg);
}

.cards-container {
    width: 100%;
    max-width: 1420px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    position: relative;
    z-index: 1;
    /* ✅ 讓卡片容器在垂直佈局中置中 */
    margin-top: auto;
    margin-bottom: auto;
}

/* ✅ 修改: 為 #section-1 也加上高度和置中排版設定 */
#section-1 {
    min-height: 800px; /* 您可以改成任何您喜歡的數字，例如 900px 或 100vh */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 讓裡面的內容垂直置中 */
}

#section-2, #section-3 {
    min-height: 800px;
    display: flex;
    flex-direction: column;
}

/* ✅ 同步為 section-1 的 wrapper 套用相同的佈局屬性 */
#section-1 .section-content-wrapper,
#section-2 .section-content-wrapper,
#section-3 .section-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
    gap: 25px;
}

/* ✅ 將 section-1 底部的 footer-bar 也推到最底端 */
#section-1 .retro-footer-bar,
#section-2 .retro-footer-bar,
#section-3 .retro-footer-bar {
    margin-top: auto;
}

/* =======================================================
   Section 2: 實績作品 3D 輪播圖 (Coverflow)
======================================================= */
.coverflow-carousel-wrapper {
    width: 100%;
    max-width: 1150px;
    margin: 40px auto;
    padding: 0 50px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.coverflow-viewport {
    width: 100%;
    height: 450px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1500px;
    transform-style: preserve-3d;
}

.coverflow-slide {
    position: absolute;
    width: 90%;
    max-width: 800px;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    display: flex;
    justify-content: center;
}

.coverflow-slide .pixel-card {
    width: 100%;
}

.coverflow-card-content {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.slide-img-wrapper {
    width: 100%;
    background-color: var(--text-white);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.slide-desc-wrapper {
    padding: 20px 25px;
    background-color: var(--text-white);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
    min-height: 120px;
}

.slide-desc {
    color: var(--bg-dark);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
    text-align: left;
    width: 100%;
}

body:lang(en) .slide-desc {
    text-align: left;
}

/* --- Coverflow 動畫狀態 --- */
.coverflow-slide.active {
    transform: translateX(0) scale(1) translateZ(0);
    z-index: 10;
    opacity: 1;
    pointer-events: auto;
}

.coverflow-slide.prev,
.coverflow-slide.next,
.coverflow-slide.hidden {
    transform: translateX(0) scale(0.95) translateZ(-50px);
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

/* --- 兩側深色方塊按鈕 --- */
.coverflow-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background-color: var(--bg-dark);
    color: var(--text-white);
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 20;
    transition: background-color 0.2s, transform 0.2s;
}

.coverflow-btn:hover {
    background-color: var(--accent-pink);
    transform: translateY(-50%) scale(1.1);
}

.coverflow-prev { left: 15px; }
.coverflow-next { right: 15px; }

/* --- 底部指示器圓點 --- */
.coverflow-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 80px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 0%;
    background-color: #b0c4de;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.indicator.active {
    background-color: var(--accent-pink);
    transform: scale(1.2);
}

/* =======================================================
   像素字卡共用基礎 (缺角黑框)
======================================================= */
.pixel-card {
    background-color: var(--bg-dark);
    padding: 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 0px rgba(0,0,0,0.12);
    clip-path: polygon(
        0 5px, 5px 5px, 5px 0,
        calc(100% - 5px) 0, calc(100% - 5px) 5px, 100% 5px,
        100% calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 100%,
        5px 100%, 5px calc(100% - 5px), 0 calc(100% - 5px)
    );
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background-color 0.3s ease,
                box-shadow 0.3s ease;
}

.pixel-card:hover {
    transform: translateY(-10px);
    background-color: #f72c95;
    box-shadow: 0 20px 0px rgba(0,0,0,0.08);
}

.pixel-card-content {
    background-color: var(--text-white);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    clip-path: polygon(
        0 5px, 5px 5px, 5px 0,
        calc(100% - 5px) 0, calc(100% - 5px) 5px, 100% 5px,
        100% calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 100%,
        5px 100%, 5px calc(100% - 5px), 0 calc(100% - 5px)
    );
}

.pixel-card-header {
    background-color: var(--bg-dark);
    color: var(--text-white);
    text-align: center;
    padding: 14px 10px;
    font-size: 25px;
    font-weight: bold;
    border-bottom: 4px solid var(--bg-dark);
    letter-spacing: 1px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.pixel-card:hover .pixel-card-header {
    background-color: #f72c95;
    border-bottom-color: #f72c95;
}

/* =======================================================
   Section 1: 標準圖文卡片
======================================================= */
.pixel-card-body {
    padding: 24px 18px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-grow: 1;
}

.pixel-card-img-wrapper {
    /* 移除強制的 64px 讓它能夠呈現原始大小 */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pixel-card-img-wrapper img {
    /* 保持原始尺寸並設定像素渲染 */
    width: auto;
    height: auto;
    image-rendering: pixelated;
}

.pixel-card-text {
    color: var(--bg-dark);
    font-size: 14.5px;
    line-height: 1.6;
    font-weight: bold;
    /* ✅ 恢復為 justify，讓中、日文的方塊字排版維持左右整齊 */
    text-align: justify;
}

/* ✅ 單獨針對英文版設定靠左對齊，解決單字間距過大問題 */
body:lang(en) .pixel-card-text {
    text-align: left;
}

/* =======================================================
   Section 2 上排: 高卡片 (純圖片 + 底部黑框標題)
======================================================= */
.pixel-card-image-only {
    flex-direction: column-reverse;
}

.image-only-wrapper {
    width: 100%;
    height: 270px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f5;
    padding: 20px;
}

.image-only-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.popout-card-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popout-card-container:hover {
    transform: translateY(-10px);
}

.popout-card-container:hover .pixel-card {
    background-color: #f72c95;
}
.popout-card-container:hover .pixel-card-header {
    background-color: #f72c95;
    border-bottom-color: #f72c95;
}

.popout-card-container .pixel-card {
    transform: none !important;
    flex-grow: 1;
}

.popout-img {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    left: 0;
    right: 0;
    margin: 0 auto;
    top: 114px;
    /* 移除 scale 縮放，保留原始尺寸 */
    transform: translateY(-50%);
    width: auto;
    height: auto;
    image-rendering: pixelated;
}

/* ✅ 個別微調三張圖片的高低位置 (正數往下，負數往上) */
.popout-1 {
    margin-top: 25px;
}

.popout-2 {
    margin-top: 25px;
}

.popout-3 {
    margin-top: 25px;
}

/* =======================================================
   Section 2 下排: 矮數據卡片
======================================================= */
.pixel-card-stats-body {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    height: 160px;
}

.stats-icon-wrapper {
    /* 移除強制的 56px，以圖片原始大小為主 */
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stats-icon-wrapper img {
    /* 保持原始尺寸並設定像素渲染 */
    width: auto;
    height: auto;
    image-rendering: pixelated;
}

.stats-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

body:lang(en) .stats-text-wrapper {
    flex-direction: column-reverse;
}
body:lang(en) .stats-title {
    margin-bottom: 0;
    margin-top: 4px;
}

.stats-title {
    /* ✅ 這裡調整標題文字大小（例如：対応言語数） */
    font-size: 15px; /* 原本是 13px，可在此調整 */
    font-weight: bold;
    color: var(--bg-dark);
    margin-bottom: 2px;
}

.stats-value {
    display: flex;
    align-items: baseline;
    color: var(--bg-dark);
}

.stats-number {
    /* ✅ 這裡調整大數字文字大小（例如：8, 170） */
    font-size: 46px; /* 原本是 38px，可在此調整 */
    font-weight: 900;
    line-height: 1;
    font-family: "Impact", "Arial Black", sans-serif;
}

.stats-unit {
    /* ✅ 這裡調整單位文字大小（例如：言語以上） */
    font-size: 18px; /* 原本是 16px，可在此調整 */
    font-weight: bold;
    margin-left: 6px;
}

.pixel-btn-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.pixel-btn-yellow {
    background-color: #fca000;
    color: var(--bg-dark);
    font-size: 18px;
    font-weight: 900;
    padding: 15px 60px;
    text-decoration: none;
    display: inline-block;
    position: relative;
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
    border: 4px solid var(--bg-dark);
    clip-path: polygon(
        0 4px, 4px 4px, 4px 0,
        calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px,
        100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%,
        4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px)
    );
    box-shadow: 0 6px 0 rgba(0,0,0,0.2);
}

.pixel-btn-yellow:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: 0 9px 0 rgba(0,0,0,0.2);
}

.pixel-btn-yellow:active {
    transform: translateY(3px);
    box-shadow: 0 0px 0 rgba(0,0,0,0.2);
}

/* =======================================================
   Section 3: 費用圖片 & 表格
======================================================= */
.pricing-table-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    background-color: var(--bg-dark);
    padding: 4px;
    box-shadow: 0 10px 0px rgba(0,0,0,0.12);
    clip-path: polygon(
        0 5px, 5px 5px, 5px 0,
        calc(100% - 5px) 0, calc(100% - 5px) 5px, 100% 5px,
        100% calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 100%,
        5px 100%, 5px calc(100% - 5px), 0 calc(100% - 5px)
    );
}

.pricing-table-content {
    background-color: var(--text-white);
    width: 100%;
    clip-path: polygon(
        0 5px, 5px 5px, 5px 0,
        calc(100% - 5px) 0, calc(100% - 5px) 5px, 100% 5px,
        100% calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 100%,
        5px 100%, 5px calc(100% - 5px), 0 calc(100% - 5px)
    );
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.pricing-table thead {
    background-color: var(--bg-dark);
    color: var(--text-white);
}

.pricing-table th {
    padding: 20px 30px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 1px;
    width: 33.33%;
}

.pricing-table td {
    padding: 16px 30px;
    font-size: 16px;
    font-weight: bold;
    color: var(--bg-dark);
    border-bottom: 1px solid #e0e4eb;
}

.pricing-table tbody tr:last-child td {
    border-bottom: none;
}

.price-number {
    font-size: 26px;
    font-weight: 900;
    margin-right: 4px;
}

.price-unit {
    font-size: 14px;
}

.rates-image-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.rates-image-container img {
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rates-image-container img:hover {
    transform: translateY(-10px);
}

/* ==========================================
   Footer 頁尾區塊
========================================== */
.main-footer {
    width: 100%;
    height: 120px;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.footer-icon-link {
    display: block;
    width: 45px;
    height: 45px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-icon-link:hover {
    transform: translateY(-4px);
    opacity: 0.8;
}

.footer-icon-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

/* ==========================================
   RWD 手機版設定
========================================== */
@media screen and (max-width: 950px) {
    .desktop-nav { display: none; }
    .mobile-controls { display: flex; }

    .hamburger.active span:nth-child(1) { transform: translateY(10.5px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }

    .coverflow-slide {
        /* ✅ 手機版也回復為百分比寬度 */
        width: 85%;
        max-width: 800px;
    }

    .cards-container {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 550px;
    }

    .pixel-card-body {
        flex-direction: column;
        gap: 15px;
        padding: 30px 20px;
    }
    .pixel-card-text {
        text-align: center !important;
    }

    .pixel-card-stats-body {
        flex-direction: column;
        height: auto;
        padding: 30px 20px;
        justify-content: center;
    }
    .stats-text-wrapper {
        align-items: center;
        text-align: center;
    }
    body:lang(en) .stats-text-wrapper {
        align-items: center;
    }

    .strength-subtitle {
        font-size: 24px;
    }

    .pricing-table-container {
        max-width: 90%;
    }
    .pricing-table th, .pricing-table td {
        padding: 12px 15px;
        font-size: 14px;
    }
    .price-number {
        font-size: 20px;
    }
}