@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #05060b;
    --bg-card: rgba(12, 16, 29, 0.55);
    --border-card: rgba(230, 198, 135, 0.18);
    --border-card-glow: rgba(230, 198, 135, 0.35);
    --gold: #e6c687;
    --gold-rgb: 230, 198, 135;
    --gold-hover: #f3ddb3;
    --gold-glow: rgba(230, 198, 135, 0.25);
    --purple-glow: rgba(147, 51, 234, 0.25);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-gold: #f1e4c3;
    --input-bg: rgba(6, 8, 15, 0.85);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: rgba(230, 198, 135, 0.5);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', 'Noto Sans TC', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 星光 Canvas 背景 */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* 全域漸層環境光 */
.nebula-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(147, 51, 234, 0.08) 50%, rgba(0,0,0,0) 100%);
    top: -200px;
    right: -100px;
    z-index: -2;
    filter: blur(80px);
    pointer-events: none;
}

.nebula-glow-2 {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(230, 198, 135, 0.06) 0%, rgba(219, 39, 119, 0.04) 50%, rgba(0,0,0,0) 100%);
    bottom: -150px;
    left: -150px;
    z-index: -2;
    filter: blur(60px);
    pointer-events: none;
}

/* 導覽列 */
header {
    padding: 2.5rem 1.5rem 1rem 1.5rem;
    text-align: center;
    z-index: 10;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 70px;
    width: 70px;
    background-color: #fafaf5; /* 百合白 */
    border-radius: 50%;
    padding: 6px;
    border: 2px solid var(--gold); /* 高雅金邊 */
    box-shadow: 0 4px 15px rgba(230, 198, 135, 0.4), inset 0 0 8px rgba(0,0,0,0.05); /* 金色光暈 */
    display: block;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-img:hover {
    transform: rotate(5deg) scale(1.05);
}


.logo-text {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.2rem;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.logo-text span {
    color: var(--gold);
}

/* 主容器 */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    z-index: 5;
}

.container {
    width: 100%;
    max-width: 680px;
}

/* 毛玻璃卡片 */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 
                0 0 40px var(--purple-glow),
                inset 0 0 15px rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.glass-card:hover {
    border-color: var(--border-card-glow);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
                0 0 50px var(--purple-glow),
                0 0 20px rgba(var(--gold-rgb), 0.1),
                inset 0 0 15px rgba(255, 255, 255, 0.03);
}

.intro-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.intro-title {
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--gold);
    margin-bottom: 0.75rem;
    letter-spacing: 0.1rem;
    text-shadow: 0 0 12px var(--gold-glow);
}

.intro-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 表單佈局 */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.full-width {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-gold);
    letter-spacing: 0.05rem;
    text-transform: uppercase;
}

/* 輸入框樣式 */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(var(--gold-rgb), 0.2),
                inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* 下拉選單自訂箭頭 */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23e6c687'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 1.1rem;
    padding-right: 2.5rem;
}

/* 價格標示 */
.price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: rgba(230, 198, 135, 0.06);
    border: 1px dashed rgba(230, 198, 135, 0.25);
    border-radius: 16px;
    margin: 1.5rem 0 2rem 0;
}

.price-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.price-amount {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold-glow);
}

.price-currency {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-right: 0.25rem;
}

/* 按鈕樣式 */
.btn-gold {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, #d4af37 0%, #e6c687 100%);
    border: none;
    border-radius: 14px;
    color: #05060b;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.15rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.35),
                0 0 20px rgba(230, 198, 135, 0.5);
    background: linear-gradient(135deg, #e6c687 0%, #f3ddb3 100%);
}

.btn-gold:active {
    transform: translateY(1px);
}

/* 訊息卡片 (付款結果頁) */
.result-box {
    text-align: center;
    padding: 1rem 0;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem auto;
    font-size: 2.5rem;
}

.icon-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.15);
    animation: pulseSuccess 2s infinite;
}

.icon-failed {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.15);
}

.result-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.result-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.tg-cta-box {
    background: rgba(0, 136, 204, 0.08);
    border: 1px solid rgba(0, 136, 204, 0.25);
    border-radius: 18px;
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.tg-cta-title {
    color: #0088cc;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tg-cta-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.btn-tg {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.95rem;
    background: #0088cc;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.25);
}

.btn-tg:hover {
    background: #0099e6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

.btn-secondary {
    display: inline-block;
    color: var(--gold);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.btn-secondary:hover {
    color: var(--gold-hover);
    text-decoration: underline;
}

/* 頁尾 */
footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.05rem;
    z-index: 10;
}

/* CSS 動畫效果 */
@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulseSuccess {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 自適應排版 */
@media (max-width: 600px) {
    .glass-card {
        padding: 2rem 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .full-width {
        grid-column: span 1;
    }
    
    .intro-title {
        font-size: 1.8rem;
    }
}
