:root {
    --primary-color: #ff8c00;
    --secondary-color: #ffd700;
    --text-main: #333333;
    --text-light: #666666;
    --bg-light: #fffaf0;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(255, 140, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans TC', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    overflow-x: hidden;
}

/* 背景裝飾動畫 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.background-animation::before,
.background-animation::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: drift 10s infinite alternate ease-in-out;
}

.background-animation::before {
    background: rgba(255, 140, 0, 0.4);
    top: -10%;
    left: -10%;
}

.background-animation::after {
    background: rgba(255, 94, 98, 0.4);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.page {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 30px;
    text-align: center;
    width: 100%;
}

/* 圖片區塊 */
.image-wrapper {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: -20px;
    z-index: 2;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.content-wrapper {
    padding-top: 40px;
    z-index: 1;
}

h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #d35400;
    line-height: 1.4;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 25px;
}

/* 按鈕樣式 */
button {
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.primary-btn {
    background: linear-gradient(to right, #ff8c00, #ff5e62);
    color: white;
    padding: 15px 40px;
    width: 80%;
    box-shadow: 0 4px 15px rgba(255, 94, 98, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 94, 98, 0.6);
}

.secondary-btn {
    background: #f5f5f5;
    color: var(--text-main);
    padding: 12px 30px;
    margin-top: 20px;
}

.secondary-btn:hover {
    background: #e0e0e0;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 94, 98, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 4px 20px rgba(255, 94, 98, 0.7); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 94, 98, 0.4); }
}

/* 測驗頁樣式 */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #ff8c00, #ff5e62);
    width: 10%;
    transition: width 0.4s ease;
    border-radius: 10px;
}

.question-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #d35400;
    margin-bottom: 25px;
    text-align: left;
    line-height: 1.5;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: white;
    border: 2px solid transparent;
    color: var(--text-main);
    padding: 15px 20px;
    border-radius: 16px;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
}

.option-btn:hover {
    border-color: #ffb74d;
    background: #fff8e1;
    transform: translateX(5px);
}

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

.option-btn.selected {
    border-color: #ff8c00;
    background: #fff3e0;
    color: #d35400;
}

.quiz-footer {
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
}

/* 結果頁樣式 */
.result-image-wrapper {
    margin-bottom: 20px;
    aspect-ratio: 16/9;
}

.score-badge {
    display: inline-block;
    background: linear-gradient(to right, #ff8c00, #ff5e62);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.result-title {
    font-size: 1.5rem;
    color: #d35400;
    margin-bottom: 15px;
    line-height: 1.4;
}

.divider {
    height: 1px;
    width: 60%;
    background: linear-gradient(to right, transparent, rgba(211, 84, 0, 0.3), transparent);
    margin: 0 auto 20px;
}

.result-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-main);
    text-align: justify;
    margin-bottom: 20px;
}

/* CTA 按鈕區塊 */
.cta-container {
    margin: 10px 0 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cta-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00C300, #009900);
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 50px;
    width: 90%;
    box-shadow: 0 4px 15px rgba(0, 195, 0, 0.4);
    transition: all 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 195, 0, 0.6);
}

.cta-btn-sub {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 2px;
}

.cta-btn-main {
    font-size: 1.25rem;
    font-weight: 700;
}

.cta-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* 動畫 */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.fade-out {
    animation: fadeOut 0.4s ease forwards;
}

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

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}
