/**
 * 良辰吉時 - 中國風首頁樣式
 * 
 * 文件路径：assets/css/index.css
 * 版本：V1.1
 * 建立时间：2025/12/05
 * 修改時間：2025/12/09
 * 修改記錄：
 * - V1.1 新增影片播放區域樣式
 * - V1.1 新增底部版權區域樣式
 * - V1.1 優化響應式設計
 * 
 * 設計理念：
 * - 亮麗朱紅為主色調
 * - 皇金點綴
 * - 淡雅水墨山水背景
 * - 東西方融合的視覺風格
 */

/* ===== Google Fonts 引入 ===== */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Noto+Serif+TC:wght@400;600;700;900&display=swap');

/* ===== CSS 變數定義 ===== */
:root {
    /* 主色系 */
    --color-vermilion: #C41E3A;          /* 朱紅 */
    --color-vermilion-dark: #9B1B30;     /* 深朱紅 */
    --color-vermilion-light: #E63950;    /* 亮朱紅 */
    
    /* 輔助色 */
    --color-gold: #D4AF37;               /* 皇金 */
    --color-gold-light: #F0D77B;         /* 淺金 */
    --color-gold-dark: #B8960C;          /* 深金 */
    
    /* 背景色 */
    --color-paper: #F5F1EB;              /* 宣紙米白 */
    --color-paper-dark: #E8E0D5;         /* 深米白 */
    --color-ink: #1A1A1A;                /* 墨黑 */
    --color-ink-light: #4A4A4A;          /* 淺墨 */
    
    /* 字體 */
    --font-chinese: 'Noto Serif TC', '楷体', 'KaiTi', serif;
    --font-cursive: 'Great Vibes', cursive;
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    
    /* 間距 */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
}

/* ===== 全局樣式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-system);
    line-height: 1.6;
    color: var(--color-ink);
    background-color: var(--color-paper);
    overflow-x: hidden;
}

/* ===== 頂部導航欄 ===== */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(180deg, 
        rgba(196, 30, 58, 0.98) 0%, 
        rgba(155, 27, 48, 0.95) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(196, 30, 58, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.top-navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--color-gold) 20%, 
        var(--color-gold-light) 50%, 
        var(--color-gold) 80%, 
        transparent 100%);
}

.top-navbar.scrolled {
    height: 60px;
    background: rgba(155, 27, 48, 0.98);
}

.navbar-container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-chinese);
    font-size: 26px;
    font-weight: 700;
    color: var(--color-gold);
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.navbar-logo:hover {
    color: var(--color-gold-light);
    transform: scale(1.02);
}

.logo-icon {
    font-size: 32px;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}

/* 導航右側 */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 語言選擇器 */
.lang-selector {
    padding: 8px 15px;
    border: 2px solid var(--color-gold);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-gold);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-selector:hover {
    background: rgba(212, 175, 55, 0.2);
}

.lang-selector option {
    background: var(--color-vermilion-dark);
    color: white;
}

/* 導航連結 */
.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--color-gold);
    background: rgba(255, 255, 255, 0.1);
}

/* 導航按鈕 */
.btn-nav {
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

/* 免費排八字按鈕 - 特殊強調 */
.btn-bazi-free {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: var(--color-vermilion-dark);
    border: 2px solid var(--color-gold-light);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-bazi-free:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
}

/* 登入按鈕 */
.btn-login {
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* 註冊按鈕 */
.btn-register {
    color: var(--color-vermilion);
    background: white;
    border: 2px solid white;
}

.btn-register:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-vermilion-dark);
    transform: translateY(-2px);
}

/* ===== Hero 區域 ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: var(--color-paper);
    color: var(--color-ink);
    padding: 100px 20px 60px;
    position: relative;
    overflow: hidden;
}

/* 水墨山水背景 */
.hero-bg-landscape {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.08;
    background-image: 
        /* 遠山 */
        radial-gradient(ellipse 150% 60% at 10% 90%, rgba(26, 26, 26, 0.4) 0%, transparent 70%),
        radial-gradient(ellipse 120% 50% at 30% 85%, rgba(26, 26, 26, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 180% 70% at 70% 95%, rgba(26, 26, 26, 0.35) 0%, transparent 65%),
        radial-gradient(ellipse 100% 40% at 90% 88%, rgba(26, 26, 26, 0.25) 0%, transparent 55%),
        /* 雲紋 */
        radial-gradient(ellipse 80% 30% at 20% 20%, rgba(196, 30, 58, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 25% at 80% 30%, rgba(196, 30, 58, 0.1) 0%, transparent 45%),
        radial-gradient(ellipse 100% 35% at 50% 15%, rgba(212, 175, 55, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

/* 傳統雲紋裝飾 */
.hero-cloud-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.04;
    background-image: 
        repeating-radial-gradient(circle at 0 0, transparent 0, var(--color-paper) 10px),
        repeating-linear-gradient(var(--color-vermilion), var(--color-vermilion));
    pointer-events: none;
}

/* 頂部金色裝飾線 */
.hero-top-border {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--color-gold) 30%, 
        var(--color-gold-light) 50%, 
        var(--color-gold) 70%, 
        transparent 100%);
}

/* Hero 內容容器 */
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

/* 太極圖標 */
.taiji-symbol {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--spacing-lg);
    animation: rotate-slow 30s linear infinite;
    filter: drop-shadow(0 4px 20px rgba(196, 30, 58, 0.3));
}

.taiji-symbol.paused {
    animation-play-state: paused;
}

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

/* 主標題 */
.hero-title {
    font-family: var(--font-chinese);
    font-size: 56px;
    font-weight: 900;
    color: var(--color-vermilion);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    letter-spacing: 8px;
    text-shadow: 2px 2px 4px rgba(196, 30, 58, 0.2);
    animation: fadeInUp 0.8s ease;
}

/* 副標題 */
.hero-subtitle {
    font-family: var(--font-chinese);
    font-size: 24px;
    color: var(--color-ink-light);
    margin-bottom: var(--spacing-sm);
    line-height: 1.8;
    letter-spacing: 2px;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-subtitle-secondary {
    font-family: var(--font-chinese);
    font-size: 20px;
    color: var(--color-gold-dark);
    margin-bottom: var(--spacing-xl);
    letter-spacing: 3px;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

/* 英文草寫 Slogan */
.hero-slogan-english {
    font-family: var(--font-cursive);
    font-size: 42px;
    color: var(--color-vermilion);
    margin-top: var(--spacing-lg);
    line-height: 1.4;
    animation: fadeInUp 0.8s ease 0.5s backwards;
    text-shadow: 1px 1px 3px rgba(196, 30, 58, 0.15);
}

/* 裝飾分隔線 */
.hero-divider {
    width: 150px;
    height: 2px;
    margin: var(--spacing-lg) auto;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--color-gold) 20%, 
        var(--color-gold-light) 50%, 
        var(--color-gold) 80%, 
        transparent 100%);
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

/* 八卦裝飾符號 */
.bagua-decoration {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    opacity: 0.6;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.bagua-symbol {
    font-size: 28px;
    color: var(--color-gold-dark);
}

/* ===== 影片區域 ===== */
.video-section {
    position: relative;
    padding: var(--spacing-xl) var(--spacing-md);
    background: linear-gradient(180deg, 
        var(--color-paper-dark) 0%, 
        var(--color-paper) 50%,
        var(--color-paper-dark) 100%);
    overflow: hidden;
}

/* 影片區域背景紋理 */
.video-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    background-image: 
        repeating-linear-gradient(45deg, 
            var(--color-vermilion) 0px, 
            var(--color-vermilion) 1px, 
            transparent 1px, 
            transparent 20px);
    pointer-events: none;
}

.video-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    z-index: 1;
}

/* 影片區域標題 */
.video-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.video-header-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.decoration-line {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--color-gold) 100%);
}

.decoration-line.right {
    background: linear-gradient(90deg, 
        var(--color-gold) 0%, 
        transparent 100%);
}

.decoration-icon {
    font-size: 24px;
    color: var(--color-gold);
    animation: rotate-slow 30s linear infinite;
}

.video-title {
    font-family: var(--font-chinese);
    font-size: 36px;
    font-weight: 700;
    color: var(--color-vermilion);
    letter-spacing: 6px;
    margin-bottom: var(--spacing-sm);
}

.video-subtitle {
    font-family: var(--font-chinese);
    font-size: 18px;
    color: var(--color-ink-light);
    letter-spacing: 2px;
}

/* 影片播放器容器 */
.video-player-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(196, 30, 58, 0.15),
        0 0 0 3px var(--color-gold),
        0 0 0 6px rgba(196, 30, 58, 0.1);
    background: var(--color-ink);
}

.video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例 */
    background: var(--color-ink);
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* 影片控制器樣式覆寫 */
.video-player::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.video-player::-webkit-media-controls-play-button,
.video-player::-webkit-media-controls-volume-slider,
.video-player::-webkit-media-controls-mute-button,
.video-player::-webkit-media-controls-fullscreen-button {
    filter: sepia(100%) saturate(300%) brightness(70%) hue-rotate(-10deg);
}

/* 影片邊框角落裝飾 */
.video-frame-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: var(--color-gold);
    border-style: solid;
    z-index: 10;
}

.video-frame-corner.top-left {
    top: -3px;
    left: -3px;
    border-width: 4px 0 0 4px;
    border-radius: 8px 0 0 0;
}

.video-frame-corner.top-right {
    top: -3px;
    right: -3px;
    border-width: 4px 4px 0 0;
    border-radius: 0 8px 0 0;
}

.video-frame-corner.bottom-left {
    bottom: -3px;
    left: -3px;
    border-width: 0 0 4px 4px;
    border-radius: 0 0 0 8px;
}

.video-frame-corner.bottom-right {
    bottom: -3px;
    right: -3px;
    border-width: 0 4px 4px 0;
    border-radius: 0 0 8px 0;
}

/* 影片區域 CTA 按鈕 */
.video-cta {
    text-align: center;
    margin-top: var(--spacing-lg);
}

.btn-video-cta {
    display: inline-block;
    padding: 16px 48px;
    font-family: var(--font-chinese);
    font-size: 20px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--color-vermilion) 0%, var(--color-vermilion-dark) 100%);
    border: 3px solid var(--color-gold);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(196, 30, 58, 0.3);
    letter-spacing: 3px;
}

.btn-video-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(196, 30, 58, 0.4);
    background: linear-gradient(135deg, var(--color-vermilion-light) 0%, var(--color-vermilion) 100%);
}

/* 影片錯誤處理 */
.video-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--color-ink);
    color: white;
    padding: var(--spacing-md);
    text-align: center;
}

.video-error p {
    font-size: 18px;
    margin-bottom: var(--spacing-md);
}

.btn-video-download {
    padding: 12px 24px;
    background: var(--color-gold);
    color: var(--color-ink);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-video-download:hover {
    background: var(--color-gold-light);
    transform: translateY(-2px);
}

/* ===== 底部版權區 ===== */
.site-footer {
    background: linear-gradient(180deg, 
        var(--color-vermilion-dark) 0%, 
        #6B1525 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: var(--spacing-lg) var(--spacing-md);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--color-gold) 20%, 
        var(--color-gold-light) 50%, 
        var(--color-gold) 80%, 
        transparent 100%);
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

/* 底部裝飾分隔線 */
.footer-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.footer-decoration {
    font-size: 28px;
    color: var(--color-gold);
    padding: 0 var(--spacing-sm);
}

/* 公司資訊 */
.footer-company-info {
    margin-bottom: var(--spacing-md);
}

.footer-brand {
    font-family: var(--font-chinese);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 4px;
    margin-bottom: var(--spacing-sm);
}

.footer-copyright {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.footer-copyright strong {
    color: var(--color-gold-light);
    font-weight: 600;
}

/* 聯絡資訊 */
.footer-contact {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.footer-contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 15px;
    margin: var(--spacing-xs) 0;
}

.contact-icon {
    font-size: 16px;
}

.contact-label {
    color: rgba(255, 255, 255, 0.7);
}

.contact-link {
    color: var(--color-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--color-gold-light);
    text-decoration: underline;
}

/* 版權法律聲明 */
.footer-legal {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

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

@keyframes shimmer {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* ===== 響應式設計 ===== */
@media (max-width: 1024px) {
    .navbar-container {
        padding: 0 20px;
    }
    
    .navbar-right {
        gap: 10px;
    }
    
    .nav-link {
        display: none;
    }
    
    .hero-title {
        font-size: 44px;
        letter-spacing: 4px;
    }
    
    .hero-slogan-english {
        font-size: 36px;
    }
    
    .video-title {
        font-size: 30px;
    }
    
    .btn-video-cta {
        padding: 14px 36px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .top-navbar {
        height: 60px;
    }
    
    .navbar-logo {
        font-size: 20px;
    }
    
    .logo-icon {
        font-size: 26px;
    }
    
    .btn-nav {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .lang-selector {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .hero-section {
        padding: 80px 20px 40px;
    }
    
    .taiji-symbol {
        width: 90px;
        height: 90px;
    }
    
    .hero-title {
        font-size: 32px;
        letter-spacing: 3px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-subtitle-secondary {
        font-size: 16px;
    }
    
    .hero-slogan-english {
        font-size: 28px;
    }
    
    .bagua-decoration {
        gap: var(--spacing-sm);
    }
    
    .bagua-symbol {
        font-size: 22px;
    }
    
    /* 影片區域響應式 */
    .video-section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    .video-title {
        font-size: 26px;
        letter-spacing: 3px;
    }
    
    .video-subtitle {
        font-size: 16px;
    }
    
    .decoration-line {
        width: 50px;
    }
    
    .video-frame-corner {
        width: 20px;
        height: 20px;
        border-width: 3px !important;
    }
    
    .btn-video-cta {
        padding: 12px 28px;
        font-size: 16px;
        letter-spacing: 2px;
    }
    
    /* 底部響應式 */
    .footer-brand {
        font-size: 20px;
    }
    
    .footer-copyright {
        font-size: 14px;
    }
    
    .footer-contact-item {
        font-size: 14px;
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .navbar-right {
        gap: 6px;
    }
    
    .btn-bazi-free {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .btn-login, .btn-register {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .hero-title {
        font-size: 28px;
        letter-spacing: 2px;
    }
    
    .hero-slogan-english {
        font-size: 24px;
    }
    
    /* 影片區域小螢幕 */
    .video-title {
        font-size: 22px;
        letter-spacing: 2px;
    }
    
    .video-subtitle {
        font-size: 14px;
    }
    
    .decoration-line {
        width: 40px;
    }
    
    .decoration-icon {
        font-size: 20px;
    }
    
    .video-player-wrapper {
        box-shadow: 
            0 6px 20px rgba(196, 30, 58, 0.15),
            0 0 0 2px var(--color-gold);
        border-radius: 8px;
    }
    
    .video-frame-corner {
        width: 15px;
        height: 15px;
        border-width: 2px !important;
    }
    
    .btn-video-cta {
        padding: 10px 24px;
        font-size: 15px;
        width: 100%;
        max-width: 280px;
    }
    
    /* 底部小螢幕 */
    .site-footer {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .footer-brand {
        font-size: 18px;
        letter-spacing: 2px;
    }
    
    .footer-copyright {
        font-size: 13px;
        line-height: 1.6;
    }
    
    .footer-contact {
        padding: var(--spacing-xs) 0;
    }
    
    .footer-contact-item {
        font-size: 13px;
    }
    
    .footer-legal {
        font-size: 12px;
    }
}

/* ===== 橫向螢幕優化（如平板橫放） ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 80px 20px 40px;
    }
    
    .taiji-symbol {
        width: 60px;
        height: 60px;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 28px;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-slogan-english {
        font-size: 24px;
        margin-top: var(--spacing-sm);
    }
    
    .hero-divider {
        margin: var(--spacing-sm) auto;
    }
    
    .bagua-decoration {
        margin-top: var(--spacing-sm);
    }
}

/* ===== 底部版權區（舊版相容，可移除） ===== */
.footer-minimal {
    display: none; /* 隱藏舊版簡易版權 */
}