/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Deep purple cosmic animated background */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(147, 51, 234, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
        linear-gradient(180deg, #1a0b2e 0%, #16213e 25%, #0f3460 50%, #16213e 75%, #1a0b2e 100%);
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent),
        radial-gradient(1px 1px at 200px 60px, rgba(120, 200, 255, 0.8), transparent),
        radial-gradient(3px 3px at 250px 90px, rgba(255, 200, 120, 0.6), transparent);
    background-repeat: repeat;
    background-size: 300px 200px;
}

.layer-1 {
    animation: moveStars 25s linear infinite;
    opacity: 0.4;
    background-size: 250px 150px;
}

.layer-2 {
    animation: moveStars 40s linear infinite reverse;
    opacity: 0.6;
    background-size: 350px 200px;
}

.layer-3 {
    animation: moveStars 60s linear infinite;
    opacity: 0.8;
    background-size: 450px 250px;
}

@keyframes moveStars {
    from {
        transform: translateY(0px) translateX(0px);
    }
    to {
        transform: translateY(-200px) translateX(-50px);
    }
}

/* Container and layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 4rem;
}

.title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #64b3f4 25%, 
        #c24cf5 50%, 
        #fd79a8 75%, 
        #fdcb6e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 50px rgba(255, 255, 255, 0.4);
    animation: titleGlow 4s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% {
        filter: brightness(1) saturate(1);
        text-shadow: 0 0 50px rgba(255, 255, 255, 0.4);
    }
    100% {
        filter: brightness(1.2) saturate(1.3);
        text-shadow: 0 0 80px rgba(100, 179, 244, 0.6);
    }
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.credit {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.7;
    font-style: italic;
}

/* Main content */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}

/* 3D Cube styles */
.cube-container {
    perspective: 1000px;
    margin: 2rem 0;
}

.cube {
    position: relative;
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    animation: rotateCube 20s linear infinite;
    transition: transform 0.3s ease;
}

.cube:hover {
    animation-play-state: paused;
    transform: rotateX(-15deg) rotateY(45deg);
}

@keyframes rotateCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(147, 51, 234, 0.6);
    background: linear-gradient(135deg, 
        rgba(147, 51, 234, 0.2) 0%, 
        rgba(124, 58, 237, 0.15) 50%, 
        rgba(168, 85, 247, 0.1) 100%);
    backdrop-filter: blur(20px);
    box-shadow: 
        inset 0 0 40px rgba(147, 51, 234, 0.15),
        0 0 30px rgba(147, 51, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.front {
    transform: rotateY(0deg) translateZ(100px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.back {
    transform: rotateY(180deg) translateZ(100px);
}

.right {
    transform: rotateY(90deg) translateZ(100px);
}

.left {
    transform: rotateY(-90deg) translateZ(100px);
}

.top {
    transform: rotateX(90deg) translateZ(100px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(100px);
}

.cube-content {
    text-align: center;
    padding: 1rem;
    position: relative;
    z-index: 2;
}

.plugin-text {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Tech grid overlay */
.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(147, 51, 234, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 51, 234, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

/* Circuit lines */
.circuit-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.line {
    position: absolute;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(147, 51, 234, 0.6) 20%, 
        rgba(168, 85, 247, 0.8) 50%, 
        rgba(147, 51, 234, 0.6) 80%, 
        transparent 100%);
    animation: dataFlow 3s linear infinite;
}

.horizontal-1 {
    top: 30%;
    left: 0;
    width: 100%;
    height: 2px;
}

.horizontal-2 {
    bottom: 40%;
    left: 0;
    width: 100%;
    height: 1px;
    animation-delay: 1.5s;
}

.vertical-1 {
    left: 25%;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(0deg, 
        transparent 0%, 
        rgba(147, 51, 234, 0.6) 20%, 
        rgba(168, 85, 247, 0.8) 50%, 
        rgba(147, 51, 234, 0.6) 80%, 
        transparent 100%);
    animation-delay: 0.5s;
}

.vertical-2 {
    right: 30%;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(0deg, 
        transparent 0%, 
        rgba(147, 51, 234, 0.6) 20%, 
        rgba(168, 85, 247, 0.8) 50%, 
        rgba(147, 51, 234, 0.6) 80%, 
        transparent 100%);
    animation-delay: 2s;
}

@keyframes dataFlow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
        filter: brightness(1.5);
    }
}

/* Tech pattern for back face */
.tech-pattern {
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(147, 51, 234, 0.4) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(168, 85, 247, 0.3) 1px, transparent 1px),
        linear-gradient(45deg, transparent 48%, rgba(147, 51, 234, 0.1) 49%, rgba(147, 51, 234, 0.1) 51%, transparent 52%);
    background-size: 40px 40px, 30px 30px, 20px 20px;
}

/* Side ports */
.side-ports {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    padding: 2rem 0;
}

.port {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(147, 51, 234, 0.8);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    position: relative;
}

.port::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: rgba(147, 51, 234, 0.6);
    border-radius: 50%;
    animation: portPulse 2s ease-in-out infinite;
}

@keyframes portPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* Side vents */
.side-vents {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    padding: 1rem 0;
}

.vent {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(147, 51, 234, 0.3) 20%, 
        rgba(147, 51, 234, 0.6) 50%, 
        rgba(147, 51, 234, 0.3) 80%, 
        transparent 100%);
    border-radius: 2px;
}

/* Top interface */
.top-interface {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 2rem;
}

.interface-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(147, 51, 234, 0.8);
    box-shadow: 
        0 0 10px rgba(147, 51, 234, 0.6),
        inset 0 0 4px rgba(255, 255, 255, 0.2);
    animation: interfaceBlink 4s ease-in-out infinite;
}

.interface-dot:nth-child(2) {
    animation-delay: 1.3s;
}

.interface-dot:nth-child(3) {
    animation-delay: 2.6s;
}

@keyframes interfaceBlink {
    0%, 90%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    5%, 10% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* Base connectors */
.base-connectors {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 3rem;
}

.connector {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(147, 51, 234, 0.8);
    background: rgba(0, 0, 0, 0.7);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    position: relative;
}

.connector::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: rgba(147, 51, 234, 0.6);
    border-radius: 50%;
}

.status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle, #ff6b6b 0%, #ff4757 100%);
    margin: 0 auto 1rem;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 
        0 0 20px rgba(255, 107, 107, 0.6),
        0 0 40px rgba(255, 107, 107, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.2);
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
        box-shadow: 
            0 0 20px rgba(255, 107, 107, 0.6),
            0 0 40px rgba(255, 107, 107, 0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
        box-shadow: 
            0 0 30px rgba(255, 107, 107, 0.8),
            0 0 60px rgba(255, 107, 107, 0.5);
    }
}

/* Description */
.description {
    max-width: 800px;
    text-align: center;
}

.description-text {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    line-height: 1.8;
    opacity: 0.9;
    font-weight: 400;
}

/* Ecosystem section */
.ecosystem {
    width: 100%;
    max-width: 600px;
    text-align: center;
    margin: 2rem 0;
}

.ecosystem-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.ecosystem-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.ecosystem-link {
    color: rgba(147, 51, 234, 0.9);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 8px;
    background: rgba(147, 51, 234, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 200px;
    display: inline-block;
}

.ecosystem-link:hover {
    color: #fff;
    background: rgba(147, 51, 234, 0.2);
    border-color: rgba(147, 51, 234, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(147, 51, 234, 0.2);
}

@media (min-width: 768px) {
    .ecosystem-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .ecosystem-link {
        min-width: 160px;
    }
}

/* Features section */
.features {
    width: 100%;
    max-width: 1000px;
}

.features-title {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: linear-gradient(135deg, 
        rgba(147, 51, 234, 0.08) 0%, 
        rgba(124, 58, 237, 0.05) 50%, 
        rgba(168, 85, 247, 0.03) 100%);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.4s ease;
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(147, 51, 234, 0.15), 
        transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    background: linear-gradient(135deg, 
        rgba(147, 51, 234, 0.15) 0%, 
        rgba(124, 58, 237, 0.1) 50%, 
        rgba(168, 85, 247, 0.08) 100%);
    border-color: rgba(147, 51, 234, 0.5);
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(147, 51, 234, 0.3);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.feature-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.feature-content p {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
    font-size: 0.9rem;
}

.footer-contact {
    margin-bottom: 1rem;
}

.footer-contact p {
    margin: 0.5rem 0;
}

.footer-notice {
    opacity: 0.7;
    font-size: 0.8rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }
    
    .header {
        margin-bottom: 3rem;
    }
    
    .main-content {
        gap: 3rem;
    }
    
    .cube {
        width: 150px;
        height: 150px;
    }
    
    .face {
        width: 150px;
        height: 150px;
    }
    
    .front {
        transform: rotateY(0deg) translateZ(75px);
    }
    
    .back {
        transform: rotateY(180deg) translateZ(75px);
    }
    
    .right {
        transform: rotateY(90deg) translateZ(75px);
    }
    
    .left {
        transform: rotateY(-90deg) translateZ(75px);
    }
    
    .top {
        transform: rotateX(90deg) translateZ(75px);
    }
    
    .bottom {
        transform: rotateX(-90deg) translateZ(75px);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 0.25rem;
    }
    
    .cube {
        width: 120px;
        height: 120px;
    }
    
    .face {
        width: 120px;
        height: 120px;
    }
    
    .front {
        transform: rotateY(0deg) translateZ(60px);
    }
    
    .back {
        transform: rotateY(180deg) translateZ(60px);
    }
    
    .right {
        transform: rotateY(90deg) translateZ(60px);
    }
    
    .left {
        transform: rotateY(-90deg) translateZ(60px);
    }
    
    .top {
        transform: rotateX(90deg) translateZ(60px);
    }
    
    .bottom {
        transform: rotateX(-90deg) translateZ(60px);
    }
}

/* Performance optimizations */
.stars, .cube, .feature-card {
    will-change: transform;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.feature-card:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}
