/* 基礎重置與失智友善設計 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px; /* 基礎字體大小 */
}

body {
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
    font-size: 1.4rem; /* 約25px */
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: #2c3e50;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* 容器 */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    min-height: 100vh;
}

/* 標題區域 */
.app-header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.main-title {
    font-size: 3rem; /* 54px */
    font-weight: 900;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.6rem; /* 28.8px */
    color: #34495e;
    margin-bottom: 25px;
    font-weight: 500;
}

/* 進度條 */
.progress-container {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #ecf0f1;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.6s ease;
    border-radius: 6px;
}

.progress-text {
    display: block;
    margin-top: 10px;
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* 螢幕區塊 */
.screen {
    display: none;
    animation: fadeIn 0.6s ease-in;
    min-height: 60vh;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 大按鈕 */
.mega-button {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    padding: 25px 40px;
    min-height: 80px;
    min-width: 200px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px auto;
    text-decoration: none;
}

.mega-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.mega-button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.primary-button {
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: #ffffff;
    border: 3px solid #fff;
}

.secondary-button {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #ffffff;
    border: 3px solid #fff;
}

.success-button {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #ffffff;
    border: 3px solid #fff;
}

.button-text {
    font-size: 1.6rem;
    letter-spacing: 1px;
}

.button-icon {
    font-size: 2rem;
}

/* 歡迎畫面 */
.welcome-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 40px;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.welcome-animation {
    position: relative;
    margin-bottom: 30px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nostalgic-icon {
    font-size: 5rem;
    animation: bounce 2s infinite;
    z-index: 2;
    position: relative;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.float-item {
    position: absolute;
    font-size: 2rem;
    animation: float 3s infinite ease-in-out;
    opacity: 0.7;
}

.float-item:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.float-item:nth-child(2) { top: 15%; right: 20%; animation-delay: 1s; }
.float-item:nth-child(3) { bottom: 10%; left: 50%; animation-delay: 2s; }

@keyframes bounce {
    0%,20%,50%,80%,100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-8px); }
}

@keyframes float {
    0%,100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.welcome-content h2 {
    font-size: 2.4rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 700;
}

.welcome-description {
    font-size: 1.4rem;
    color: #34495e;
    line-height: 1.8;
    margin-bottom: 30px;
}

.difficulty-selector {
    margin-top: 30px;
    padding: 20px;
    background: rgba(52, 73, 94, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(52, 73, 94, 0.2);
}

.difficulty-selector label {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.difficulty-dropdown {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1.3rem;
    padding: 12px 20px;
    border: 2px solid #bdc3c7;
    border-radius: 10px;
    background: #ffffff;
    color: #2c3e50;
    min-width: 200px;
    cursor: pointer;
}

/* 介紹畫面 */
.intro-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 40px;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.intro-content h2 {
    font-size: 2.4rem;
    color: #2c3e50;
    margin-bottom: 40px;
    font-weight: 700;
}

.instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.instruction-card {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: #ffffff;
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.instruction-card:hover {
    transform: translateY(-5px);
}

.instruction-number {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 auto 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.instruction-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.instruction-card p {
    font-size: 1.2rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* 遊戲畫面 */
.game-content {
    max-width: 1000px;
    margin: 0 auto;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.item-counter, .score-display {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    padding: 10px 20px;
    border-radius: 15px;
    min-width: 120px;
    text-align: center;
}

/* 物品展示 */
.item-showcase {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.item-image-container {
    position: relative;
    margin-bottom: 25px;
    display: inline-block;
}

.item-image {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 20px;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.item-image:hover {
    transform: scale(1.05);
}

.image-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    background: radial-gradient(circle, rgba(116,185,255,0.3) 0%, transparent 70%);
    border-radius: 20px;
    animation: glow 3s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes glow {
    0%,100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

.item-info {
    max-width: 600px;
    margin: 0 auto;
}

.item-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.item-desc {
    font-size: 1.3rem;
    color: #34495e;
    line-height: 1.6;
    margin-bottom: 20px;
}

.era-tag {
    display: inline-block;
    background: linear-gradient(135deg, #e17055, #d63031);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* 區段樣式 */
.memory-prompt-section, .price-guessing-game {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
}

.memory-text {
    font-size: 1.3rem;
    color: #34495e;
    line-height: 1.7;
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(116,185,255,0.1);
    border-radius: 15px;
    border-left: 5px solid #74b9ff;
}

/* 音頻按鈕 */
.audio-button {
    background: linear-gradient(135deg, #55a3ff, #003d82);
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.audio-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* 價格選項 */
.price-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.price-option {
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
    color: #2c3e50;
    padding: 25px 20px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #74b9ff;
}

.price-option.selected {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: #ffffff;
    border-color: #fff;
    transform: scale(1.05);
}

.price-option.correct {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: #ffffff;
    border-color: #fff;
    animation: correctPulse 0.8s ease-in-out;
}

.price-option.incorrect {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: #ffffff;
    opacity: 0.7;
    animation: shake 0.6s ease-in-out;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 25px rgba(0,184,148,0.5); }
    100% { transform: scale(1.05); }
}

@keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 操作區 */
.game-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

/* 答案展示 */
.answer-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 40px;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

/* 完成畫面與其餘樣式保持一致 */
