* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: rgba(0, 0, 0, 0.1);
    --primary-glow: rgba(99, 102, 241, 0.4);
    --success-glow: rgba(34, 197, 94, 0.4);
    --warning-glow: rgba(251, 191, 36, 0.4);
    --danger-glow: rgba(239, 68, 68, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Particles */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Glass Effect Components */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%) brightness(110%);
    -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(110%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);
    border-radius: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.12);
}

/* Navigation */
nav {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 1rem 2rem;
    width: 90%;
    max-width: 1200px;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Main Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 6rem;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero p {
    font-size: 1.5rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    border-radius: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 40px var(--primary-glow);
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 6rem;
}

.feature-card {
    padding: 2.5rem;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 30px var(--primary-glow);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.feature-card p {
    opacity: 0.85;
    line-height: 1.6;
}

/* Dashboard Preview */
.dashboard-preview {
    margin-bottom: 6rem;
}

.dashboard-preview h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* Topology Map */
.topology-map {
    padding: 2rem;
    position: relative;
    min-height: 500px;
}

.map-canvas {
    position: relative;
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-node {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.device-node:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 0 30px var(--primary-glow);
    z-index: 10;
}

.device-node.healthy {
    border-color: #22c55e;
    box-shadow: 0 0 20px var(--success-glow);
}

.device-node.warning {
    border-color: #fbbf24;
    box-shadow: 0 0 20px var(--warning-glow);
}

.device-node.critical {
    border-color: #ef4444;
    box-shadow: 0 0 20px var(--danger-glow);
    animation: pulseAlert 1s ease-in-out infinite;
}

@keyframes pulseAlert {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px var(--danger-glow);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px var(--danger-glow);
    }
}

.device-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.device-label {
    font-size: 0.75rem;
    font-weight: 600;
}

.connection-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    transform-origin: left center;
    pointer-events: none;
}

/* Health Stats */
.health-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-card {
    padding: 2rem;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stat-title {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
}

.stat-value.success { color: #22c55e; }
.stat-value.warning { color: #fbbf24; }
.stat-value.danger { color: #ef4444; }

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    border-radius: 1.5rem;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, #22c55e 0%, #10b981 100%);
}

.progress-fill.warning {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.progress-fill.danger {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* Anomaly Detection */
.anomaly-section {
    margin-bottom: 6rem;
}

.anomaly-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

.anomaly-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.anomaly-item {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.anomaly-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.anomaly-badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.anomaly-badge.critical {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.anomaly-badge.warning {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #fcd34d;
}

.anomaly-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.anomaly-details p {
    opacity: 0.7;
    font-size: 0.9rem;
}

.anomaly-time {
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Footer */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3rem 2rem;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    list-style: none;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .nav-links {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
    }
}
