/* ===========================
   CSS 變數與重置
   =========================== */
:root {
    --chinese-red: #C8102E;
    --deep-red: #8B0000;
    --bright-red: #DC143C;
    --gold: #FFD700;
    --dark-gold: #DAA520;
    --light-gold: #FFF8DC;
    --cream: #FFF5F5;
    --ivory: #FFFAF0;
    --charcoal: #2B2B2B;
    --soft-black: #1a1a1a;
    --shadow-soft: 0 10px 40px rgba(200, 16, 46, 0.15);
    --shadow-medium: 0 15px 50px rgba(200, 16, 46, 0.25);
    --shadow-strong: 0 20px 60px rgba(200, 16, 46, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cormorant Garamond', 'Noto Serif TC', serif;
    background: linear-gradient(135deg, var(--ivory) 0%, var(--cream) 50%, var(--light-gold) 100%);
    color: var(--charcoal);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===========================
   背景裝飾
   =========================== */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-seed {
    position: absolute;
    font-size: 2rem;
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
}

.seed-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.seed-2 {
    top: 60%;
    right: 10%;
    animation-delay: 5s;
    animation-duration: 30s;
}

.seed-3 {
    bottom: 20%;
    left: 15%;
    animation-delay: 10s;
    animation-duration: 28s;
}

.seed-4 {
    top: 40%;
    right: 20%;
    animation-delay: 3s;
    animation-duration: 22s;
}

.seed-5 {
    bottom: 35%;
    right: 5%;
    animation-delay: 7s;
    animation-duration: 26s;
}

.grain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /><feColorMatrix type="saturate" values="0"/></filter><rect width="300" height="300" filter="url(%23noise)" opacity="0.03"/></svg>');
    opacity: 0.5;
    mix-blend-mode: overlay;
}

/* ===========================
   返回按鈕
   =========================== */
.back-button {
    display: none;
}

/* ===========================
   主容器
   =========================== */
.donation-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem 2rem;
    position: relative;
    z-index: 1;
}

/* ===========================
   標題區
   =========================== */
.hero-section {
    text-align: center;
    margin-bottom: 5rem;
    animation: fadeInDown 1s ease-out;
}

.verse-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, var(--chinese-red), var(--deep-red));
    color: var(--light-gold);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
    animation: pulse 3s infinite;
}

.main-title {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.title-line {
    display: block;
    color: var(--charcoal);
    position: relative;
    animation: slideInLeft 1s ease-out backwards;
}

.title-line:first-child {
    animation-delay: 0.2s;
}

.title-line.highlight {
    background: linear-gradient(135deg, var(--gold) 0%, var(--dark-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: slideInRight 1s ease-out backwards;
    animation-delay: 0.4s;
}

.title-line.highlight::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 8px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.3;
    border-radius: 10px;
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--deep-red);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.divider {
    display: flex;
    justify-content: center;
    color: var(--gold);
    opacity: 0.6;
    animation: fadeIn 1s ease-out 0.8s backwards;
}

/* ===========================
   資訊卡片
   =========================== */
.info-section {
    margin-bottom: 4rem;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.8s ease-out backwards;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--dark-gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.info-card:hover::before {
    transform: scaleX(1);
}

.info-card:nth-child(1) {
    animation-delay: 0.1s;
}

.info-card:nth-child(2) {
    animation-delay: 0.2s;
}

.info-card:nth-child(3) {
    animation-delay: 0.3s;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-gold), var(--cream));
    border-radius: 12px;
    color: var(--dark-gold);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover .icon-wrapper {
    transform: rotate(10deg) scale(1.1);
    background: linear-gradient(135deg, var(--gold), var(--dark-gold));
    color: white;
}

.card-header h2 {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--chinese-red);
}

.card-content {
    position: relative;
}

/* 銀行卡片 */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.info-row:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
}

.label {
    font-size: 0.95rem;
    color: var(--deep-red);
    font-weight: 600;
}

.value {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--charcoal);
    letter-spacing: 1px;
}

.bank-code {
    color: var(--dark-gold);
}

.account-number {
    background: linear-gradient(135deg, var(--gold), var(--dark-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.copy-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--chinese-red), var(--deep-red));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.copy-btn:hover {
    background: linear-gradient(135deg, var(--gold), var(--dark-gold));
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

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

/* 戶名卡片 */
.name-display {
    text-align: left;
}

.organization {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--chinese-red);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.person {
    font-size: 1.1rem;
    color: var(--deep-red);
    font-weight: 600;
}

/* 收據卡片 */
.receipt-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--charcoal);
}

.check-icon {
    flex-shrink: 0;
    color: var(--gold);
    margin-top: 0.2rem;
}

/* ===========================
   祝福區域
   =========================== */
.blessing-section {
    margin: 5rem 0;
    position: relative;
    animation: fadeIn 1s ease-out 1s backwards;
}

.blessing-content {
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.95), rgba(139, 0, 0, 0.95));
    backdrop-filter: blur(20px);
    padding: 4rem 3rem;
    border-radius: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.blessing-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

.blessing-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

.blessing-title {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--light-gold);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.blessing-verse {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.blessing-reference {
    font-size: 1rem;
    color: var(--gold);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ===========================
   感謝區域
   =========================== */
.gratitude-section {
    margin: 4rem 0;
    animation: fadeInUp 1s ease-out 1.2s backwards;
}

.gratitude-card {
    text-align: center;
    padding: 3rem 2rem;
}

.heart-animation {
    margin-bottom: 2rem;
    display: inline-block;
}

.heart {
    color: var(--gold);
    filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.3));
    animation: heartbeat 1.5s ease-in-out infinite;
}

.gratitude-card h3 {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--chinese-red);
    margin-bottom: 1rem;
}

.gratitude-card p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--deep-red);
}

/* ===========================
   其他奉獻方式
   =========================== */
.alternative-section {
    margin: 4rem 0;
    animation: fadeInUp 1s ease-out 1.4s backwards;
}

.alternative-section h3 {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: 2rem;
    text-align: center;
    color: var(--chinese-red);
    margin-bottom: 2rem;
}

.alternative-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.method-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.method-item:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: var(--shadow-medium);
    background: rgba(255, 255, 255, 0.95);
}

.method-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.method-item:hover .method-icon {
    transform: scale(1.2) rotate(5deg);
}

.method-item h4 {
    font-size: 1.3rem;
    color: var(--chinese-red);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.method-item p {
    font-size: 0.95rem;
    color: var(--deep-red);
}

/* ===========================
   聯絡資訊
   =========================== */
.contact-section {
    text-align: center;
    margin: 4rem 0 2rem;
    padding: 2rem;
    animation: fadeIn 1s ease-out 1.6s backwards;
}

.contact-section p {
    font-size: 1.1rem;
    color: var(--deep-red);
    margin-bottom: 1.5rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--gold);
    border-radius: 50px;
    color: var(--chinese-red);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: var(--gold);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* ===========================
   提示訊息
   =========================== */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--chinese-red), var(--deep-red));
    color: white;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow-strong);
    z-index: 1000;
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    bottom: 2rem;
}

.toast svg {
    flex-shrink: 0;
}

/* ===========================
   動畫
   =========================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-30px) rotate(3deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(5deg);
    }
    75% {
        transform: scale(1.1) rotate(-5deg);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===========================
   響應式設計
   =========================== */
@media (max-width: 768px) {
    .donation-container {
        padding: 6rem 1rem 3rem 1rem;
    }

    .hero-section {
        margin-bottom: 3rem;
    }

    .main-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .info-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .blessing-content {
        padding: 3rem 2rem;
        border-radius: 20px;
    }

    .alternative-methods {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .floating-seed {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .info-card {
        padding: 2rem 1.5rem;
    }

    .card-header h2 {
        font-size: 1.3rem;
    }

    .value {
        font-size: 1.1rem;
    }

    .blessing-content {
        padding: 2rem 1.5rem;
    }

    .blessing-title {
        font-size: 1.5rem;
    }

    .blessing-verse {
        font-size: 1rem;
    }
}

/* ===========================
   列印樣式
   =========================== */
@media print {
    .navbar,
    .back-button,
    .background-elements,
    .toast,
    .footer,
    .back-to-top {
        display: none;
    }

    body {
        background: white;
    }

    .info-card,
    .blessing-content,
    .gratitude-card {
        break-inside: avoid;
    }
}
