:root {
    --bg-color: #0c0a18;
    --card-bg: #1a1a1d;
    --text-color: #e0e0e0;
    --text-muted: #888;
    --primary-color: #a855f7;
    --secondary-color: #6366f1;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: #a855f7;
    --glow-color: rgba(168, 85, 247, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    background-image: radial-gradient(ellipse 80% 80% at 95% 95%, rgba(168, 85, 247, 0.15), transparent 50%),
                      radial-gradient(ellipse 60% 60% at 5% 95%, rgba(99, 102, 241, 0.1), transparent 50%);
    background-attachment: fixed;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: max-content;
    max-width: calc(100% - 40px);
}

.navbar-container {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: rgba(26, 26, 29, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-size: 20px;
    font-weight: 700;
    padding: 4px;
}

.logo img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 30px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-links a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.cta-button {
    background-image: linear-gradient(to right, var(--primary-color) 0%, var(--secondary-color) 50%, var(--primary-color) 100%);
    background-size: 200% auto;
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.4s ease;
}

.cta-button:hover {
    background-position: right center;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
    background-color: transparent !important;
}

#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100vh;
    min-height: 700px;
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -2px;
}

.highlight {
    background: -webkit-linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #b0b0b0;
}

section {
    padding: 300px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 70px auto;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    margin-bottom: 20px;
    background-image: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: transform 0.3s ease;
}

.icon-wrapper svg {
    width: 32px;
    height: 32px;
    color: white;
}

.about-card, .service-card, .security-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 35px 30px;
    border-radius: 16px;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover, .service-card:hover, .security-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px var(--glow-color);
}

.about-card:hover .icon-wrapper, .service-card:hover .icon-wrapper, .security-card:hover .icon-wrapper {
    transform: scale(1.1);
}

.about-card h3, .service-card h3, .security-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.values-grid { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 50px; }
.section-title.left-align { text-align: left; }
.value-list { list-style: none; margin-top: 20px; }
.value-list li { margin-bottom: 10px; position: relative; padding-left: 25px; }
.value-list li::before { content: '>'; position: absolute; left: 0; color: var(--primary-color); font-weight: bold; }
.values-image-wrapper { background: var(--card-bg); border-radius: 16px; padding: 40px; display: flex; justify-content: center; align-items: center; border: 1px solid var(--border-color); }
.values-image-wrapper svg { width: 100%; max-width: 200px; color: var(--primary-color); }
.security-card .icon-wrapper { margin: 0 auto 20px auto; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 35px 30px;
    border-radius: 16px;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
}

.contact-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px var(--glow-color);
}

.contact-card .icon-wrapper {
    margin: 0 auto 20px auto;
    overflow: hidden;
}

.contact-card .icon-wrapper img {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.contact-card .contact-link-text {
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-card:hover .contact-link-text {
    color: var(--primary-color);
}

footer { background-color: transparent; padding: 40px 0; border-top: 1px solid var(--border-color); text-align: center; }
.footer-links { margin-top: 15px; }
.footer-links a { color: var(--text-muted); text-decoration: none; margin: 0 15px; transition: color 0.3s ease; }
.footer-links a:hover { color: white; }

.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
    .values-grid { grid-template-columns: 1fr; }
    .values-image-wrapper { display: none; }
    .section-title.left-align { text-align: center; }
}

@media (max-width: 768px) {
    .nav-links li {
        display: none;
    }
    .nav-links li:last-child {
        display: block;
    }
    .hero-content { padding: 0 20px; }
    .hero-content h1 { font-size: 2.8rem; letter-spacing: -1px; }
    .about-grid, .security-grid, .contact-grid { grid-template-columns: 1fr; }
    section { padding: 180px 0; }
}



#error-404 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px); 
    padding: 80px 0;
    text-align: center;
    overflow: hidden; 
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-content .icon-wrapper-404 {
    margin-bottom: 24px;
}

.error-content .icon-wrapper-404 svg {
    width: 80px;
    height: 80px;
    fill: #8e44ad; 
}


.error-content h1 {
    font-size: 6rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 16px;
    background-image: linear-gradient(90deg, #4f46e5, #c026d3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-content h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #f0f0f0; 
    margin-bottom: 16px;
}

.error-content p {
    font-size: 1.125rem;
    color: #a0a0a0; 
    margin-bottom: 32px;
}


/* ===       LOGIN & DASHBOARD       === */

#login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 100px 0;
    text-align: center;
}

.login-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px 50px;
    border-radius: 16px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 10px 30px var(--glow-color);
}

.icon-wrapper-login {
    display: inline-flex;
    padding: 15px;
    border-radius: 50%;
    background-image: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin-bottom: 24px;
}
.icon-wrapper-login svg {
    color: white;
}

.login-container h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.login-container p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: #0c0a18;
    background-color: #f0f0f0; 
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 12px;
}

.google-btn img {
    width: 20px;
    height: 20px;
}

.google-btn:hover {
    background-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.google-btn:disabled {
    background-color: #555;
    color: var(--text-muted);
    cursor: wait;
}


.dashboard-body {
    background-image: none;
    background-color: var(--bg-color);
    padding-left: 260px; 
}

.dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

.sidebar-header {
    margin-bottom: 30px;
}

.sidebar-nav {
    flex-grow: 1; 
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.dashboard-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.dashboard-nav-link .nav-icon {
    transition: all 0.3s ease;
}

.dashboard-nav-link:hover .nav-icon {
    color: var(--primary-color);
}

.nav-link-loading {
    color: var(--text-muted);
    padding: 12px 16px;
    display: block;
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.user-profile-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.user-profile-display .profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile-display .profile-name {
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    width: 100%;
    text-align: center;
    padding: 10px !important; 
}

.dashboard-content {
    padding: 60px 40px;
}

.dashboard-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}


.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    z-index: 1100;
    cursor: pointer;
}

.hamburger-icon {
    position: relative;
    display: block;
    width: 20px;
    height: 2px;
    background-color: white;
    margin: 0 auto;
    transition: all 0.3s ease;
}
.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}
.hamburger-icon::before { top: -6px; }
.hamburger-icon::after { bottom: -6px; }

.mobile-nav-toggle.open .hamburger-icon {
    background-color: transparent;
}
.mobile-nav-toggle.open .hamburger-icon::before {
    transform: rotate(45deg);
    top: 0;
}
.mobile-nav-toggle.open .hamburger-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

@media (max-width: 768px) {
    .dashboard-body {
        padding-left: 0;
    }
    
    .dashboard-sidebar {
        transform: translateX(-100%);
    }
    
    .dashboard-sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 50px rgba(0, 0, 0, 0.5);
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    .dashboard-content {
        padding: 80px 20px 40px 20px;
    }

    .dashboard-content h1 {
        font-size: 2rem;
    }
}


.login-error-message {
    display: none;
    
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}