/* Universal Planet Animations - CSS/SVG based, works everywhere */

/* Planet container styles */
.planet-3d-css {
    width: 220px;
    height: 220px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: transparent; /* Kein schwarzer Hintergrund mehr */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Base planet sphere */
.planet-sphere {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    animation: rotate-planet 20s linear infinite;
    box-shadow: 
        inset -25px -25px 40px rgba(0,0,0,0.5),
        inset 5px 5px 15px rgba(255,255,255,0.2),
        0 0 30px rgba(0,0,0,0.2);
}

/* Planet rotation - 2D clockwise */
@keyframes rotate-planet {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Planet color themes */
.planet-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #1a5490 100%);
}

.planet-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #3a1c71 100%);
}

.planet-green {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 50%, #2a5a1c 100%);
}

.planet-orange {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #c73e1d 100%);
}

/* Glossy surface overlay */
.planet-texture {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.6;
    background: radial-gradient(
        ellipse at 35% 35%,
        rgba(255,255,255,0.6) 0%,
        rgba(255,255,255,0.3) 15%,
        rgba(255,255,255,0.1) 30%,
        transparent 60%
    );
    pointer-events: none;
}

/* Atmospheric glow */
.planet-atmosphere {
    position: absolute;
    width: 110%;
    height: 110%;
    border-radius: 50%;
    top: -5%;
    left: -5%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255,255,255,0.3) 0%, 
        transparent 50%);
    filter: blur(3px);
    animation: pulse-atmosphere 4s ease-in-out infinite;
}

@keyframes pulse-atmosphere {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.9; }
}

/* Ring system for ringed planets */
.planet-rings {
    position: absolute;
    width: 200px;
    height: 60px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(75deg);
    pointer-events: none;
}

.ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid;
    /* Keine Animation - Ringe bleiben statisch */
}

.ring-1 {
    border-color: rgba(255,255,255,0.3);
    border-width: 2px;
    transform: scale(1);
}

.ring-2 {
    border-color: rgba(255,255,255,0.2);
    border-width: 4px;
    transform: scale(1.2);
}

.ring-3 {
    border-color: rgba(255,255,255,0.1);
    border-width: 6px;
    transform: scale(1.4);
}

/* Solar system planets with moons */
.solar-system {
    width: 220px;
    height: 220px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.central-planet {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    z-index: 2;
    animation: rotate-planet 15s linear infinite;
    box-shadow: 
        inset -15px -15px 30px rgba(0,0,0,0.5),
        inset 3px 3px 10px rgba(255,255,255,0.2),
        0 0 30px rgba(255,255,255,0.1);
}

.orbit {
    position: absolute;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: rotate-orbit 20s linear infinite;
}

.orbit-1 {
    width: 150px;
    height: 150px;
    animation-duration: 10s;
}

.orbit-2 {
    width: 190px;
    height: 190px;
    animation-duration: 15s;
    animation-direction: reverse;
}

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

.moon {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 
        inset -3px -3px 5px rgba(0,0,0,0.5),
        0 0 10px rgba(255,255,255,0.2);
}

.moon-1 {
    background: linear-gradient(135deg, #e0e0e0 0%, #9e9e9e 100%);
}

.moon-2 {
    background: linear-gradient(135deg, #ffeb3b 0%, #ff9800 100%);
}

/* Planet surface features */
.surface-features {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.crater {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,0,0,0.3) 0%, transparent 70%);
}

.crater-1 {
    width: 20px;
    height: 20px;
    top: 30%;
    left: 40%;
}

.crater-2 {
    width: 15px;
    height: 15px;
    top: 60%;
    left: 60%;
}

.crater-3 {
    width: 10px;
    height: 10px;
    top: 45%;
    left: 25%;
}

/* Storm systems for gas giants */
.storm {
    position: absolute;
    border-radius: 50%;
    animation: swirl 8s ease-in-out infinite;
}

.storm-red {
    width: 30px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(255,0,0,0.4) 0%, transparent 70%);
    top: 40%;
    left: 35%;
}

@keyframes swirl {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
}

/* Cloud bands */
.cloud-bands {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    opacity: 0.3;
}

.band {
    position: absolute;
    width: 100%;
    height: 20%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.2) 50%, 
        transparent 100%);
    animation: drift-band 20s linear infinite;
}

.band:nth-child(1) { top: 20%; animation-duration: 18s; }
.band:nth-child(2) { top: 40%; animation-duration: 22s; animation-direction: reverse; }
.band:nth-child(3) { top: 60%; animation-duration: 25s; }

@keyframes drift-band {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

/* Polar ice caps */
.ice-cap {
    position: absolute;
    width: 100%;
    height: 25%;
    background: linear-gradient(to bottom, 
        rgba(255,255,255,0.6) 0%, 
        transparent 100%);
    border-radius: 50% 50% 0 0;
}

.ice-cap-north {
    top: 0;
}

.ice-cap-south {
    bottom: 0;
    transform: rotate(180deg);
}

/* Planet shadow for 3D effect */
.planet-shadow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        transparent 40%, 
        rgba(0,0,0,0.6) 100%);
    pointer-events: none;
}

/* Lens flare effect */
.lens-flare {
    position: absolute;
    width: 300%;
    height: 300%;
    top: -100%;
    left: -100%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255,255,255,0.1) 0%, 
        transparent 20%);
    animation: flare-move 30s ease-in-out infinite;
    pointer-events: none;
}

@keyframes flare-move {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, -10px); }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .planet-3d-css {
        width: 150px;
        height: 150px;
    }
    
    .planet-sphere {
        width: 100px;
        height: 100px;
    }
    
    .solar-system {
        width: 150px;
        height: 150px;
    }
    
    .central-planet {
        width: 60px;
        height: 60px;
    }
    
    .orbit-1 {
        width: 100px;
        height: 100px;
    }
    
    .orbit-2 {
        width: 130px;
        height: 130px;
    }
    
    .moon {
        width: 15px;
        height: 15px;
    }
}

/* Performance mode */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
    }
    
    .planet-sphere {
        box-shadow: 
            inset -25px -25px 40px rgba(0,0,0,0.5),
            inset 5px 5px 15px rgba(255,255,255,0.2);
    }
}