/* 根目錄變數設定：建立專業的設計系統 */
:root {
    /* 主配色 (基於 Logo 橘色調) */
    --primary: #f97316;
    --primary-light: #fff7ed;
    --primary-dark: #c2410c;
    
    /* 語意色彩 */
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* 文字與背景 */
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-main: #ffffff;
    --bg-alt: #fff7ed;
    --gray-light: #f3f4f6;
    
    /* 視覺一致性設定 */
    --radius: 12px;
    --transition: 0.2s ease;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* 基礎樣式與字體優化 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans TC', 'Inter', -apple-system, sans-serif;
    letter-spacing: 0.02em; /* 微調字距提升閱讀質感 */
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.7; /* 遵循 1.6~1.8 規範 */
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 導覽列優化 */
header {
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px); /* 磨砂玻璃效果 */
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 48px;
    transition: var(--transition);
}

.logo img:hover {
    transform: translateY(-2px);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

nav ul li a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
}

nav ul li a:hover {
    color: var(--primary);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

/* 英雄區優化 */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-main) 0%, var(--bg-alt) 100%);
    padding: 80px 0;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 24px;
    background: linear-gradient(to right, var(--text-main), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; /* 漸層文字展現細節 */
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* 按鈕規範化 */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 14px 0 rgba(249, 115, 22, 0.39);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.23);
}

/* 關於我們區塊優化 */
.about-section {
    padding: 120px 0;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 32px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.image-box {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    box-shadow: var(--shadow-hover);
    position: relative;
    overflow: hidden;
}

.image-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M0 40L40 0H20L0 20M40 40V20L20 40" fill="%23fff" fill-opacity="0.05" fill-rule="evenodd"/></svg>');
}

.feat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: var(--radius);
    font-weight: 600;
}

.feat-item i {
    color: var(--primary);
}

/* 課程介紹區塊優化 */
.courses {
    padding: 120px 0;
    background-color: var(--gray-light);
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.course-card {
    background: var(--bg-main);
    padding: 40px;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid transparent;
}

.course-grid h3 i {
    color: var(--primary);
    margin-right: 8px;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.course-card h3 {
    margin-bottom: 16px;
    font-size: 1.5rem;
    color: var(--text-main);
}

.course-card p {
    color: var(--text-muted);
}

/* 遊戲挑戰區優化 */
.game-section {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--gray-light) 0%, var(--bg-alt) 100%);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin: -20px 0 60px 0;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-main);
    padding: 48px;
    border-radius: 32px;
    box-shadow: var(--shadow-hover);
    text-align: center;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background: var(--primary-light);
    border-radius: var(--radius);
    margin-bottom: 40px;
    font-weight: 700;
    color: var(--primary-dark);
}

.question-box #target-object-name {
    font-size: 2.5rem;
    color: var(--primary);
    margin: 16px 0 40px 0;
    font-weight: 700;
}

.choices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.symbol-card {
    background: var(--gray-light);
    border-radius: 20px;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 24px;
    border: 2px solid transparent;
}

.symbol-card:hover {
    background: white;
    border-color: var(--primary);
    transform: scale(1.05);
}

.symbol-card svg {
    width: 100%;
    height: 100%;
}

.game-feedback {
    height: 32px;
    margin-bottom: 24px;
    font-weight: 700;
    font-size: 1.25rem;
}

/* 遊戲動畫 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.shake {
    animation: shake 0.4s ease-in-out;
    border-color: var(--error) !important;
}

.correct-pop {
    transform: scale(1.1);
    border-color: var(--success) !important;
    background: #f0fdf4 !important;
}

/* 頁尾優化 */
footer {
    padding: 80px 0;
    background: var(--text-main);
    color: #9ca3af;
    text-align: center;
}

footer p {
    font-size: 0.875rem;
}

/* 響應式佈局 (由小到大) */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    nav ul { display: none; } /* 繁體中文註解：手機版暫時隱藏清單，簡化結構 */
    .hero { text-align: center; }
}

@media (min-width: 1200px) {
    .container { max-width: 1200px; }
}
