/* 基礎重置和全域變數 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #f59e0b;
    --text-light: #ffffff;
    --text-dark: #1f2937;
    --bg-dark: #0f172a;
    --bg-gradient: linear-gradient(135deg, var(--bg-dark) 0%, #1e293b 50%, #334155 100%);
    --transition-speed: 0.4s;
    --glow-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
    --matrix-opacity: 0.15;
}

body {
    font-family: 'Source Han Sans TW', 'Source Han Sans HK', 'Source Han Sans CN', 'Noto Sans CJK TC', 'Noto Sans CJK', sans-serif;
    color: var(--text-light);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    background: var(--bg-gradient);
}

/* 背景視頻樣式 */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.8;
}

/* 點陣圖層 */
.dot-matrix-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle, var(--text-light) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: var(--matrix-opacity);
    pointer-events: none;
    z-index: -1;
    animation: matrixMove 20s linear infinite;
}

@keyframes matrixMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(40px, 40px);
    }
}

/* 頭部樣式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-text-full {
    font-family: 'Source Han Sans TW', 'Source Han Sans HK', 'Source Han Sans CN', 'Noto Sans CJK TC', 'Noto Sans CJK', serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--text-light);
    letter-spacing: 2px;
}

/* 主要內容區塊 - 居中對齊 */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-family: 'Source Han Sans TW', 'Source Han Sans HK', 'Source Han Sans CN', 'Noto Sans CJK TC', 'Noto Sans CJK', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: var(--glow-shadow);
    background: linear-gradient(45deg, var(--text-light), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    margin-bottom: 2rem;
    max-width: 600px;
    line-height: 1.6;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.cta-button {
    text-decoration: none;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.4), var(--glow-shadow);
}

.cta-button:active {
    transform: translateY(-1px);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.8s;
}

.cta-button:hover::before {
    left: 100%;
}

/* 版權聲明 */
.copyright-footer {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
    z-index: 100;
    animation: fadeIn 2s ease-out;
}

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

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

/* 響應式設計 */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .logo {
        width: 32px;
        height: 32px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .dot-matrix-overlay {
        background-size: 30px 30px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .cta-button {
        width: 100%;
        max-width: 280px;
    }
}

/* 滾動條樣式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}