/* ===== CSS變數定義 ===== */
:root {
    /* 配色系統 */
    --gold-primary: #FFD700;
    --gold-secondary: #FFA500;
    --gold-dark: #B8860B;
    --gold-light: #FFEB3B;
    --orange-bg: #FF8C00;
    --orange-light: #FFB347;
    --red-primary: #DC143C;
    --red-dark: #C41E3A;
    --brown-text: #4A2511;
    --brown-light: #6B4423;
    --cream: #FFF8DC;
    --white: #FFFFFF;
    
    /* 漸層 */
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    --gradient-orange: linear-gradient(180deg, #FF8C00 0%, #FFA500 50%, #FFD700 100%);
    --gradient-red: linear-gradient(135deg, #DC143C 0%, #C41E3A 100%);
    
    /* 陰影 */
    --shadow-soft: 0 4px 20px rgba(255, 165, 0, 0.3);
    --shadow-medium: 0 8px 30px rgba(255, 140, 0, 0.4);
    --shadow-strong: 0 12px 40px rgba(220, 20, 60, 0.5);
    --shadow-text: 2px 2px 4px rgba(74, 37, 17, 0.3);
    
    /* 字體 */
    --font-serif: 'Noto Serif TC', serif;
    --font-sans: 'Noto Sans TC', sans-serif;
}

/* ===== 基礎重置與設置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--brown-text);
    overflow-x: hidden;
    min-height: 100vh;
    background: var(--gradient-orange);
    position: relative;
}

/* ===== 祥雲動態背景 ===== */
.clouds-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60'%3E%3Cpath d='M 20 40 Q 30 20 50 30 Q 70 20 90 30 Q 110 15 130 30 Q 150 25 170 35 Q 180 40 180 45 L 20 45 Z' fill='%23FFD700' opacity='0.15'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    animation: cloudFloat 60s linear infinite;
}

.cloud-1 {
    width: 300px;
    height: 90px;
    top: 10%;
    left: -300px;
    animation-duration: 80s;
    opacity: 0.6;
}

.cloud-2 {
    width: 250px;
    height: 75px;
    top: 30%;
    left: -250px;
    animation-duration: 100s;
    animation-delay: 10s;
    opacity: 0.5;
}

.cloud-3 {
    width: 350px;
    height: 105px;
    top: 60%;
    left: -350px;
    animation-duration: 90s;
    animation-delay: 20s;
    opacity: 0.4;
}

.cloud-4 {
    width: 280px;
    height: 84px;
    top: 80%;
    left: -280px;
    animation-duration: 110s;
    animation-delay: 15s;
    opacity: 0.5;
}

@keyframes cloudFloat {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(100vw + 400px));
    }
}

/* ===== 主容器 ===== */
.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== 畫面切換 ===== */
.screen {
    display: none;
    width: 100%;
    max-width: 500px;
    animation: fadeIn 0.5s ease-out;
}

.screen.active {
    display: block;
}

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

/* ===== 廟宇頭部 ===== */
.temple-header {
    text-align: center;
    margin-bottom: 40px;
    animation: templeEntrance 1s ease-out;
}

@keyframes templeEntrance {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.god-icon {
    font-size: 5rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.6));
    animation: godFloat 3s ease-in-out infinite;
}

@keyframes godFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.temple-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--red-primary);
    text-shadow: 
        3px 3px 0px var(--gold-primary),
        6px 6px 10px rgba(220, 20, 60, 0.4);
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.year-subtitle {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-dark);
    text-shadow: var(--shadow-text);
    margin-bottom: 15px;
}

.lucky-phrase {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--brown-text);
    opacity: 0.9;
}

/* ===== 小型廟宇頭部 ===== */
.temple-header-small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.god-icon-small {
    font-size: 2rem;
    filter: drop-shadow(0 2px 5px rgba(255, 215, 0, 0.6));
}

.temple-name-small {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--red-primary);
    text-shadow: 1px 1px 2px var(--gold-primary);
}

/* ===== 歡迎內容 ===== */
.welcome-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.instruction-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-medium);
    border: 3px solid var(--gold-primary);
}

.instruction-card h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--red-primary);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: var(--shadow-text);
}

.instruction-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.instruction-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--brown-text);
}

.step-number {
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* ===== 擲筊指南 ===== */
.jiao-guide {
    background: var(--gradient-gold);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jiao-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 15px;
    border-radius: 10px;
    transition: transform 0.2s;
}

.jiao-item:hover {
    transform: translateX(5px);
}

.jiao-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.jiao-label {
    font-weight: 700;
    color: var(--red-primary);
    min-width: 60px;
}

.jiao-desc {
    color: var(--brown-light);
    font-size: 0.95rem;
}

/* ===== 按鈕樣式 ===== */
.main-btn {
    width: 100%;
    padding: 18px 30px;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-serif);
    color: var(--white);
    background: var(--gradient-red);
    border: none;
    border-radius: 50px;
    box-shadow: var(--shadow-strong);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.main-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.main-btn:hover::before {
    width: 300px;
    height: 300px;
}

.main-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(220, 20, 60, 0.6);
}

.main-btn:active {
    transform: translateY(0);
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* ===== 抽籤畫面 ===== */
.draw-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.signature-display {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

/* ===== 竹籤樣式 ===== */
.bamboo-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-medium);
}

.bamboo-stick {
    width: 50px;
    height: 280px;
    background: linear-gradient(135deg, #D4A574 0%, #E8C89C 50%, #D4A574 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 0 2px 10px rgba(255, 255, 255, 0.5),
        inset 0 -2px 10px rgba(139, 69, 19, 0.3),
        0 4px 15px rgba(139, 69, 19, 0.4);
    border: 2px solid #B8860B;
    position: relative;
    transition: all 0.3s ease;
}

.bamboo-stick::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: rgba(139, 69, 19, 0.3);
}

.bamboo-stick::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: rgba(139, 69, 19, 0.3);
}

.bamboo-stick.center {
    height: 320px;
    width: 60px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    transform: translateY(-10px);
}

.bamboo-stick.highlight {
    animation: highlightPulse 2s ease-in-out infinite;
}

@keyframes highlightPulse {
    0%, 100% {
        transform: translateY(-10px) scale(1);
        box-shadow: 
            inset 0 2px 10px rgba(255, 255, 255, 0.5),
            inset 0 -2px 10px rgba(255, 140, 0, 0.3),
            0 4px 15px rgba(255, 140, 0, 0.4);
    }
    50% {
        transform: translateY(-15px) scale(1.05);
        box-shadow: 
            inset 0 2px 10px rgba(255, 255, 255, 0.7),
            inset 0 -2px 10px rgba(255, 140, 0, 0.5),
            0 8px 30px rgba(255, 140, 0, 0.6);
    }
}

.bamboo-text {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--red-primary);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.bamboo-number-large {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--red-primary);
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

/* ===== 籤字滾動動畫 ===== */
.rolling {
    animation: numberRoll 0.1s linear infinite;
}

@keyframes numberRoll {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(-10px); opacity: 0.5; }
    100% { transform: translateY(0); opacity: 1; }
}

.draw-instruction {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--brown-text);
    text-align: center;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
}

/* ===== 結果畫面 ===== */
.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.signature-result {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.result-instruction {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--brown-text);
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
}

.result-instruction p {
    margin: 5px 0;
}

.emphasis {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--red-primary);
    margin-top: 10px !important;
}

/* ===== 擲筊動畫 ===== */
.jiao-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    min-height: 300px;
}

.jiao-blocks {
    display: flex;
    gap: 30px;
}

.jiao-block {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    animation: jiaoRotate 1s ease-in-out infinite;
}

.jiao-red {
    background: var(--gradient-red);
    box-shadow: 0 10px 30px rgba(220, 20, 60, 0.5);
}

.jiao-block:nth-child(2) {
    animation-delay: 0.3s;
}

@keyframes jiaoRotate {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(180deg) scale(1.2);
    }
    50% {
        transform: rotate(360deg) scale(1);
    }
    75% {
        transform: rotate(540deg) scale(1.2);
    }
}

.jiao-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brown-text);
    text-shadow: var(--shadow-text);
}

/* ===== 擲筊結果 ===== */
.jiao-result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 40px 20px;
}

.jiao-result-icon {
    font-size: 6rem;
    animation: resultBounce 1s ease-out;
}

@keyframes resultBounce {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.jiao-result-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 900;
    color: var(--red-primary);
    text-shadow: 2px 2px 4px var(--gold-primary);
}

.jiao-result-desc {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--brown-text);
    text-align: center;
}

/* ===== 解籤內容 ===== */
.interpretation-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-medium);
    border: 3px solid var(--gold-primary);
    animation: fadeIn 0.5s ease-out;
}

.signature-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gold-primary);
}

.signature-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--red-primary);
    margin-bottom: 10px;
}

.signature-level {
    display: inline-block;
    padding: 8px 20px;
    background: var(--gradient-gold);
    border-radius: 20px;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brown-text);
    box-shadow: var(--shadow-soft);
}

.signature-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-dark);
    margin-top: 10px;
}

.poem-section {
    margin: 25px 0;
}

.poem-section h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--red-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.poem-lines {
    background: var(--cream);
    border-left: 4px solid var(--gold-dark);
    padding: 20px;
    border-radius: 10px;
}

.poem-line {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 2;
    color: var(--brown-text);
}

.interpretation-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--brown-text);
    margin: 20px 0;
}

.fortune-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.fortune-item {
    background: var(--cream);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.fortune-label {
    font-weight: 700;
    color: var(--red-primary);
    margin-bottom: 8px;
}

.fortune-stars {
    color: var(--gold-dark);
    font-size: 1.1rem;
}

.advice-box {
    background: var(--gradient-gold);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin: 20px 0;
}

.advice-box strong {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--red-primary);
}

.keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.keyword-tag {
    padding: 8px 16px;
    background: rgba(255, 165, 0, 0.2);
    border: 2px solid var(--gold-dark);
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brown-text);
}

/* ===== 操作按鈕 ===== */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.action-btn {
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.save-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.print-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
}

.share-btn {
    background: var(--gradient-gold);
    color: var(--brown-text);
}

.restart-btn {
    background: var(--gradient-red);
    color: white;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.action-btn:active {
    transform: translateY(0);
}

/* ===== 分享選單 ===== */
.share-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.share-menu.active {
    display: block;
}

.share-menu-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.share-menu-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 25px 25px 0 0;
    padding: 30px 20px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.share-menu-content h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--brown-text);
    text-align: center;
    margin-bottom: 20px;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--cream);
    border: 2px solid var(--gold-primary);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--brown-text);
}

.share-item:hover {
    background: var(--gradient-gold);
    transform: translateY(-3px);
}

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

.close-share-btn {
    width: 100%;
    padding: 15px;
    background: var(--gradient-red);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-share-btn:hover {
    transform: translateY(-3px);
}

/* ===== PM Mayors Floater ===== */
.pm-floater {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 998;
    animation: floaterBounce 3s ease-in-out infinite;
}

@keyframes floaterBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.pm-floater a {
    text-decoration: none;
    display: block;
}

.floater-content {
    background: var(--gradient-gold);
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: var(--shadow-strong);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 2px solid var(--gold-dark);
}

.floater-content:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(255, 165, 0, 0.6);
}

.floater-icon {
    font-size: 1.5rem;
}

.floater-text {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--brown-text);
}

/* ===== Language Switcher ===== */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
}

.lang-options {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--gold-dark);
    border-radius: 50px;
    padding: 4px;
    box-shadow: var(--shadow-soft);
}

.lang-option {
    background: transparent;
    border: none;
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--brown-light);
    min-width: 65px;
}

.lang-option:hover {
    color: var(--brown-text);
}

.lang-option.active {
    background: var(--gradient-gold);
    color: var(--brown-text);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.lang-option:active {
    transform: scale(0.95);
}

/* ===== Toast通知 ===== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--brown-text);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: var(--shadow-strong);
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 600;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== 響應式設計 ===== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .temple-title {
        font-size: 2rem;
    }
    
    .year-subtitle {
        font-size: 1.2rem;
    }
    
    .bamboo-stick {
        width: 40px;
        height: 220px;
    }
    
    .bamboo-stick.center {
        width: 50px;
        height: 260px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .fortune-grid {
        grid-template-columns: 1fr;
    }
    
    .language-switcher {
        top: 15px;
        right: 15px;
    }
    
    .lang-option {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: 55px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    /* 手機版隱藏另存圖片按鈕 */
    .save-btn {
        display: none !important;
    }
    
    .instruction-card {
        padding: 20px;
    }
    
    .bamboo-stick {
        width: 35px;
        height: 180px;
        gap: 5px;
    }
    
    .bamboo-stick.center {
        width: 45px;
        height: 220px;
    }
    
    .bamboo-text {
        font-size: 1.4rem;
    }
    
    .bamboo-number-large {
        font-size: 2.5rem;
    }
    
    .pm-floater {
        top: 15px;
        left: 15px;
    }
    
    .floater-content {
        padding: 10px 15px;
    }
    
    .floater-icon {
        font-size: 1.2rem;
    }
    
    .floater-text {
        font-size: 0.8rem;
    }
    
    .language-switcher {
        top: 10px;
        right: 10px;
    }
    
    .lang-options {
        padding: 3px;
    }
    
    .lang-option {
        padding: 5px 10px;
        font-size: 0.75rem;
        min-width: 50px;
    }
}

/* ===== 列印樣式 ===== */
@media print {
    body {
        background: white;
        margin: 0;
        padding: 0;
    }
    
    /* 隱藏所有不需要列印的元素 */
    .clouds-bg,
    .pm-floater,
    .action-buttons,
    .temple-header-small,
    .language-switcher,
    .welcome-screen,
    .draw-screen,
    .result-screen,
    .jiao-screen,
    .share-menu,
    .toast {
        display: none !important;
    }
    
    /* 只顯示解籤內容 */
    .interpretation-screen {
        display: block !important;
        position: static !important;
        opacity: 1 !important;
        transform: none !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    .interpretation-content {
        box-shadow: none;
        border: 2px solid #ccc;
        page-break-inside: avoid !important;
        page-break-before: avoid !important;
        page-break-after: avoid !important;
        max-width: 100%;
        margin: 0;
        padding: 15px;
        font-size: 0.9rem;
    }
    
    /* 確保所有內部元素不分頁 */
    .signature-header,
    .poem-section,
    .interpretation-section,
    .fortune-section,
    .advice-box,
    .keywords {
        page-break-inside: avoid !important;
        margin-bottom: 10px;
    }
    
    /* 調整標題大小 */
    .signature-header h3,
    .poem-section h3,
    .interpretation-section h3,
    .fortune-section h3 {
        font-size: 1rem;
        margin: 8px 0;
    }
    
    /* 調整運勢網格 */
    .fortune-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        page-break-inside: avoid !important;
    }
    
    /* 避免空白頁 */
    .screen {
        page-break-after: avoid !important;
    }
    
    /* 設定頁面大小 */
    @page {
        margin: 1.5cm 1cm;
        size: A4 portrait;
    }
    
    /* 確保內容不超過頁面 */
    * {
        max-width: 100% !important;
        box-sizing: border-box;
    }
}
    }
}
