:root {
    --bg-main: #060913;
    --bg-secondary: #0d1326;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-cyan: #00f0ff;
    --accent-purple: #8a2be2;
    --glass-bg: rgba(13, 19, 38, 0.6);
    --glass-border: rgba(0, 240, 255, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4 {
    letter-spacing: 1px;
}

.text-gradient {
    background: linear-gradient(90deg, #00f0ff, #b666ff, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.4));
    background-size: 100% 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: var(--transition);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--accent-cyan);
    font-weight: 300;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-cyan);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--accent-cyan);
    transition: var(--transition);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 2005;
    background: transparent;
    border: none;
    padding: 10px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--accent-cyan);
    transition: var(--transition);
}

.btn-primary {
    background: transparent;
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--accent-cyan);
    color: var(--bg-main);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.nav-login-mobile {
    display: none;
    margin-top: 20px;
    width: 80%;
    text-align: center;
}

/* Ensure mobile login text is always visible */
.nav-login-mobile::after {
    content: '会员登入';
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: url('assets/hero_bg.png') no-repeat center center/cover;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(6, 9, 19, 0.3) 0%, rgba(6, 9, 19, 1) 100%);
}

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

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.single-line-responsive {
    white-space: nowrap;
    font-size: clamp(1rem, 4vw, 4rem);
    width: 100%;
}

.hero-philosophy {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero .cta-btn {
    font-size: 1.2rem;
    padding: 15px 40px;
    border-radius: 30px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.hero .cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.4);
}

/* Sections */
section {
    padding: 100px 5%;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    margin-bottom: 60px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

.product-info {
    padding: 30px;
}

.product-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.product-info p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.product-link {
    display: inline-block;
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.product-link:hover {
    text-shadow: 0 0 10px var(--accent-cyan);
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.team-member .avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(45deg, var(--accent-cyan), var(--accent-purple));
    padding: 3px;
}

.team-member .avatar-inner {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--glass-border);
}

.team-member h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.team-member p {
    color: var(--accent-purple);
    font-size: 0.9rem;
}

/* Pricing Section */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.pricing-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    transition: var(--transition);
}

.pricing-card.featured {
    border-color: var(--accent-purple);
    background: linear-gradient(180deg, rgba(138, 43, 226, 0.1) 0%, var(--bg-secondary) 100%);
    transform: scale(1.05);
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--accent-cyan);
}

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

.pricing-features {
    list-style: none;
    margin-bottom: 30px;
    text-align: left;
}

.pricing-features li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li::before {
    content: '✓';
    color: var(--accent-cyan);
}

/* Contact Section */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--glass-bg);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.05);
}

textarea.form-control {
    height: 120px;
    resize: vertical;
}

/* Login Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
    transform: translateY(-20px);
    transition: var(--transition);
    position: relative;
}

.modal-overlay.active .login-modal {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: white;
}

.login-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
}

/* Sub-page Specific Styles */
.page-header {
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-top: 80px;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(6, 9, 19, 0.5) 0%, var(--bg-main) 100%);
}

.page-header-content {
    position: relative;
    z-index: 10;
}

.page-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 5%;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 50px;
}

@media (max-width: 991px) {
    .navbar {
        height: 70px;
        padding: 0 5%;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 20px;
    }

    .navbar {
        height: 70px;
        padding: 0 20px;
    }

    /* Force hide the desktop login button absolutely */
    nav.navbar #openLogin {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
    }

    .mobile-menu-btn {
        display: flex !important;
        order: 10;
        margin-left: auto;
    }

    .nav-login-mobile {
        display: block;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        width: 75%;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        transition: 0.5s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        z-index: 2000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    /* Hamburger Animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

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

    .pricing-card.featured {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 18px;
    }
    
    .btn-primary {
        padding: 8px 16px;
        font-size: 14px;
    }
}