﻿body {
    transition: background 1s ease-in-out;
    position: relative;
    font-size: 200%;
}

/* ------------------- 灰色背景 ------------------- */
.bg-gray {
    background: linear-gradient(135deg, #f0f0f0, #ffffff);
    position: relative;
    overflow: hidden;
}

    /* 灰色微粒紋理 */
    .bg-gray::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: repeating-linear-gradient( 0deg, rgba(0,0,0,0.02), rgba(0,0,0,0.02) 1px, transparent 1px, transparent 3px );
        pointer-events: none;
    }

    /* 緩慢亮暗動畫 */
    .bg-gray::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05), transparent 70%);
        animation: grayPulse 4s ease-in-out infinite;
        pointer-events: none;
    }

.card-container {
    max-height: 100vh; /* 讓容器高度限制為視窗的 100% */
    overflow-y: auto; /* 當內容太多時自動出現垂直捲軸 */
    padding-right: 0.5rem; /* 避免滾動條壓住內容 */
}

.donationCardList {
    padding: 0 0.8rem 0 0.8rem;
    margin-top: 8.5rem;
    margin-bottom: 10rem;
}

[v-cloak] {
    display: none;
}

@media (max-width: 1200px) { /* XL 以下 */
    body {
        font-size: 3vw;
    }

    .floating-logo {
        top: -0.8rem;
    }

        .floating-logo img {
            width: 30rem !important;
        }
}

@media (max-width: 992px) { /* LG 以下 */
    body {
        font-size: 4vw;
    }

    .floating-logo {
        top: -0.6rem !important;
    }

        .floating-logo img {
            width: 25rem !important;
        }
}

@media (max-width: 768px) { /* MD 以下 */
    body {
        font-size: 5vw;
    }

    .floating-logo {
        top: -0.2rem !important;
    }

        .floating-logo img {
            width: 20rem !important;
        }
}

@media (max-width: 576px) { /* SM 以下 */
    body {
        font-size: 6vw;
    }

    .floating-logo {
        top: 0rem !important;
    }

        .floating-logo img {
            width: 20rem !important;
        }

    #searchName {
        width: 100% !important;
    }

    .floating-alert {
        font-size: 4vw !important;
    }

    .donationCardList {
        margin-top: 6rem;
    }
}

/* 確保段落、標題、列表等也跟著放大 */
p, h1, h2, h3, h4, h5, h6, li, a, span, div {
    font-size: inherit;
}

.floating-logo {
    position: fixed;
    top: -0.8rem;
    left: 1.4rem;
    z-index: 8888;
    opacity: 0.8;
    background: transparent;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

    .floating-logo img {
        width: 30rem;
        display: block;
    }

.floating-logo.hidden {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }

/*.card {
    transition: all 0.3s ease;
}

    .card:hover {
        transform: translateY(-5px) scale(1.03);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }*/

.fade-rise-enter-active {
    transition: all 0.6s ease;
}

.fade-rise-enter-from {
    opacity: 0;
    transform: translateY(20px);
}

.fade-rise-enter-to {
    opacity: 1;
    transform: translateY(0);
}

.premium-texture {
    background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    background-color: #fff8e1;
}

.golden-texture {
    background-color: #fdf6e3;
    background-image: url('https://www.transparenttextures.com/patterns/brushed-alum.png');
}

.paper-texture {
    background-image: url('https://www.transparenttextures.com/patterns/natural-paper.png');
    background-color: #fdfcfb;
}


.card-ivory {
    background: linear-gradient(to bottom, #fff8e1 10%, #fdf3c4 90%);
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.card-silver {
    background: linear-gradient(to bottom, #f5f7fa 10%, #e6e9f0 90%);
    border: 1px solid rgba(200, 200, 200, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-linen {
    background-color: #fffefb;
    background-image: url('https://www.transparenttextures.com/patterns/fabric-plaid.png');
    border: 1px solid rgba(222, 184, 135, 0.4);
    box-shadow: 0 3px 10px rgba(139, 69, 19, 0.1);
    background-blend-mode: multiply;
}

.card-papyrus {
    background-color: #fffdf4;
    background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    border: 1px solid rgba(218, 165, 32, 0.25);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.1);
}

.donor-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

/* 可擴展的階梯延遲：以變數統一計算，避免重複宣告 transition-delay */
/*.fade-rise-enter-active {
    transition-delay: calc(var(--stagger-index, 0) * .1s);
}*/

    /* 兼容現有前 12 個項目：僅設定索引變數，實際延遲由上方規則計算 */
    /*.fade-rise-enter-active:nth-child(1) {
        --stagger-index: 1;
    }

    .fade-rise-enter-active:nth-child(2) {
        --stagger-index: 2;
    }

    .fade-rise-enter-active:nth-child(3) {
        --stagger-index: 3;
    }

    .fade-rise-enter-active:nth-child(4) {
        --stagger-index: 4;
    }

    .fade-rise-enter-active:nth-child(5) {
        --stagger-index: 5;
    }

    .fade-rise-enter-active:nth-child(6) {
        --stagger-index: 6;
    }

    .fade-rise-enter-active:nth-child(7) {
        --stagger-index: 7;
    }

    .fade-rise-enter-active:nth-child(8) {
        --stagger-index: 8;
    }

    .fade-rise-enter-active:nth-child(9) {
        --stagger-index: 9;
    }

    .fade-rise-enter-active:nth-child(10) {
        --stagger-index: 10;
    }

    .fade-rise-enter-active:nth-child(11) {
        --stagger-index: 11;
    }

    .fade-rise-enter-active:nth-child(12) {
        --stagger-index: 12;
    }*/