/* Base Variables & Orbital Celestial Theme */
:root {
    /* Primary Deep Cosmic Navy Theme (Default) */
    --bg-color: #04060c;
    --bg-alt: #0a0d17;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #f6d860; /* Celestial Gold */
    --primary-hover: #ffed9a;
    --secondary: #00e5ff; /* Starlight Cyan */
    --border-color: rgba(0, 229, 255, 0.15);
    --card-bg: rgba(10, 13, 23, 0.7);
    --card-shadow: 0 0 20px rgba(0, 229, 255, 0.05), inset 0 0 0 1px rgba(246, 216, 96, 0.1);
    --glass-bg: rgba(4, 6, 12, 0.85);
    --header-blur: blur(12px);
}

[data-theme="light"] {
    /* Alternate lighter theme, though less emphasized for this aesthetic */
    --bg-color: #f0f4f8;
    --bg-alt: #e1e7f0;
    --text-main: #04060c;
    --text-muted: #475569;
    --primary: #d4a017;
    --primary-hover: #b8860b;
    --secondary: #0097a7;
    --border-color: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(240, 244, 248, 0.85);
}

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

html {
    scroll-behavior: smooth;
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

/* Decorative Background Grid & Stars */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: 
        linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
}

a:hover {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(246, 216, 96, 0.5);
}

img { max-width: 100%; height: auto; }

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

.section { padding: 100px 0; }
.bg-alt { background-color: var(--bg-alt); }

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-main);
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

.mt-4 { margin-top: 1.5rem; }

/* Grid System */
.grid { display: grid; gap: 30px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-primary {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(246, 216, 96, 0.2), inset 0 0 10px rgba(246, 216, 96, 0.1);
}
.btn-primary:hover {
    background: rgba(246, 216, 96, 0.1);
    box-shadow: 0 0 25px rgba(246, 216, 96, 0.4), inset 0 0 15px rgba(246, 216, 96, 0.2);
    transform: translateY(-2px);
    color: var(--primary-hover) !important;
}

.btn-outline {
    background: transparent;
    color: var(--secondary) !important;
    border-color: var(--secondary);
}
.btn-outline:hover {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
    color: #fff !important;
}

.btn-large { padding: 16px 32px; font-size: 1.125rem; }
.btn-full { width: 100%; }

/* Top Celestial Bar */
.top-bar {
    background: #020308;
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    font-size: 0.8rem;
    padding: 6px 0;
    color: var(--secondary);
    letter-spacing: 1px;
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-left span { margin-right: 15px; }
.coord-header { font-weight: bold; color: var(--primary); }
.console-btn { color: var(--primary); font-weight: bold; }
.console-btn:hover { color: #fff; text-shadow: 0 0 5px var(--primary); }

/* Header & Nav */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--header-blur);
    -webkit-backdrop-filter: var(--header-blur);
    border-bottom: 1px solid var(--border-color);
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo a {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.8);
}
.logo a::before {
    content: '✦ ';
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}
.desktop-nav a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}
.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}
.desktop-nav a:hover::after { width: 100%; }
.desktop-nav a:hover { color: var(--primary); }

/* Theme Toggle Button */
.theme-toggle {
    background: rgba(0, 229, 255, 0.1);
    border: 2px solid var(--secondary);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    transition: all 0.3s ease;
}
.theme-toggle:hover {
    background: var(--secondary);
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(246, 216, 96, 0.6);
}
.theme-toggle svg {
    width: 22px;
    height: 22px;
    transition: all 0.3s ease;
}

/* Moon Icon (Dark Mode) */
.theme-toggle .moon-icon {
    stroke: #ffffff;
    stroke-width: 2;
    fill: rgba(0, 229, 255, 0.3);
}
.theme-toggle:hover .moon-icon {
    stroke: #000000;
    fill: #000000;
}

/* Sun Icon & Light Mode Button Overrides */
[data-theme="light"] .theme-toggle {
    border-color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.4);
}
[data-theme="light"] .theme-toggle .sun-icon {
    stroke: #ff9800;
    stroke-width: 2.5;
    fill: rgba(255, 152, 0, 0.2);
}
[data-theme="light"] .theme-toggle:hover {
    background: #ff9800;
    border-color: #e65100;
    box-shadow: 0 0 25px rgba(255, 152, 0, 0.6);
}
[data-theme="light"] .theme-toggle:hover .sun-icon {
    stroke: #ffffff;
    fill: #ffffff;
}

[data-theme="light"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: none; }

/* Hero Section */
.hero {
    padding: 100px 0 80px;
}
.hero-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.hero-text-content {
    max-width: 800px;
    margin-bottom: 40px;
    z-index: 2;
}
.hero h1 {
    font-size: 3.5rem;
    line-height: 1.3;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .hero h1 {
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 229, 255, 0.5);
}
[data-theme="dark"] .gradient-text {
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}
.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 24px;
}
.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 50%;
    box-shadow: 0 0 80px rgba(0, 229, 255, 0.15);
    animation: float 6s ease-in-out infinite;
}
.hero-globe {
    width: 100%;
    height: auto;
    border-radius: 50%;
    transition: filter 0.4s ease;
}

[data-theme="dark"] .hero-globe {
    mix-blend-mode: screen;
}

[data-theme="light"] .hero-globe {
    filter: invert(1) hue-rotate(180deg) contrast(1.2);
    mix-blend-mode: multiply;
}

[data-theme="light"] .hero-image-wrapper {
    box-shadow: 0 0 80px rgba(255, 152, 0, 0.15);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Glass Cards */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 32px;
    transition: all 0.4s ease;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}
.glass-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0,229,255,0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}
.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(246, 216, 96, 0.4);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.15), inset 0 0 0 1px rgba(246, 216, 96, 0.3);
}
.glass-card:hover::before { opacity: 1; }

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--primary);
}
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Special Cards */
.special-card { padding: 40px; }
.special-card h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

/* Pricing Table */
.pricing-card {
    text-align: center;
    display: flex;
    flex-direction: column;
}
.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(246, 216, 96, 0.15), inset 0 0 0 1px rgba(246, 216, 96, 0.3);
}
.pricing-card.popular h3 { color: var(--primary); }
.badge {
    position: absolute;
    top: 0; right: 0;
    background: var(--primary);
    color: #000;
    padding: 4px 16px;
    border-bottom-left-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}
.price {
    font-size: 3rem;
    font-weight: 800;
    margin: 24px 0;
    color: var(--text-main);
}
[data-theme="dark"] .price {
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}
.price span:first-child { font-size: 1.5rem; vertical-align: super; color: var(--secondary); }
.price .period { font-size: 1rem; color: var(--text-muted); font-weight: normal; }
.features-list {
    list-style: none;
    margin-bottom: 32px;
    flex-grow: 1;
}
.features-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.95rem;
}
.features-list li::before {
    content: '✦';
    color: var(--secondary);
    margin-right: 8px;
    font-size: 0.8rem;
}

/* Testimonials */
.testimonial-card .stars {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 16px;
    letter-spacing: 2px;
}
.testimonial-card p {
    font-style: italic;
    margin-bottom: 24px;
    color: var(--text-muted);
}
.testimonial-card .author {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.9rem;
}

/* FAQ */
.faq-container { max-width: 800px; }
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 16px;
    background: var(--card-bg);
}
.faq-question {
    padding: 20px;
    cursor: pointer;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
}
.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s;
}
.faq-item.active .faq-question::after {
    transform: rotate(45deg);
    color: var(--secondary);
}
.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 200px;
}
.faq-answer p { color: var(--text-muted); }

/* Footer */
footer {
    background: #020308;
    border-top: 1px solid rgba(0, 229, 255, 0.2);
    padding: 60px 0 24px;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #fff;
    letter-spacing: 1px;
}
.footer-info p { color: var(--text-muted); font-size: 0.9rem; }
.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.85rem;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .top-bar { display: none; }
    .desktop-nav { display: none; }
    .hero h1 { font-size: 2.2rem; }
    .hero .subtitle { font-size: 1rem; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; }
    .section { padding: 60px 0; }
    .footer-container { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
    .grid-4 { grid-template-columns: 1fr; }
}
