/* Base Styles & Variables */
:root {
    --bg-dark: #020611;
    --bg-darker: #010308;
    --accent-cyan: #00f0ff;
    --accent-blue: #0066ff;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

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

.section {
    padding: 100px 0;
    position: relative;
    z-index: 2;
}

.bg-darker {
    background-color: var(--bg-darker);
}

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

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
    opacity: 0.9;
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(2, 6, 17, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 1px;
}

.logo-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

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

.nav-links a:not(.btn-primary):hover {
    color: var(--accent-cyan);
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(0,102,255,0.4) 0%, rgba(0,0,0,0) 70%);
    top: -20vh;
    left: -10vw;
}

.orb-2 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(0,240,255,0.3) 0%, rgba(0,0,0,0) 70%);
    bottom: -10vh;
    right: -10vw;
    animation-delay: -5s;
}

.grid-overlay {
    position: absolute;
    bottom: -50px;
    left: -50%;
    width: 200%;
    height: 50vh;
    background-image: 
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(75deg);
    animation: gridMove 20s linear infinite;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black);
    mask-image: linear-gradient(to bottom, transparent, black);
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--accent-blue);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

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

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

/* About Section */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: #fff;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--accent-cyan);
    margin-bottom: 24px;
    font-weight: 500;
}

.section-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.glass-panel {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, var(--accent-cyan), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

.code-snippet {
    background: #0a0f1c;
    border-radius: 22px;
    padding: 24px;
    font-family: monospace;
}

.dots {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dots span:nth-child(1) { background: #ff5f56; }
.dots span:nth-child(2) { background: #ffbd2e; }
.dots span:nth-child(3) { background: #27c93f; }

pre {
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.5;
    overflow-x: auto;
}
pre code {
    color: #a5b4fc;
}

/* Services */
.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    justify-content: center;
}


.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 240, 255, 0.08), transparent 40%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.glass-card:hover::after {
    opacity: 1;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(0, 240, 255, 0.1);
}

.service-icon {
    font-size: 2.2rem;
    margin-bottom: 20px;
    display: inline-block;
    padding: 16px;
    background: rgba(0, 102, 255, 0.1);
    border-radius: 16px;
    color: var(--accent-cyan);
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #fff;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Value Banner */
.glass-banner {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1), rgba(0, 240, 255, 0.05));
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 24px;
    padding: 60px 40px;
    backdrop-filter: blur(10px);
}

.glass-banner h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #fff;
}

.glass-banner p {
    font-size: 1.15rem;
    color: var(--text-muted);
}

/* CTA Section */
.cta-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 50px; }
}

/* Reveal Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 1s ease, transform 1s ease;
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s ease;
}

.active {
    opacity: 1 !important;
    transform: translate(0) !important;
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* Custom Cursor Tracker base size */
@media (pointer: fine) {
    .cursor-glow {
        position: fixed;
        width: 400px;
        height: 400px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(0,240,255,0.1) 0%, rgba(0,0,0,0) 70%);
        pointer-events: none;
        transform: translate(-50%, -50%);
        z-index: 9999;
        mix-blend-mode: screen;
        transition: width 0.3s, height 0.3s, background 0.3s;
    }
}

/* Sea Creatures Background */
.sea-creatures {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.creature {
    position: absolute;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
    white-space: pre;
    opacity: 0.15;
    text-shadow: 0 0 8px currentColor;
    user-select: none;
}

.creature pre {
    margin: 0;
    font-family: inherit;
    color: inherit;
    overflow: visible;
}

.bit-crab {
    color: var(--accent-cyan);
    bottom: 5%;
    left: -200px;
    animation: crawlX 35s linear infinite, crawlY 2s ease-in-out infinite alternate;
}

.bit-fish.fish-1 {
    color: var(--accent-blue);
    top: 25%;
    left: -200px;
    animation: swimX 25s linear infinite, swimY 3s ease-in-out infinite alternate;
}

.bit-fish.fish-2 {
    color: var(--accent-cyan);
    top: 65%;
    right: -200px;
    transform: scaleX(-1);
    animation: swimXReverse 30s linear infinite, swimY 4s ease-in-out infinite alternate;
    opacity: 0.1;
    font-size: 0.9rem;
}

.bit-jellyfish {
    color: #b088ff;
    bottom: -200px;
    left: 40%;
    animation: floatY 40s linear infinite, floatX 5s ease-in-out infinite alternate;
}

@keyframes swimX {
    0% { left: -200px; }
    100% { left: 100vw; }
}

@keyframes swimXReverse {
    0% { right: -200px; transform: scaleX(-1); }
    100% { right: 100vw; transform: scaleX(-1); }
}

@keyframes swimY {
    0% { margin-top: -20px; }
    100% { margin-top: 20px; }
}

@keyframes crawlX {
    0% { left: -200px; }
    100% { left: 100vw; }
}

@keyframes crawlY {
    0% { margin-bottom: 0px; }
    100% { margin-bottom: 15px; }
}

@keyframes floatY {
    0% { bottom: -200px; opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { bottom: 100vh; opacity: 0; }
}

@keyframes floatX {
    0% { margin-left: -30px; }
    100% { margin-left: 30px; }
}

/* Responsive */
@media (max-width: 900px) {
    .hero h1 { font-size: 3rem; }
    .layout-grid { grid-template-columns: 1fr; gap: 40px; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .nav-links { display: none; }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 2.5rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
    .glass-banner { padding: 40px 20px; }
    .cta-title { font-size: 2rem; }
}
