/* 年糕網站 - 主樣式表 */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700;900&display=swap');

/* ========== 表情下雨特效 ========== */
.emoji-drop {
    position: absolute;
    top: -50px;
    animation-name: emojiFall;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes emojiFall {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--drift, 0px), 110vh) rotate(360deg);
        opacity: 0;
    }
}

/* ========== 櫻花環特效 ========== */
.flower-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 25;
    animation: slowRotateRing 20s linear infinite;
}

.flower-item {
    position: absolute;
    font-size: 1.8rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

@keyframes slowRotateRing {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 768px) {
    .flower-item {
        font-size: 1.25rem;
    }
}

/* ========== 全域樣式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ea580c;
    --primary-light: #fb923c;
    --primary-dark: #c2410c;
    --bg-cream: #fff7ed;
    --bg-light: #ffedd5;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'M PLUS Rounded 1c', 'Nunito', sans-serif;
    scroll-behavior: smooth;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.7;
    letter-spacing: 0.03em;
}

/* ========== 自定義捲軸 ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

/* ========== 漸變背景 ========== */
.cat-gradient {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 30%, #fed7aa 70%, #fdba74 100%);
    position: relative;
    overflow: hidden;
}

.cat-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.1) 0%, transparent 70%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(10%, 10%) rotate(180deg);
    }
}

/* ========== 導航列 ========== */
nav {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

nav a {
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* ========== 按鈕樣式 ========== */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.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 ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.95);
}

/* ========== 照片卡片 ========== */
.photo-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.photo-card:hover img {
    transform: scale(1.1);
}

.photo-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: white;
}

.photo-card:hover .overlay {
    opacity: 1;
}

/* ========== 資訊卡片 ========== */
.info-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* ========== 動畫效果 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

.bounce-in {
    animation: bounceIn 0.6s ease forwards;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ========== 燈箱模態框 ========== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 85%;
    max-height: 85vh;
    animation: bounceIn 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.lightbox-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
    font-weight: bold;
}

.lightbox-close:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
    font-weight: bold;
}

.lightbox-nav:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    position: absolute;
    bottom: -80px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

/* ========== 載入動畫 ========== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 響應式設計 ========== */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .lightbox-content img {
        max-height: 70vh;
        border-radius: 12px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .photo-card:hover {
        transform: translateY(-4px);
    }
}

/* ========== 粒子效果 ========== */
.particle {
    position: fixed;
    pointer-events: none;
    animation: particleFloat 2s ease-out forwards;
    z-index: 9998;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

/* ========== 貓爪印軌跡 ========== */
.paw-print {
    position: fixed;
    width: 20px;
    height: 20px;
    pointer-events: none;
    opacity: 0.6;
    animation: pawFade 1.5s ease-out forwards;
    z-index: 1;
}

@keyframes pawFade {
    0% {
        opacity: 0.6;
        transform: scale(0) rotate(0deg);
    }

    50% {
        transform: scale(1) rotate(20deg);
    }

    100% {
        opacity: 0;
        transform: scale(0.8) rotate(40deg);
    }
}

/* ========== 移動端菜單 ========== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    padding: 80px 30px 30px;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    display: block;
    padding: 15px 0;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--primary);
    padding-left: 10px;
}

/* ========== 頭像框動畫 ========== */
.avatar-container {
    position: relative;
}

.avatar-container::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-light), var(--primary), var(--primary-light));
    opacity: 0.3;
    filter: blur(20px);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* ========== 現代風格光暈頭像框（含自訂相框） ========== */
.modern-avatar-wrapper {
    position: relative;
    z-index: 20;
    animation: float 4s ease-in-out infinite;
}

.avatar-halo {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffedd5 0%, #fdba74 25%, #ea580c 50%, #fdba74 75%, #ffedd5 100%);
    background-size: 200% 200%;
    animation: gradientHalo 5s ease infinite;
    z-index: 5;
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.3);
}

.avatar-halo::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background-color: white;
    /* 內環留白效果 */
}

.avatar-dashed-ring {
    position: absolute;
    inset: -28px;
    border-radius: 50%;
    border: 3px dashed rgba(234, 88, 12, 0.5);
    animation: slowRotate 15s linear infinite reverse;
    z-index: 6;
    pointer-events: none;
}

@keyframes gradientHalo {
    0% {
        background-position: 0% 50%;
        transform: scale(1);
    }

    50% {
        background-position: 100% 50%;
        transform: scale(1.02);
    }

    100% {
        background-position: 0% 50%;
        transform: scale(1);
    }
}

@keyframes slowRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .avatar-halo {
        inset: -10px;
    }

    .avatar-halo::before {
        inset: 4px;
    }

    .avatar-dashed-ring {
        inset: -20px;
    }
}

/* ========== 區塊進場動畫 ========== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 個性描述區塊旋轉漸變背景 ========== */
.personality-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #ffe8f3, #d9f3ff);
}

.personality-container::before,
.personality-container::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            #ff9aa2,
            /* Soft pink */
            #ffb7b2,
            /* Light peach */
            #ffdac1,
            /* Pastel yellow */
            #e2f0cb,
            /* Mint green */
            #a2e4ff,
            /* Baby blue */
            #c9afff,
            /* Lavender */
            #ffb7b2,
            #ff9aa2);
    transform: translate(-50%, -50%);
    animation: rotate 8s linear infinite;
    filter: blur(50px);
    opacity: 0.8;
}

/* Secondary rotating layer for depth */
.personality-container::after {
    width: 180%;
    height: 180%;
    animation: rotate-reverse 10s linear infinite;
    opacity: 0.6;
}

/* Rotating animations */
@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes rotate-reverse {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

.personality-content {
    background: rgba(255, 182, 193, 0.65);
    backdrop-filter: blur(10px);
}

/* ========== Glassmorphism 效果 ========== */
.glass-nav {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(234, 88, 12, 0.15);
}

.glass-menu {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

/* ========== 時光軸樣式 ========== */
.timeline {
    position: relative;
    padding: 2rem 0;
}

/* 中央線 */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    border-radius: 2px;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    width: 100%;
}

.timeline-content {
    position: relative;
    width: calc(50% - 40px);
    padding: 0 2rem;
}

/* 左側項目 */
.timeline-item[data-side="left"] .timeline-content {
    margin-left: 0;
    text-align: right;
}

/* 右側項目 */
.timeline-item[data-side="right"] .timeline-content {
    margin-left: calc(50% + 40px);
    text-align: left;
}

/* 中間特色項目 */
.timeline-item[data-side="center"] .timeline-content {
    width: calc(100% - 80px);
    margin: 0 auto;
    text-align: center;
}

.timeline-featured .timeline-card {
    max-width: 600px;
    margin: 0 auto;
}

/* 時間標記 */
.timeline-date {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

/* 時間節點圓點 */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 4px solid var(--bg-cream);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.2);
}

.timeline-item[data-side="center"]::before {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    animation: pulse 2s ease-in-out infinite;
}

/* 卡片樣式 */
.timeline-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.timeline-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.timeline-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.timeline-card:hover .timeline-img {
    transform: scale(1.1);
}

.timeline-info {
    padding: 1.5rem;
}

.timeline-info h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.timeline-info p {
    color: var(--text-light);
    line-height: 1.6;
}

/* 移動端響應式 */
@media (max-width: 768px) {
    .timeline-item::before {
        left: 20px;
    }

    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        text-align: left !important;
        padding: 0 1rem;
    }

    .timeline-item[data-side="center"] .timeline-content {
        width: calc(100% - 60px);
    }

    .timeline-img {
        height: 200px;
    }
}

/* ========== 日常點滴 - 碎碎念卡片 ========== */
.whisper-card {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid var(--primary-light);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.whisper-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.1) 0%, transparent 70%);
    animation: whisperGlow 4s ease-in-out infinite;
}

@keyframes whisperGlow {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.5;
    }

    50% {
        transform: translate(-20%, -20%);
        opacity: 0.8;
    }
}

.whisper-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.2);
    border-color: var(--primary);
}

.whisper-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.whisper-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    font-style: italic;
}

.whisper-time {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ========== 年糕碎碎念彈窗 ========== */
.cat-whisper-popup {
    position: fixed;
    bottom: -500px;
    right: 2rem;
    z-index: 9999;
    transition: bottom 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cat-whisper-popup.active {
    bottom: 2rem;
}

.cat-whisper-content {
    background: white;
    border-radius: 25px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 350px;
    position: relative;
    border: 3px solid var(--primary-light);
}

.cat-whisper-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.cat-whisper-close:hover {
    transform: rotate(90deg) scale(1.1);
    background: var(--primary-dark);
}

.cat-whisper-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
    margin: 0 auto 1rem;
    box-shadow: var(--shadow);
}

.cat-whisper-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-whisper-bubble {
    background: linear-gradient(135deg, #ffe8f3, #fff7ed);
    border-radius: 20px;
    padding: 1.25rem;
    position: relative;
    margin-bottom: 1rem;
}

.cat-whisper-bubble::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #ffe8f3;
}

.cat-whisper-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.cat-whisper-msg {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dark);
    font-style: italic;
}

.paw-decoration {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    opacity: 0.6;
}

.cat-whisper-next {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.3);
}

.cat-whisper-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.cat-whisper-next:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .cat-whisper-popup {
        right: 1rem;
        left: 1rem;
    }

    .cat-whisper-popup.active {
        bottom: 1rem;
    }

    .cat-whisper-content {
        max-width: 100%;
    }
}

/* 平滑過渡 */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ========== 滾動進度指示器 ========== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), #fbbf24);
    z-index: 10000;
    transition: width 0.1s ease;
    box-shadow: 0 2px 10px rgba(234, 88, 12, 0.5);
}

/* ========== 浮動操作按鈕組 ========== */
.floating-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(234, 88, 12, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.floating-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.floating-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(234, 88, 12, 0.7);
}

.floating-btn:hover::before {
    opacity: 1;
}

.floating-btn i,
.floating-btn svg {
    position: relative;
    z-index: 1;
    width: 24px;
    height: 24px;
}

.floating-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* 停用音樂按鈕樣式 */
.floating-btn.music-off {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    box-shadow: 0 4px 20px rgba(100, 116, 139, 0.5);
}

/* 移動端調整 */
@media (max-width: 768px) {
    .floating-actions {
        bottom: 1rem;
        right: 1rem;
        gap: 0.5rem;
    }

    .floating-btn {
        width: 48px;
        height: 48px;
    }

    .floating-btn i,
    .floating-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* ========== 背景音樂播放器 ========== */
.music-player {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateY(200px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(234, 88, 12, 0.3);
}

.music-player.active {
    transform: translateY(0);
    opacity: 1;
}

.music-player-icon {
    font-size: 2rem;
    animation: musicPulse 1s ease-in-out infinite;
}

@keyframes musicPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.music-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.music-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.music-artist {
    font-size: 0.75rem;
    color: var(--text-light);
}

.music-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.music-control-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.music-control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.5);
}

.volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    outline: none;
    border-radius: 10px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: white;
    border: 2px solid var(--primary);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: white;
    border: 2px solid var(--primary);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 移動端音樂播放器 */
@media (max-width: 768px) {
    .music-player {
        bottom: auto;
        top: 80px;
        left: 1rem;
        right: 1rem;
        max-width: calc(100% - 2rem);
        padding: 0.75rem 1rem;
    }

    .volume-slider {
        width: 60px;
    }
}

/* ========== 畫廊瀑布流/網格排版 ========== */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    grid-auto-rows: 200px;
    /* 基礎高度 */
    grid-auto-flow: dense;
}

@media (min-width: 768px) {
    .gallery-masonry {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
        grid-auto-rows: 250px;
    }
}

.gallery-item {
    width: 100%;
    height: 100%;
}

.gallery-item.row-span-2 {
    grid-row: span 2;
}

.gallery-item.col-span-2 {
    grid-column: span 2;
}

/* 確保影片靜音自動播放時能完整填滿卡片 */
.gallery-item video {
    pointer-events: none;
}

/* ========== 載入動畫遮罩 ========== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-cat {
    font-size: 5rem;
    animation: loaderBounce 1s ease-in-out infinite;
}

@keyframes loaderBounce {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

.loader-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    animation: loaderFade 1.5s ease-in-out infinite;
}

@keyframes loaderFade {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

.loader-paws {
    display: flex;
    gap: 1rem;
}

.loader-paw {
    font-size: 2rem;
    animation: pawWave 1.2s ease-in-out infinite;
}

.loader-paw:nth-child(1) {
    animation-delay: 0s;
}

.loader-paw:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-paw:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pawWave {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* ========== 3D 卡片翻轉效果 ========== */
.flip-card {
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: white;
    text-align: center;
}

/* ========== 星空背景效果 ========== */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* ========== 照片懸停放大效果 ========== */
.photo-zoom {
    position: relative;
    overflow: hidden;
}

.photo-zoom:hover img {
    transform: scale(1.2);
    filter: brightness(1.1);
}

/* ========== 滾動提示箭頭 ========== */
.scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2s ease-in-out infinite;
    z-index: 10;
    color: var(--primary);
    font-size: 2rem;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(15px);
    }
}

/* ========== 愛心收藏按鈕 ========== */
.favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
}

.photo-card:hover .favorite-btn {
    opacity: 1;
}

.favorite-btn i {
    color: #ef4444;
    transition: all 0.3s ease;
}

.favorite-btn.active i {
    fill: #ef4444;
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1.1);
    }

    75% {
        transform: scale(1.2);
    }
}

.favorite-btn:hover {
    transform: scale(1.1);
    background: white;
}

/* ========== 載入骨架屏 ========== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    border-radius: 20px;
    overflow: hidden;
}

.skeleton-img {
    width: 100%;
    height: 200px;
}

.skeleton-text {
    height: 20px;
    margin: 10px;
    border-radius: 4px;
}

/* ========== 互動提示工具 ========== */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10000;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 10000;
}

/* ========== 煙火特效 ========== */
.firework {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
}

.firework-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: fireworkExplode 1s ease-out forwards;
}

@keyframes fireworkExplode {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

/* ========== 節日主題效果 ========== */
.falling-element {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        top: 100vh;
        transform: translateX(var(--wind)) rotate(360deg);
    }
}

/* 雪花 */
.snowflake {
    color: #fff;
    font-size: 1.5rem;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

/* 櫻花 */
.sakura {
    color: #ffb7c5;
    font-size: 1.5rem;
}

/* 愛心 */
.heart-fall {
    color: #ff6b9d;
    font-size: 1.2rem;
}

/* ========== 性能優化 ========== */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* 減少移動端動畫 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}