/* ========================================
   MoonWX Network - Main Stylesheet
   ======================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.02);
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --accent-moon: #e8d5b7;
    --accent-glow: #ffedc2;
    --accent-blue: #4a9eff;
    --accent-purple: #a855f7;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --gradient-moon: linear-gradient(135deg, #e8d5b7 0%, #ffedc2 50%, #f5e6cf 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   Animated Background
   ======================================== */

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

.bg-canvas::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse 800px 600px at 20% 20%, rgba(232, 213, 183, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 600px 400px at 80% 80%, rgba(74, 158, 255, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 400px 300px at 60% 30%, rgba(168, 85, 247, 0.04) 0%, transparent 50%);
    animation: bgFloat 30s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, 1%) rotate(1deg); }
    66% { transform: translate(-1%, 2%) rotate(-1deg); }
}

/* Stars Effect */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 50%;
    opacity: 0;
    animation: twinkle 4s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.8; transform: scale(1); }
}

/* ========================================
   Navigation
   ======================================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-moon);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(232, 213, 183, 0.3);
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 8px;
    width: 8px;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 20px;
    width: 5px;
    height: 5px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
}

.logo-text {
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.logo-text span {
    color: var(--accent-moon);
}

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

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-moon);
    transition: width 0.3s ease;
}

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

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-asn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-asn:hover {
    border-color: var(--accent-moon);
    color: var(--accent-moon);
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
}

.lang-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: var(--accent-moon);
    color: var(--bg-primary);
}

.lang-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
}

.hero-moon {
    width: 180px;
    height: 180px;
    background: var(--gradient-moon);
    border-radius: 50%;
    margin-bottom: 3rem;
    position: relative;
    box-shadow: 
        0 0 60px rgba(232, 213, 183, 0.4),
        0 0 120px rgba(232, 213, 183, 0.2),
        inset -20px -10px 40px rgba(0, 0, 0, 0.1);
    animation: moonFloat 6s ease-in-out infinite;
}

.hero-moon::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 30px;
    width: 25px;
    height: 25px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
}

.hero-moon::after {
    content: '';
    position: absolute;
    top: 60px;
    left: 80px;
    width: 15px;
    height: 15px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 50%;
}

@keyframes moonFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-moon) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
    font-weight: 300;
}

.hero-asn {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.asn-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.asn-badge:hover {
    border-color: var(--accent-moon);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(232, 213, 183, 0.1);
}

.asn-badge .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.asn-badge .value {
    color: var(--accent-moon);
}

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

/* ========================================
   Buttons
   ======================================== */

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

.btn-primary {
    background: var(--gradient-moon);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(232, 213, 183, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background: var(--bg-card);
}

/* ========================================
   Stats Section
   ======================================== */

.stats {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.stats-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: rgba(232, 213, 183, 0.2);
    transform: translateY(-4px);
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-moon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

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

/* ========================================
   Section Common Styles
   ======================================== */

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-moon);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ========================================
   Services Section
   ======================================== */

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    padding: 2.5rem;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

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

.service-card:hover {
    border-color: rgba(232, 213, 183, 0.2);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(232, 213, 183, 0.1) 0%, rgba(232, 213, 183, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   Network Info Section
   ======================================== */

.network-info {
    padding: 8rem 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

.network-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.network-details h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.network-details p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.info-list .label {
    color: var(--text-secondary);
    min-width: 100px;
}

.info-list .value {
    color: var(--accent-moon);
}

.network-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.globe-container {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid var(--border-subtle);
    position: relative;
    animation: globeRotate 20s linear infinite;
}

@keyframes globeRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.globe-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border: 1px dashed var(--border-subtle);
    border-radius: 50%;
}

.globe-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(60deg);
    width: 80%;
    height: 80%;
    border: 1px dashed var(--border-subtle);
    border-radius: 50%;
}

.node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--accent-moon);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-moon);
}

.node:nth-child(1) { top: 20%; left: 30%; }
.node:nth-child(2) { top: 40%; right: 15%; }
.node:nth-child(3) { bottom: 25%; left: 20%; }
.node:nth-child(4) { top: 60%; right: 30%; }

/* ========================================
   Peering Section
   ======================================== */

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

.peering-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.peering-text h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.peering-text p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.peering-policy {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
}

.peering-policy h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.policy-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.policy-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.policy-list li::before {
    content: '✓';
    color: var(--accent-moon);
    font-weight: 600;
}

.peering-form {
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(232, 213, 183, 0.05) 0%, rgba(232, 213, 183, 0.02) 100%);
    border: 1px solid rgba(232, 213, 183, 0.15);
    border-radius: 16px;
}

.peering-form h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.peering-form .subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    border-color: var(--accent-moon);
    background: rgba(232, 213, 183, 0.05);
}

.contact-btn svg {
    width: 20px;
    height: 20px;
    color: var(--accent-moon);
}

/* ========================================
   Footer
   ======================================== */

footer {
    padding: 4rem 2rem 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copy {
    width: 100%;
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .network-container,
    .peering-content {
        grid-template-columns: 1fr;
    }
    
    .network-visual {
        order: -1;
        height: 300px;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1rem 1.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-center {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-asn {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
