/* Space-themed custom animations and styles */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.6; }
    33% { transform: translateY(-15px) rotate(120deg); opacity: 0.8; }
    66% { transform: translateY(-10px) rotate(240deg); opacity: 1; }
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(50px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(50px) rotate(-360deg); }
}

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

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 5px rgba(57, 255, 57, 0.3); }
    50% { box-shadow: 0 0 20px rgba(57, 255, 57, 0.6), 0 0 40px rgba(57, 255, 57, 0.3); }
}

@keyframes cabbage-glow {
    0%, 100% { text-shadow: 0 0 5px rgba(57, 255, 57, 0.5); }
    50% { text-shadow: 0 0 15px rgba(57, 255, 57, 0.8), 0 0 25px rgba(57, 255, 57, 0.4); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-orbit {
    animation: orbit 8s linear infinite;
}

.animate-grow {
    animation: grow 3s ease-in-out infinite;
}

.animate-pulse-green {
    animation: pulse-green 2s ease-in-out infinite;
}

.cabbage-particle {
    font-size: 1.5rem;
    animation: cabbage-glow 3s ease-in-out infinite;
}

/* Cosmic button effects */
.cosmic-button {
    animation: pulse-green 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.cosmic-button:hover {
    animation: none;
    box-shadow: 0 0 30px rgba(57, 255, 57, 0.8), 0 0 50px rgba(0, 212, 255, 0.4);
}

.cosmic-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cosmic-button:hover::before {
    left: 100%;
}

/* Cosmic panel effects */
.cosmic-panel {
    position: relative;
    backdrop-filter: blur(10px);
}

.cosmic-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(45deg, rgba(57, 255, 57, 0.2), rgba(0, 212, 255, 0.2));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.glow-panel {
    box-shadow: 0 0 20px rgba(57, 255, 57, 0.1), inset 0 1px 0 rgba(57, 255, 57, 0.1);
}

/* Custom cosmic slider styles */
.cosmic-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: linear-gradient(to right, #2d442d, #39ff39);
    outline: none;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cosmic-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #39ff39, #00d4ff);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(57, 255, 57, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    border: 2px solid #1a2e1a;
}

.cosmic-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #39ff39, #00d4ff);
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #1a2e1a;
    box-shadow: 0 0 15px rgba(57, 255, 57, 0.6);
}

/* Focus glow effects */
.glow-on-focus:focus {
    box-shadow: 0 0 0 2px rgba(57, 255, 57, 0.3), 0 0 15px rgba(57, 255, 57, 0.2);
}

.cosmic-textarea:focus {
    box-shadow: 0 0 0 2px rgba(57, 255, 57, 0.3), 0 0 20px rgba(57, 255, 57, 0.1);
}

/* Custom space scrollbar */
.space-scroll::-webkit-scrollbar {
    width: 8px;
}

.space-scroll::-webkit-scrollbar-track {
    background: rgba(45, 68, 45, 0.3);
    border-radius: 4px;
}

.space-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #39ff39, #00d4ff);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.space-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #00d4ff, #39ff39);
}

/* Enhanced form styling */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #39ff39 !important;
    box-shadow: 0 0 0 3px rgba(57, 255, 57, 0.1);
}

/* Cosmic button hover effects */
button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

button:not(:disabled):active {
    transform: translateY(0px);
}

/* Space-themed loading animation */
@keyframes cosmic-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-cosmic-spin {
    animation: cosmic-spin 4s linear infinite;
}

/* Holographic text effects */
.holographic-text {
    background: linear-gradient(45deg, #39ff39, #00d4ff, #39ff39, #00d4ff);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: holographic-shift 4s ease-in-out infinite;
}

@keyframes holographic-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Space particle effects */
.space-particle {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

/* Responsive space design */
@media (max-width: 768px) {
    .cosmic-panel {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .font-space {
        font-size: 0.9em;
    }
    
    .cabbage-particle {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .space-scroll {
        max-height: 200px;
    }
}

/* Cosmic tab enhancements */
.cosmic-tab {
    position: relative;
    transition: all 0.3s ease;
}

.cosmic-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #39ff39, #00d4ff);
    box-shadow: 0 0 10px rgba(57, 255, 57, 0.6);
}

/* Enhanced backdrop blur */
.cosmic-backdrop {
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
}