/**
 * 金秋主題 (Autumn)
 * 深棕到金黃漸層，楓葉飄落
 * 適合：溫暖懷念、感恩、成熟豐盛的紀念氛圍
 */

.theme-autumn {
    --theme-primary: #92400e;
    --theme-secondary: #b45309;
    --theme-accent: #f59e0b;
    --theme-bg-start: #1c0f0a;
    --theme-bg-end: #d97706;
    --theme-text: #fffbeb;
    --theme-text-light: #fde68a;
}

.theme-autumn.memorial-view-page {
    background: linear-gradient(180deg,
        #1c0f0a 0%,
        #451a03 20%,
        #78350f 40%,
        #92400e 60%,
        #b45309 80%,
        #d97706 100%
    );
    min-height: 100vh;
    position: relative;
}

/* 楓葉飄落效果 - 極少量優雅飄落（關閉 repeat）*/
.theme-autumn.memorial-view-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%23f59e0b' opacity='0.4'%3E%3Cpath d='M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='%23ea580c' opacity='0.35'%3E%3Cpath d='M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z'/%3E%3C/svg%3E");
    background-position: 15% 0%, 75% -15%;
    background-size: 20px 20px, 18px 18px;
    background-repeat: no-repeat;  /* 關鍵：不重複 */
    animation: autumnLeaves 30s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes autumnLeaves {
    0% {
        background-position: 15% -100vh, 75% -115vh;
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(10deg);
    }
    50% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(6deg);
    }
    100% {
        background-position: 17% 110vh, 77% 110vh;
        transform: rotate(0deg);
    }
}

.theme-autumn .memorial-cover {
    background: linear-gradient(180deg,
        #1c0f0a 0%,
        #451a03 25%,
        #78350f 50%,
        #92400e 75%,
        #b45309 100%
    );
    position: relative;
}

/* 溫暖光暈效果 */
.theme-autumn .memorial-cover::before {
    content: '';
    position: absolute;
    top: 60%;
    left: 50%;
    width: 220%;
    height: 130%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        ellipse at center bottom,
        rgba(245, 158, 11, 0.3) 0%,
        rgba(217, 119, 6, 0.2) 35%,
        rgba(180, 83, 9, 0.1) 60%,
        transparent 80%
    );
    animation: autumnWarmth 7s ease-in-out infinite;
}

@keyframes autumnWarmth {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Hero 遮罩底部邊框顏色 - 與波浪一致 */
.theme-autumn .hero-cover-overlay {
    border-bottom-color: #311507;
}

/* 波浪過渡 - 底部與背景色銜接 */
.theme-autumn .memorial-cover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 120px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='rgb(98, 42, 10)' d='M0,160L48,176C96,192,192,224,288,224C384,224,480,192,576,165.3C672,139,768,117,864,133.3C960,149,1056,203,1152,213.3C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    background-position: center bottom;
    pointer-events: none;
    z-index: 1;
}

.theme-autumn .memorial-profile-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(245, 158, 11, 0.35);
    border-top-color: #311507;  /* 頂部邊框使用波浪顏色 */
}

.theme-autumn .memorial-section {
    background: rgba(98, 42, 10, 0.97);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.theme-autumn .memorial-tribute-section {
    background: linear-gradient(135deg, rgba(146, 64, 14, 0.1) 0%, rgba(245, 158, 11, 0.08) 100%);
}

/* 蠟燭特效 - 金黃溫暖火焰 */
.theme-autumn .memorial-tribute-btn[data-type="candle"].active .memorial-tribute-icon {
    animation: autumnCandle 1.8s ease-in-out infinite;
}

@keyframes autumnCandle {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 6px #f59e0b);
    }
    50% {
        filter: brightness(1.4) drop-shadow(0 0 16px #d97706) drop-shadow(0 0 10px #fbbf24);
    }
}

/* 花朵特效 - 楓葉飄舞 */
.theme-autumn .memorial-tribute-btn[data-type="flower"].active .memorial-tribute-icon {
    animation: autumnFlower 1.5s ease-out;
}

@keyframes autumnFlower {
    0% { transform: scale(1) rotate(0deg); }
    30% { transform: scale(1.15) rotate(-15deg); }
    60% { transform: scale(1.2) rotate(15deg); filter: brightness(1.2) drop-shadow(0 0 8px #f59e0b); }
    100% { transform: scale(1) rotate(0deg); }
}

/* 文字顏色調整 - 白色卡片上用深色，深色背景上用淺色 */
.theme-autumn .memorial-name {
    color: #451a03;
    font-weight: 600;
}

.theme-autumn .memorial-epitaph {
    color: #78350f;
}

.theme-autumn .memorial-dates {
    color: #92400e;
}

/* 背景區域文字使用淺色 */
.theme-autumn .memorial-tribute-section h3,
.theme-autumn .memorial-tribute-section .memorial-section-title,
.theme-autumn .memorial-tribute-section .section-title {
    color: #fffbeb !important;
}

.theme-autumn .memorial-tribute-section p,
.theme-autumn .memorial-tribute-section .memorial-tribute-desc,
.theme-autumn .memorial-tribute-section .candle-label,
.theme-autumn .memorial-tribute-section .flower-label {
    color: #fde68a !important;
}

/* 祈福計數文字 */
.theme-autumn #candleCount,
.theme-autumn #flowerCount {
    color: #fbbf24 !important;
}

/* 區塊內文字顏色 - 深色卡片用淺色文字 */
.theme-autumn .memorial-section p,
.theme-autumn .memorial-section .timeline-desc,
.theme-autumn .memorial-message-text {
    color: #fffbeb;
}

/* 時間軸特色 - 秋色漸層 */
.theme-autumn .memorial-timeline-dot {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

.theme-autumn .memorial-timeline-line {
    background: linear-gradient(180deg, #f59e0b, #fbbf24);
}

.theme-autumn .memorial-timeline-date {
    color: #fbbf24;
    font-weight: 700;
}

.theme-autumn .memorial-timeline-title {
    color: #fffbeb;
    font-weight: 700;
}

.theme-autumn .memorial-timeline-desc {
    color: #fde68a !important;
}

/* 留言卡片 */
.theme-autumn .memorial-message-card {
    border-left: 3px solid #f59e0b;
}

.theme-autumn .memorial-message-author {
    color: #fbbf24;
}

/* 年齡標籤 - 金秋漸層 */
.theme-autumn .memorial-age {
    background: linear-gradient(90deg, #92400e, #f59e0b);
    font-weight: 600;
}

/* 區塊標題 - 深色卡片用淺色文字 */
.theme-autumn .memorial-section-title {
    color: #fffbeb;
    font-weight: 700;
}

.theme-autumn .memorial-section-title .material-icons {
    color: #fbbf24;
}

/* 按鈕樣式 */
.theme-autumn .memorial-tribute-btn:hover {
    border-color: #b45309;
    background: rgba(180, 83, 9, 0.08);
}

.theme-autumn .memorial-tribute-btn.active {
    border-color: #92400e;
    background: rgba(146, 64, 14, 0.12);
}

/* 相簿圖片邊框 - 秋葉金邊 */
.theme-autumn .memorial-gallery-item {
    border: 2px solid rgba(245, 158, 11, 0.4);
}

.theme-autumn .memorial-gallery-item:hover {
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}
