/* ===== CSS Variables ===== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 全局星空背景 - 第一層（小星星） */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 60px 70px, #fff, transparent),
        radial-gradient(1px 1px at 50px 50px, #ddd, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 90px 10px, #fff, transparent),
        radial-gradient(1px 1px at 200px 150px, #ddd, transparent),
        radial-gradient(1px 1px at 170px 120px, #fff, transparent),
        radial-gradient(2px 2px at 250px 60px, #eee, transparent);
    background-repeat: repeat;
    background-size: 300px 300px;
    animation: starsMove 120s linear infinite;
    opacity: 0.6;
    pointer-events: none;
}

/* 全局星空背景 - 第二層（彩色星星） */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background-image:
        radial-gradient(3px 3px at 100px 50px, #a78bfa, transparent),
        radial-gradient(2px 2px at 200px 150px, #ec4899, transparent),
        radial-gradient(3px 3px at 50px 200px, #6366f1, transparent),
        radial-gradient(2px 2px at 300px 100px, #8b5cf6, transparent);
    background-repeat: repeat;
    background-size: 400px 400px;
    animation: starsMove 180s linear infinite reverse, starsTwinkle 3s ease-in-out infinite;
    opacity: 0.8;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    width: 100%;
}

.nav-brand {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

.nav-brand a {
    text-decoration: none;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
    margin: 0;
    flex-wrap: wrap;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 確保所有內容在星空之上 */
.container,
section,
.nav {
    position: relative;
    z-index: 1;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 70px;
    background: transparent;
    overflow: hidden;
}

/* Hero區塊不需要重複的星空背景了 */
/* Hero偽元素已移除 */

@keyframes starsMove {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-300px);
    }
}

@keyframes starsTwinkle {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    color: white;
    max-width: 800px;
    padding: 48px 24px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    font-size: 14px;
    margin-bottom: 24px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow:
        0 0 20px rgba(99, 102, 241, 0.3),
        inset 0 0 20px rgba(99, 102, 241, 0.1);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(99, 102, 241, 0.3),
            inset 0 0 20px rgba(99, 102, 241, 0.1);
    }

    50% {
        box-shadow:
            0 0 30px rgba(99, 102, 241, 0.5),
            inset 0 0 30px rgba(99, 102, 241, 0.2);
    }
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;

    /* 半透明漸變文字 */
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(167, 139, 250, 0.9) 50%,
            rgba(236, 72, 153, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 移除發光動畫 */

.hero-subtitle {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-icon {
    font-size: 20px;
}

/* ===== Sections ===== */
section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 50%, #f9a8d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 20px;
    color: #cbd5e1;
}

/* ===== Welcome Message Section ===== */
.welcome-message {
    background: transparent;
    padding: 120px 0 100px;
    position: relative;
}

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

.welcome-icon {
    font-size: 72px;
    margin-bottom: 56px;
    animation: float 3s ease-in-out infinite;
    opacity: 0.9;
}

.welcome-text {
    color: #cbd5e1;
    font-size: 22px;
    line-height: 2.2;
    max-width: 900px;
    margin: 0 auto;
    font-weight: 400;
}

.welcome-text p {
    margin-bottom: 40px;
    opacity: 0.92;
}

.special-offer {
    margin-top: 80px;
    padding: 48px 56px;
    background: rgba(99, 102, 241, 0.06);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.special-offer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    animation: shimmer 5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.offer-badge {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(139, 92, 246, 0.15));
    border-radius: 28px;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(236, 72, 153, 0.3);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.15);
}

.special-offer p {
    font-size: 19px;
    line-height: 2;
    margin: 0;
    color: #e0e7ff;
}

.highlight {
    color: #fcd34d;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(252, 211, 77, 0.4);
    display: block;
    margin-top: 16px;
    font-size: 20px;
    letter-spacing: 0.3px;
}

/* ===== Features ===== */
.features {
    background: transparent;
    position: relative;
}

.features::before {
    display: none;
}

.features .container {
    position: relative;
    z-index: 1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.2),
        0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(99, 102, 241, 0.15);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.4),
        0 0 40px rgba(99, 102, 241, 0.4),
        0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(30, 41, 59, 0.5);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.5));
    transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
    filter: drop-shadow(0 0 30px rgba(236, 72, 153, 0.8));
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #f1f5f9;
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: #cbd5e1;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* ===== About Section ===== */
.about {
    background: transparent;
    position: relative;
    overflow: hidden;
}

.about::before {
    display: none;
}

.about .container {
    position: relative;
    z-index: 1;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text h2 {
    font-size: 48px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text p {
    font-size: 18px;
    color: #cbd5e1;
    margin-bottom: 24px;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.stat {
    text-align: center;
    padding: 24px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.stat:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    color: #94a3b8;
    font-size: 14px;
}

.about-image {
    position: relative;
    height: 500px;
}

.gradient-circle {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(236, 72, 153, 0.3) 100%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
    box-shadow:
        0 0 60px rgba(99, 102, 241, 0.4),
        inset 0 0 60px rgba(236, 72, 153, 0.2);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* ===== CTA Section ===== */
.cta {
    background: transparent;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    display: none;
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 48px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-content p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 32px;
    color: #cbd5e1;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Legal Pages ===== */
.legal-page {
    padding-top: 120px;
    padding-bottom: 80px;
    background: transparent;
}

.legal-header {
    text-align: center;
    margin-bottom: 64px;
}

.legal-header h1 {
    font-size: 56px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-date {
    color: #cbd5e1;
    font-size: 16px;
}

.legal-content {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    padding: 48px;
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.2),
        0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.legal-section {
    margin-bottom: 48px;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: 32px;
    margin-bottom: 16px;
    color: #a78bfa;
}

.legal-section h3 {
    font-size: 24px;
    margin-top: 24px;
    margin-bottom: 12px;
    color: #f1f5f9;
}

.legal-section p {
    color: #cbd5e1;
    margin-bottom: 16px;
    line-height: 1.8;
}

.legal-section ul,
.legal-section ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.legal-section li {
    color: #cbd5e1;
    margin-bottom: 8px;
    line-height: 1.8;
}

.legal-section a {
    color: #a78bfa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.legal-section a:hover {
    color: #c4b5fd;
    text-decoration: underline;
}

.legal-note {
    background: rgba(254, 243, 199, 0.1);
    border-left: 4px solid #f59e0b;
    padding: 16px;
    border-radius: 8px;
    font-style: italic;
    color: #fbbf24;
}

.contact-info {
    background: rgba(99, 102, 241, 0.1);
    padding: 24px;
    border-radius: 12px;
    margin-top: 24px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.contact-info p {
    margin-bottom: 8px;
    color: #e0e7ff;
}

.contact-info a {
    color: #a78bfa;
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover {
    text-decoration: underline;
    color: #c4b5fd;
}

.legal-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 2px solid rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.05);
    padding: 24px;
    border-radius: 12px;
}

.legal-footer p {
    color: #a78bfa;
    font-weight: 600;
    margin: 0;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 64px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 64px;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-light);
    margin-bottom: 16px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-column h4 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-visual {
        display: none;
    }

    .section-title {
        font-size: 32px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-text h2 {
        font-size: 32px;
        text-align: center;
    }

    .about-text p {
        font-size: 16px;
        text-align: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 32px;
    }

    .stat {
        padding: 20px;
    }

    .stat-number {
        font-size: 36px;
    }

    .about-image {
        height: 250px;
        order: -1;
        /* Move image above text on mobile if desired, or keep as is */
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .legal-content {
        padding: 32px 24px;
    }

    .legal-header h1 {
        font-size: 36px;
    }
}

/* ===== Multilingual Support ===== */
.lang-section {
    display: none;
}

.lang-section.active {
    display: block;
}

.lang-switcher {
    margin: 20px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
    z-index: 10;
}

.lang-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}