/* ImpHyve Modern Space Theme Styles */
/* Creative Commons Attribution-NonCommercial-NoDerivatives (CC BY-NC-ND) */

/* Modern Animated Starfield Background */
#stars, #stars2, #stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

#stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="white" opacity="0.6"/><circle cx="80" cy="30" r="0.5" fill="white" opacity="0.4"/><circle cx="40" cy="70" r="1.5" fill="white" opacity="0.7"/><circle cx="90" cy="80" r="0.8" fill="white" opacity="0.5"/><circle cx="10" cy="90" r="1.2" fill="white" opacity="0.6"/></svg>') repeat;
    animation: move-twink-back 200s linear infinite;
}

#stars2 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="30" cy="10" r="0.5" fill="%23ff1744" opacity="0.4"/><circle cx="70" cy="40" r="1" fill="%23ff1744" opacity="0.3"/><circle cx="15" cy="60" r="0.8" fill="%23ff1744" opacity="0.4"/><circle cx="85" cy="90" r="0.6" fill="%23ff1744" opacity="0.5"/></svg>') repeat;
    animation: move-twink-back 100s linear infinite;
}

#stars3 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="25" r="0.3" fill="%237c4dff" opacity="0.3"/><circle cx="25" cy="75" r="0.7" fill="%237c4dff" opacity="0.2"/><circle cx="75" cy="50" r="0.4" fill="%237c4dff" opacity="0.4"/></svg>') repeat;
    animation: move-twink-back 150s linear infinite;
}

@keyframes move-twink-back {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}

/* Cosmic Glow Effects */
.cosmic-glow {
    position: relative;
    overflow: hidden;
}

.cosmic-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 23, 68, 0.08) 0%, transparent 70%);
    animation: cosmic-pulse 6s ease-in-out infinite;
    pointer-events: none !important;
    z-index: -1;
}

@keyframes cosmic-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Nebula Background Effects */
.nebula-bg {
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(220, 20, 60, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(178, 34, 34, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(220, 20, 60, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #000000 0%, #1a0033 50%, #000000 100%);
}

/* Space-themed Cards */
.space-card {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(220, 20, 60, 0.3);
    border-radius: 15px;
    padding: 2rem;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 1;
    pointer-events: auto;
}

.space-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(220, 20, 60, 0.1), transparent);
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none !important;
    z-index: -1;
}

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

.space-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-crimson);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(220, 20, 60, 0.3);
}

/* Constellation Patterns */
.constellation {
    position: relative;
}

.constellation::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><line x1="20" y1="20" x2="80" y2="40" stroke="%23DC143C" stroke-width="0.5" opacity="0.3"/><line x1="80" y1="40" x2="120" y2="80" stroke="%23DC143C" stroke-width="0.5" opacity="0.3"/><line x1="120" y1="80" x2="160" y2="60" stroke="%23DC143C" stroke-width="0.5" opacity="0.3"/><line x1="160" y1="60" x2="180" y2="120" stroke="%23DC143C" stroke-width="0.5" opacity="0.3"/></svg>') no-repeat center;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.2;
}

/* Meteor Shower Effect */
.meteor-shower {
    position: relative;
    overflow: hidden;
}

.meteor-shower::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 2px;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--primary-crimson), transparent);
    animation: meteor-fall 3s linear infinite;
    opacity: 0.6;
}

@keyframes meteor-fall {
    0% { transform: translate(0, -100px) rotate(45deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(300px, 300px) rotate(45deg); opacity: 0; }
}

/* Planet-like Elements */
.planet {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(220, 20, 60, 0.8), rgba(178, 34, 34, 0.6), rgba(0, 0, 0, 0.8));
    position: relative;
    box-shadow: 
        inset -20px -20px 50px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(220, 20, 60, 0.3);
    animation: planet-rotate 20s linear infinite;
}

.planet::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 30%;
    height: 30%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(2px);
}

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

/* Aurora Effect */
.aurora {
    position: relative;
    overflow: hidden;
}

.aurora::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 20, 60, 0.2), transparent);
    animation: aurora-sweep 5s ease-in-out infinite;
}

@keyframes aurora-sweep {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* Space-themed Buttons */
.btn-cosmic {
    background: linear-gradient(45deg, var(--primary-black), var(--primary-crimson), var(--primary-black));
    background-size: 200% 200%;
    animation: cosmic-gradient 3s ease infinite;
    position: relative;
    overflow: hidden;
}

.btn-cosmic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: btn-shine 2s ease-in-out infinite;
}

@keyframes cosmic-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes btn-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Galaxy Spiral Effect */
.galaxy-spiral {
    position: relative;
}

.galaxy-spiral::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: conic-gradient(from 0deg, transparent, rgba(220, 20, 60, 0.1), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    animation: galaxy-rotate 30s linear infinite;
    pointer-events: none;
    opacity: 0.3;
}

@keyframes galaxy-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Dark Matter Effect */
.dark-matter {
    position: relative;
}

.dark-matter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.1) 70%, rgba(0, 0, 0, 0.3) 100%);
    border-radius: inherit;
    pointer-events: none;
}

/* Pulsar Effect */
.pulsar {
    animation: pulsar-pulse 2s ease-in-out infinite;
}

@keyframes pulsar-pulse {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(220, 20, 60, 0.5);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 20px rgba(220, 20, 60, 0.8), 0 0 40px rgba(220, 20, 60, 0.4);
        transform: scale(1.05);
    }
}

/* Black Hole Effect */
.black-hole {
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-black) 0%, rgba(220, 20, 60, 0.1) 70%, transparent 100%);
    animation: black-hole-suck 4s ease-in-out infinite;
}

@keyframes black-hole-suck {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

/* Responsive Space Effects */
@media (max-width: 768px) {
    .constellation::after,
    .galaxy-spiral::after {
        display: none;
    }
    
    .meteor-shower::before {
        animation-duration: 2s;
    }
    
    .planet {
        width: 60px;
        height: 60px;
    }
}

/* Accessibility - Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    #stars, #stars2, #stars3,
    .cosmic-glow::before,
    .meteor-shower::before,
    .planet,
    .aurora::before,
    .btn-cosmic,
    .galaxy-spiral::after,
    .pulsar,
    .black-hole {
        animation: none;
    }
}

/* Disable animations for mobile compatibility but keep basic interactions */
@media (max-width: 768px) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    
    input, textarea, select {
        cursor: text !important;
        pointer-events: auto !important;
    }
}




