:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --primary-light: #A29BFE;
    --accent: #00D2D3;
    --accent-dark: #01A3A4;
    --dark: #0F0F1A;
    --dark-2: #1A1A2E;
    --dark-3: #2D2D44;
    --gray: #8E8EA0;
    --light: #E4E4F0;
    --white: #FFFFFF;
    --gradient-1: linear-gradient(135deg, #6C5CE7, #00D2D3);
    --gradient-2: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 50%, #00D2D3 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px rgba(108,92,231,0.3);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans TC', 'Inter', -apple-system, sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    background: transparent;
}

.nav.scrolled {
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(90deg, #6C5CE7, #A29BFE, #00D2D3, #6C5CE7);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    animation: logoShimmer 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(108,92,231,0.4));
}

@keyframes logoShimmer {
    0% { background-position: 0% 50%; filter: drop-shadow(0 0 8px rgba(108,92,231,0.4)); }
    50% { background-position: 100% 50%; filter: drop-shadow(0 0 16px rgba(0,210,211,0.6)); }
    100% { background-position: 0% 50%; filter: drop-shadow(0 0 8px rgba(108,92,231,0.4)); }
}

.nav-links { display: flex; gap: 2rem; align-items: center; }

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--white); }

.nav-links a.active {
    color: var(--white);
    position: relative;
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-1);
    border-radius: 1px;
}

.nav-cta {
    background: var(--gradient-1) !important;
    color: var(--white) !important;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: transform 0.3s, box-shadow 0.3s !important;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(108,92,231,0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 50%, rgba(0,210,211,0.1) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-5%, 5%) scale(1.1); }
}

.hero-content { position: relative; z-index: 1; max-width: 800px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(108,92,231,0.15);
    border: 1px solid rgba(108,92,231,0.3);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 2rem;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero h1 .gradient-text {
    background: linear-gradient(90deg, #6C5CE7, #A29BFE, #00D2D3, #6C5CE7);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoShimmer 3s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(108,92,231,0.5));
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(108,92,231,0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(108,92,231,0.5);
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    color: var(--light);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.hero-stat { text-align: center; }

.hero-stat .number {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat .label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* ===== SECTIONS ===== */
section { padding: 6rem 2rem; }

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-tag {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--gray);
    font-size: 1.1rem;
}

/* ===== SERVICES ===== */
#services { background: var(--dark-2); }

.services-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--dark);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(108,92,231,0.3);
    box-shadow: var(--shadow-md);
}

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

.service-icon {
    width: 50px;
    height: 50px;
    background: rgba(108,92,231,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.service-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.service-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    background: rgba(108,92,231,0.1);
    color: var(--primary-light);
    border: 1px solid rgba(108,92,231,0.2);
}

.service-price {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-weight: 700;
    color: var(--accent);
}

/* ===== PORTFOLIO ===== */
#portfolio { background: var(--dark); }
.portfolio-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.portfolio-card { background: var(--dark-2); border: 1px solid rgba(108,92,231,0.2); border-radius: 16px; padding: 2rem; transition: all 0.3s; position: relative; overflow: hidden; }
.portfolio-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-1); }
.portfolio-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-glow); }
.portfolio-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.portfolio-card p { color: var(--gray); font-size: 0.9rem; margin-bottom: 1rem; }
.portfolio-tag { display: inline-block; font-size: 0.75rem; padding: 0.25rem 0.75rem; border-radius: 50px; background: rgba(0,210,211,0.1); color: var(--accent); border: 1px solid rgba(0,210,211,0.2); }
.portfolio-live { display: inline-block; margin-top: 1rem; color: var(--accent); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.portfolio-live:hover { text-decoration: underline; }

/* ===== PROCESS ===== */
.process-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    gap: 0;
}

.process-step {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
    position: relative;
}

.process-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.25rem;
    position: relative;
}

.process-step:not(:last-child) .process-number::after {
    content: '';
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% + 1rem);
    background: linear-gradient(to bottom, var(--primary), transparent);
}

.process-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.process-content p {
    color: var(--gray);
    font-size: 0.95rem;
}

.process-content .time-badge {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background: rgba(0,210,211,0.1);
    color: var(--accent);
    border: 1px solid rgba(0,210,211,0.2);
}

/* ===== PRICING ===== */
#pricing { background: var(--dark-2); }

.pricing-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.pricing-card {
    background: var(--dark);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    transition: all 0.3s;
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.pricing-card.featured .popular-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--gradient-1);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-name {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.25rem;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray);
}

.pricing-desc {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.4rem 0;
    font-size: 0.95rem;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features li::before {
    content: '\2713';
    color: var(--accent);
    font-weight: 700;
}

.pricing-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.85rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.pricing-card.featured .pricing-btn {
    background: var(--gradient-1);
    color: var(--white);
}

.pricing-card:not(.featured) .pricing-btn {
    background: rgba(255,255,255,0.05);
    color: var(--light);
    border: 1px solid rgba(255,255,255,0.1);
}

.pricing-btn:hover { transform: translateY(-2px); }

/* ===== ADD-ONS ===== */
.addons-section {
    margin-top: 4rem;
}
.addons-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 0.5rem;
}
.addons-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}
.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}
.addon-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.3s;
}
.addon-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.addon-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.addon-name { font-weight: 600; color: var(--light); margin-bottom: 0.3rem; font-size: 0.95rem; }
.addon-price { color: var(--accent); font-weight: 700; font-size: 1.1rem; margin-bottom: 0.3rem; }
.addon-desc { color: var(--muted); font-size: 0.8rem; line-height: 1.4; }

/* ===== MAINTENANCE ===== */
.maintenance-section {
    margin-top: 3rem;
    text-align: center;
}
.maintenance-card {
    display: inline-block;
    background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(0,210,211,0.1));
    border: 1px solid rgba(108,92,231,0.2);
    border-radius: 16px;
    padding: 2rem 3rem;
    max-width: 500px;
}
.maintenance-card .addon-price { font-size: 1.3rem; }

/* ===== WHY ME ===== */
.why-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.why-item {
    text-align: center;
    padding: 2rem;
}

.why-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.why-item h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.why-item p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===== ABOUT ===== */
#about { background: var(--dark-2); }
.about-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--dark);
    border: 1px solid rgba(108,92,231,0.2);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}
.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
}
.about-name {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 0.25rem;
}
.about-title {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.about-desc {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}
.about-points {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.about-point {
    background: rgba(108,92,231,0.1);
    border: 1px solid rgba(108,92,231,0.2);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-light);
}

/* ===== FAQ ===== */
#faq { background: var(--dark); }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; margin-bottom: 1rem; overflow: hidden; background: var(--dark-2); }
.faq-q { padding: 1.25rem 1.5rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 1rem; transition: color 0.3s; }
.faq-q:hover { color: var(--accent); }
.faq-q::after { content: '+'; font-size: 1.5rem; color: var(--accent); transition: transform 0.3s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { padding: 0 1.5rem; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s; color: var(--gray); font-size: 0.95rem; line-height: 1.7; }
.faq-item.open .faq-a { max-height: 200px; padding: 0 1.5rem 1.25rem; }

/* ===== CTA ===== */
.cta-section {
    background: var(--dark-2);
    text-align: center;
}

.cta-box {
    max-width: 700px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(0,210,211,0.1));
    border: 1px solid rgba(108,92,231,0.3);
    border-radius: 24px;
    padding: 4rem 3rem;
}

.cta-box h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 1rem;
}

.cta-box p {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-contacts {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.cta-contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.95rem;
}

/* ===== PAGE HEADER ===== */
.page-header {
    padding: 8rem 2rem 3rem;
    text-align: center;
    background: var(--dark);
    position: relative;
}
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(108,92,231,0.1) 0%, transparent 70%);
}
.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    position: relative;
    margin-bottom: 0.5rem;
}
.page-header p {
    color: var(--gray);
    font-size: 1.1rem;
    position: relative;
}

/* ===== FOOTER ===== */
footer {
    padding: 2rem;
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.04);
}

footer a {
    color: var(--primary-light);
    text-decoration: none;
}

/* ===== MOBILE ===== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }

    .nav-links.show {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 2rem;
        background: rgba(15,15,26,0.98);
        padding: 1rem 2rem;
        border-radius: 12px;
        border: 1px solid rgba(108,92,231,0.3);
        gap: 1rem;
    }

    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .hero-stat .number { font-size: 1.5rem; }

    .process-step { gap: 1rem; }

    .cta-box { padding: 2.5rem 1.5rem; }

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

    .about-card { padding: 2rem 1.5rem; }

    .about-points { flex-direction: column; }
}

/* ===== ANIMATIONS ===== */
/* 只有 JS 載入後才隱藏（避免爬蟲/廣告用戶看到黑屏） */
.fade-in {
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .fade-in {
    opacity: 0;
    transform: translateY(30px);
}
.js .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
