/* 全域樣式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== Loading 動畫頁面 ==================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Loading 圖片容器 */
.loading-images {
    position: relative;
    width: 80vw;
    max-width: 400px;
    max-height: 400px;
    height: 80vw;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

/* Loading Logo (底層，有發光效果) */
.loading-logo {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: glow 2s ease-in-out infinite;
}

/* Loading 文字圖片 (上層，覆蓋對齊) */
.loading-text-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

/* 發光閃爍動畫 */
@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(255, 100, 200, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 100, 200, 0.6)) 
                drop-shadow(0 0 30px rgba(255, 100, 200, 0.48))
                drop-shadow(0 0 40px rgba(255, 100, 200, 0.36));
    }
}

/* LOADING 文字樣式 */
.loading-text {
    font-family: 'Noto Sans', 'Noto Sans TC', sans-serif;
    font-size: 32px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 4px;
    display: flex;
    gap: 2px;
    margin-top: -40px;
}

.loading-text span {
    display: inline-block;
    animation: bounce 1.4s ease-in-out infinite;
}

/* 依序延遲每個字母的彈跳動畫 */
.loading-text span:nth-child(1) { animation-delay: 0s; }
.loading-text span:nth-child(2) { animation-delay: 0.1s; }
.loading-text span:nth-child(3) { animation-delay: 0.2s; }
.loading-text span:nth-child(4) { animation-delay: 0.3s; }
.loading-text span:nth-child(5) { animation-delay: 0.4s; }
.loading-text span:nth-child(6) { animation-delay: 0.5s; }
.loading-text span:nth-child(7) { animation-delay: 0.6s; }
.loading-text span:nth-child(8) { animation-delay: 0.7s; }
.loading-text span:nth-child(9) { animation-delay: 0.8s; }
.loading-text span:nth-child(10) { animation-delay: 0.9s; }

/* 彈跳動畫 */
@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-20px);
    }
}
/* ==================== End Loading 動畫頁面 ==================== */

html, body, * {
    cursor: none !important; /* 隱藏所有系統游標 */
}

/* 全域防拖曳和右鍵保護 */
img, video {
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 穿透樣式 */
.pointer-events-none {
    pointer-events: none !important;
}

.pointer-events-none * {
    pointer-events: none !important;
}

body {
    font-family: 'Noto Sans TC', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
    overscroll-behavior: none;
}

/* 軟體游標 */
#custom-cursor {
    position: fixed;
    left: 0;
    top: 0;
    width: 64px;
    height: 64px;
    background: url('assets/cursor-01.png') no-repeat center / contain;
    pointer-events: none;
    z-index: 999999;
    will-change: transform;
    transition: width 0.15s ease, height 0.15s ease, background-image 0.15s ease, opacity 0.2s ease;
    transform-origin: top left;
}

/* 可點擊狀態的游標 */
#custom-cursor.clickable {
    width: 64px;
    height: 64px;
    background-image: url('assets/cursor-pic-01.png');
}

/* 遊戲容器 */
.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: none;
    overscroll-behavior: none;
    /* 設定背景色，讓 mix-blend-mode 能正常作用 */
    /* background-color: #000; */
}

/* 語言選單 */
.language-selector {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    pointer-events: auto;
    display: flex;
    align-items: center;
    background: url('assets/lang-col-bg.png') no-repeat center;
    background-size: 100% 100%;
    padding: 4px 12px;
    gap: 0;
}

.language-item {
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
    padding: 3px 3px;
    position: relative;
}

.language-item:not(:last-child)::after {
    content: '/';
    color: white;
    margin: 0 5px;
    font-size: 16px;
}

.language-item:hover {
    color: #ffdf93;
    /* transform: scale(1.1); */
}

.language-item.active {
    color: #ffdf93;
    text-shadow: 0 0 8px rgba(255, 223, 147, 0.8);
}

/* 背景 */
.game-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/bg-02.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    overflow: hidden;
}

/* 底部裝飾 */
.cover-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    pointer-events: none;
}

.cover-bottom img {
    width: 100%;
    height: auto;
    display: block;
}

/* 旋轉圓形外層容器（套用橢圓形遮罩，不旋轉） */
.rotating-circle-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: 1200px;
    height: 1200px;
    /* 橢圓形邊緣淡出遮罩 */
    -webkit-mask-image: radial-gradient(
        ellipse 55% 30% at center,
        black 0%,
        black 50%,
        transparent 100%
    );
    mask-image: radial-gradient(
        ellipse 55% 30% at center,
        black 0%,
        black 50%,
        transparent 100%
    );
}

/* 旋轉圓形裝飾（內層，負責旋轉） */
.rotating-circle {
    width: 100%;
    height: 100%;
    opacity: 0.9;
    scale: 1;
    animation: rotateCircle 30s linear infinite;
}

.rotating-circle img {
    width: 100%;
    height: auto;
}

@keyframes rotateCircle {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 跑馬燈圖片（放在背景內部，讓混合模式能與背景混合） */
.marquee-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.marquee-row {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-flex;
    gap: 40px;
    align-items: center;
}

.marquee-content img {
    height: 120px;
    width: auto;
    flex-shrink: 0;
    padding: 0 20px;
}

/* 往左移動動畫 */
.marquee-left {
    animation: marqueeLeft 40s linear infinite;
}

@keyframes marqueeLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* 往右移動動畫 */
.marquee-right {
    animation: marqueeRight 40s linear infinite;
}

@keyframes marqueeRight {
    from {
        transform: translateX(-50%);
    }
    to {
        transform: translateX(0);
    }
}

/* 上排和下排 - 混合模式 screen (Add) */
.marquee-top,
.marquee-bottom {
    /* mix-blend-mode: screen; */
    opacity: 0.6;
}

/* 中排 - 混合模式 Overlay */
.marquee-middle {
    mix-blend-mode: overlay;
    opacity: 0.2;
}

/* 標題 */
.game-title {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 80%;
    max-width: 800px;
    text-align: center;
}

.game-title img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* 計時器 */
.timer-container {
    position: absolute;
    top: 10%;
    left: 5%;
    z-index: 10;
}

.timer-bg {
    position: relative;
    width: 200px;
    height: 200px;
}

.timer-bg > img {
    width: 100%;
    height: 100%;
}

.timer-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.timer-label {
    margin-bottom: 0;
}

.timer-label img {
    width: 120px;
    height: auto;
}

.timer-value {
    font-size: 42px;
    font-weight: bold;
    color: #ffdf93;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-family: 'Arial Black', Arial, sans-serif;
    letter-spacing: 1px;
}

.timer-value.warning {
    color: #ff4444;
    animation: warningPulse 0.5s infinite;
}

@keyframes warningPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 角色容器 */
.character-container {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 200%;
    max-width: 1920px;
    height: 0;
    padding-bottom: 300%;
}


.character-container.shaking {
    animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
    0% {
        transform: translate(-50%, -50%);
    }
    10% {
        transform: translate(-50.4%, -50.15%);
    }
    20% {
        transform: translate(-49.6%, -50.25%);
    }
    30% {
        transform: translate(-50.25%, -49.9%);
    }
    40% {
        transform: translate(-49.85%, -50.1%);
    }
    50% {
        transform: translate(-50.15%, -49.95%);
    }
    60% {
        transform: translate(-49.95%, -50.05%);
    }
    70% {
        transform: translate(-50.08%, -49.98%);
    }
    80% {
        transform: translate(-49.98%, -50.03%);
    }
    90% {
        transform: translate(-50.03%, -49.99%);
    }
    100% {
        transform: translate(-50%, -50%);
    }
}

/* 影片容器 */
.video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-wrapper.visible {
    opacity: 1;
}

/* 各等級的 z-index */
.video-lv1 {
    z-index: 1;
}

.video-lv2 {
    z-index: 2;
}

.video-lv3 {
    z-index: 3;
}

/* 全局點擊特效 */
.click-effect-global {
    position: fixed;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
    animation: clickEffectAnim 0.4s ease-out forwards;
    z-index: 1000;
    will-change: transform, opacity;
}

.click-effect-global img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@keyframes clickEffectAnim {
    0% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.3);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
    }
}

/* Click to Start 圓形提示 */
.click-to-start {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    width: 400px;
    height: 400px;
    animation: fadeIn 0.6s ease-out forwards;
}

.click-start-main {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    animation: pulse 1.5s ease-in-out infinite;
}

.click-start-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    animation: zoomPulse 1.5s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes zoomPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.3;
    }
}

/* 底部區塊容器 */
.bottom-container {
    position: fixed;
    bottom: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 15;
    pointer-events: none;
}

.bottom-container > * {
    pointer-events: auto;
}

/* 開始按鈕 */
.start-button {
    width: 90%;
    max-width: 480px;
    animation: buttonPulse 1.5s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.start-button img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(255, 105, 180, 0.6));
}

.start-button:hover {
    animation: buttonPulse 1s ease-in-out infinite;
}

.start-button:active {
    animation: none;
    transform: scale(0.98);
}

/* 遊戲元素淡入動畫 */
.fade-in-element {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 進度條 */
.progress-container {
    width: 55%;
    max-width: 800px;
}

.progress-bar {
    position: relative;
    width: 100%;
    /* height: 60px; */
    padding-top: 9.61%;
}

.progress-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
}

.progress-label {
    position: absolute;
    top: -24%;
    right: -1.5%;
    height: 120%;
    width: auto;
    z-index: 2;
}

.progress-fill {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 1.3%;
    height: 76%;
    max-width: 64%; 
    overflow: hidden;
    transition: width 0.2s ease-out, opacity 0.2s ease-out;
    border-radius: 30px;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-fill img {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 94%;
    width: 100%; /* 填滿整個 .progress-fill 容器 */
    object-fit: cover;
    opacity: 0.8;
}

.progress-text {
    position: absolute;
    top: 48%;
    left: 58%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
    /* text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); */
    white-space: nowrap;
    z-index: 1;
}

/* 彈窗遮罩 */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 結果彈窗 */
.result-popup {
    position: relative;
    width: 90%;
    max-width: 700px;
    background-image: url('assets/box-bg.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 60px 0 40px;
    animation: popupFadeIn 0.5s ease;
    border-radius: 20px;
}

@keyframes popupFadeIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}

.close-btn img {
    width: 100%;
    height: 100%;
}

.close-btn:hover {
    transform: scale(1.1);
}

/* 結果內容 */
.result-content {
    text-align: center;
    width: 100%;
}

.result-percentage {
    display: flex;
    flex-direction: row;
    align-items: end;
    justify-content: center;
}


.box-text-img-top {
    width: auto;
    height: 50px;
    flex-shrink: 0;
    margin-bottom: 10px;
}

.percentage-number {
    width: 200px;
    height: auto;
    flex-shrink: 0;
}

.percentage-number img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(255, 105, 180, 0.6));
}

.result-character {
    position: relative;
    margin: 4px -40px -70px -120px;
    display: flex;
    flex-direction: column;
    align-items: center;
}


.result-bubble {
    position: relative;
    margin-bottom: -100px;
    margin-left: 55px;
    display: inline-block;
    max-width: 100%;
}

.result-bubble > img:first-child {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    /* object-fit: fill; */
    z-index: 0;
}

.result-message {
    position: relative;
    font-size: 18px;
    color: #333;
    line-height: 1.5;
    padding: 20px 30px 50px 30px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1;
}

.result-char-img {
    width: 80%;
    /* max-width: 600px; */
    height: auto;
}

/* 結果按鈕 */
.result-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.result-btn-img {
    background: none;
    border: none;
    cursor: url('assets/cursor-pic-01.png') 16 16, pointer;
    padding: 0;
    transition: transform 0.2s ease;
}

.result-btn-img img {
    width: 200px;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.result-btn-img:hover {
    transform: scale(1.05);
}

.result-btn-img:active {
    transform: scale(0.98);
}

/* 分享彈窗 */
.share-popup {
    position: relative;
    width: 90%;
    max-width: 500px;
    background-image: url('assets/box-bg.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 60px 40px 40px;
    animation: popupSlideIn 0.4s ease;
    border-radius: 20px;
    z-index: 1;
}

.share-title {
    text-align: center;
    font-size: 32px;
    color: #ffffff;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.share-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.share-icon {
    width: 72px;
    height: 72px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.share-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.share-icon:hover {
    transform: scale(1.15);
}

.share-icon:active {
    transform: scale(0.95);
}

.copy-message {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    background-color: rgba(76, 175, 80, 0.9);
    color: #ffffff;
    border-radius: 8px;
    font-size: 18px;
    animation: fadeIn 0.3s ease;
}

/* 18+ 警告文案 */
.warning-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 90%;
    padding: 8px 15px;
    border-radius: 20px;
}

.warning-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.warning-text {
    color: white;
    font-size: 11px;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* 響應式設計 - 平板 */
@media (max-width: 1024px) {
    /* 隱藏自訂游標，使用系統游標 */
    html, body, * {
        cursor: auto !important;
    }
    
    #custom-cursor {
        display: none !important;
    }
    
    .game-title {
        top: 6%;
        width: 80%;
        max-width: 720px;
    }
    
    /* 語言選單調整 */
    .language-selector {
        top: 14px;
        right: 14px;
        padding: 3px 10px;
    }
    
    .language-item {
        font-size: 15px;
        padding: 3px 5px;
    }
    
    .language-item:not(:last-child)::after {
        font-size: 15px;
        margin: 0 4px;
    }
    
    .timer-container {
        top: 14%;
        left: 3%;
    }
    
    .timer-bg {
        width: 150px;
        height: 150px;
    }
    
    .timer-label img {
        width: 90px;
    }
    
    .timer-value {
        font-size: 32px;
    }
    
    .character-container {
        top: 65%;
        width: 400%;
        max-width: 2160px;
        padding-bottom: 300%; 
    }
    
    .click-to-start {
        width: 350px;
        height: 350px;
    }

    .progress-container {
        width: 70%;
    }
    
    .progress-bar {
        height: 50px;
    }
    
    .progress-text {
        font-size: 20px;
    }
    
    /* 結果彈窗調整 */
    .box-text-img-top {
        height: 50px;
    }
    
    .percentage-number {
        width: 180px;
    }
    
    /* 18+ 警語調整 */
    .warning-footer {
        width: 70%;
    }
    
    .warning-icon {
        width: 45px;
        height: 45px;
    }
    
    .warning-text {
        font-size: 11px;
    }
}

/* 響應式設計 - 手機 */
@media (max-width: 768px) {
    /* 確保游標已隱藏 */
    html, body, * {
        cursor: auto !important;
    }
    
    #custom-cursor {
        display: none !important;
    }
    
    .game-title {
        top: 6%;
        width: 85%;
    }
    
    /* 語言選單調整 */
    .language-selector {
        top: 10px;
        right: 10px;
        padding: 3px 8px;
    }
    
    .language-item {
        font-size: 14px;
        padding: 2px 4px;
    }
    
    .language-item:not(:last-child)::after {
        font-size: 14px;
        margin: 0 3px;
    }
    
    .timer-container {
        top: 16%;
        left: 4%;
    }
    
    .timer-bg {
        width: 140px;
        height: 140px;
    }
    
    .timer-label img {
        width: 90px;
    }
    
    .timer-value {
        font-size: 24px;
    }
    
    .character-container {
        top: 70%;
        left: 66%;
        width: 350%;
        max-width: 2160px;
        padding-bottom: 300%;
    }
    
    .click-to-start {
        width: 280px;
        height: 280px;
        cursor: pointer;
    }
    
    .progress-container {
        width: 80%;
    }
    
    .progress-bar {
        height: 40px;
    }
    
    .progress-text {
        font-size: 16px;
    }
    
    .result-popup {
        width: 95%;
        padding: 50px 0 30px;
    }
    
    .share-popup {
        width: 95%;
        padding: 50px 20px 40px;
    }

    .close-btn {
        width: 40px;
        height: 40px;
    }
    
    .result-percentage {
        font-size: 22px;
        gap: 15px;
    }

    .result-character {
        margin: 4px -40px -50px -120px;
    }


    
    /* 結果彈窗頂部調整 */
    .box-text-img-top {
        height: 45px;
    }
    
    .percentage-number {
        width: 150px;
    }
    
    .percentage-value {
        font-size: 42px;
    }
    
    .result-message {
        font-size: 14px;
        padding: 12px 20px 28px 20px;
    }
    
    .result-buttons {
        gap: 36px;
    }

    .result-btn-img img{
        width: 160px;
    }
    
    .warning-icon {
        width: 42px;
        height: 42px;
    }
    
    .warning-text {
        font-size: 10px;
    }
    
    .share-title {
        font-size: 26px;
        margin-bottom: 30px;
    }
    
    .share-icon {
        width: 65px;
        height: 65px;
    }
    
    .share-icons {
        gap: 12px;
    }
    
    /* 手機版 18+ 警語全寬 */
    .warning-footer {
        width: 90%;
    }
    
    .warning-text {
        font-size: 10px;
    }
    
    .warning-icon {
        width: 40px;
        height: 40px;
    }
}




/* 響應式設計 - 小手機 */
@media (max-width: 480px) {
    .game-title {
        width: 105%;
    }
    
    /* 語言選單進一步縮小 */
    .language-selector {
        top: 12px;
        right: 12px;
        padding: 2px 6px;
    }
    
    .language-item {
        font-size: 12px;
        padding: 2px 3px;
    }
    
    .language-item:not(:last-child)::after {
        font-size: 12px;
        margin: 0 2px;
    }
    
    .timer-container {
        top: 14%;
        left: 2%;
    }
    
    .timer-bg {
        width: 130px;
        height: 130px;
    }
    
    .timer-label img {
        width: 80px;
    }
    
    .timer-value {
        font-size: 20px;
    }
    
    .character-container {
        top: 65%;
        left: 70%;
        width: 400%;
        max-width: 2160px;
        padding-bottom: 300%;
    }
    
    .click-to-start {
        width: 240px;
        height: 240px;
    }

    .progress-container {
        width: 90%;
        min-width: 300px;
    }
    .progress-text {
        font-size: 14px;
    }

    .progress-label {
        top: -14%;
        right: -2.5%;
        height: 100%;
    }
    .progress-fill {
        height: 74%;
        top: 50%;
        left: 1.2%;
    }

    .result-popup {
        padding: 40px 0 30px;
    }
    
    .share-popup {
        padding: 40px 15px 30px;
    }

    .close-btn {
        top: 14px;
        right: 14px;
        width: 24px;
        height: 24px;
    }
    
    .result-percentage {
        gap: 0;
    }

    .result-character {
        margin: 10px 0px -50px -60px;
    }

    .result-bubble {
        margin-bottom: -60px;
    }

    .result-char-img {
        width: 100%;
    }

    .result-buttons {
        gap: 12px;
    }
    .result-btn-img img{
        width: 140px;
    }
    
    .box-text-img-top {
        height: 40px;
    }
    
    .percentage-number {
        width: 130px;
    }
    
    .result-message {
        font-size: 12px;
        padding: 12px 14px 28px 14px;
    }
    
    .share-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .share-icon {
        width: 55px;
        height: 55px;
    }
    
    .share-icons {
        gap: 10px;
    }
    
    /* 手機版 18+ 警語全寬 */
    .warning-footer {
        width: calc(100% - 40px);
        padding: 6px 12px;
    }
    
    .warning-text {
        font-size: 8px;
        line-height: 1.2;
    }
    
    .warning-icon {
        width: 40px;
        height: 40px;
    }
}

/* 提升觸控體驗 */
@media (hover: none) and (pointer: coarse) {
    /* 觸控裝置隱藏自訂游標 */
    html, body, * {
        cursor: auto !important;
    }
    
    #custom-cursor {
        display: none !important;
    }
    
    .character-container {
        -webkit-tap-highlight-color: transparent;
    }
    
    .click-to-start {
        -webkit-tap-highlight-color: transparent;
    }
    
    .start-button {
        -webkit-tap-highlight-color: transparent;
    }
    
    button {
        -webkit-tap-highlight-color: transparent;
    }
}

