/* ================================
   PLANET CARDS COMPONENT
   Reusable planet card styles
   ================================ */

/* Base Planet Card */
.planet-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin: var(--space-xl) 0;
}

.planet-card-v2 {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    position: relative;
    overflow: visible;
    transition: all var(--transition-normal);
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Planet Header - Top Section */
.planet-header {
    display: flex;
    flex-direction: row;
    gap: var(--space-lg);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

/* Planet Visual Section */
.planet-visual-container {
    width: 180px;
    height: 180px;
    flex-shrink: 0;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.02), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Planet Info - Name and Description */
.planet-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

/* Planet Body - Stats and Lore */
.planet-body {
    padding: var(--space-lg);
}

/* Sector Icon Badge */
.sector-icon-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    border: 1px solid currentColor;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 10;
    backdrop-filter: blur(10px);
}

/* Planet Sphere - Reusing existing animations */
.planet-visual-v2 {
    width: 120px;
    height: 120px;
    position: relative;
}

.planet-visual-v2 .planet-sphere {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset -15px -15px 30px rgba(0,0,0,0.5),
        0 0 30px rgba(0,0,0,0.3);
}

.planet-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 var(--space-sm) 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.planet-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Planet Stats */
.planet-stats {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.planet-stat {
    flex: 1;
    text-align: center;
}

.stat-icon {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    display: block;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* Lore Section - Now visible always */
.planet-lore-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.lore-subsection {
    margin-bottom: var(--space-sm);
}

.lore-subsection h5 {
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.lore-subsection p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Unit Preview Grid - Compact */
.unit-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: var(--space-sm);
}

.unit-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
}

.unit-icon {
    font-size: 1rem;
}

.unit-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Faction-specific colors */
.biomasa-card-v2 {
    border-color: var(--accent-bio);
}

.biomasa-card-v2 .sector-icon-badge {
    color: var(--accent-bio);
}

.biomasa-card-v2 .planet-name {
    color: var(--accent-bio);
}

.biomasa-card-v2 .planet-sphere {
    background: linear-gradient(135deg, #0f4c0f, #2d5016, #1a3409);
}

.cristal-card-v2 {
    border-color: var(--accent-crystal);
}

.cristal-card-v2 .sector-icon-badge {
    color: var(--accent-crystal);
}

.cristal-card-v2 .planet-name {
    color: var(--accent-crystal);
}

.cristal-card-v2 .planet-sphere {
    background: linear-gradient(135deg, #1e3a5f, #2e5a8f, #3e7abf);
}

.tech-card-v2 {
    border-color: var(--accent-tech);
}

.tech-card-v2 .sector-icon-badge {
    color: var(--accent-tech);
}

.tech-card-v2 .planet-name {
    color: var(--accent-tech);
}

.tech-card-v2 .planet-sphere {
    background: linear-gradient(135deg, #4a3f36, #6a5f56, #8a7f76);
}

.psi-card-v2 {
    border-color: var(--accent-psi);
}

.psi-card-v2 .sector-icon-badge {
    color: var(--accent-psi);
}

.psi-card-v2 .planet-name {
    color: var(--accent-psi);
}

.psi-card-v2 .planet-sphere {
    background: linear-gradient(135deg, #3f2f5f, #5f4f7f, #7f6f9f);
}

.quimico-card-v2 {
    border-color: var(--accent-chem);
}

.quimico-card-v2 .sector-icon-badge {
    color: var(--accent-chem);
}

.quimico-card-v2 .planet-name {
    color: var(--accent-chem);
}

.quimico-card-v2 .planet-sphere {
    background: linear-gradient(135deg, #5f2f4f, #7f4f6f, #9f6f8f);
}

/* Unknown Planet Special Effects */
.unknown-card-v2 {
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
                linear-gradient(45deg, #ff00ff, #00ffff, #ffff00) border-box;
    animation: border-pulse 3s ease-in-out infinite;
}

.unknown-card-v2 .sector-icon-badge {
    color: #a78bfa;
    animation: glitch-flicker 5s steps(1) infinite;
}

.unknown-card-v2 .planet-name {
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.unknown-card-v2 .planet-sphere {
    background: radial-gradient(circle at 30% 30%, #1a0033, #000);
    animation: unknown-pulse 4s ease-in-out infinite;
}

/* Access Restricted Warning */
.access-restricted {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    text-align: center;
    padding: var(--space-sm);
    font-weight: bold;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.unknown-card-v2:hover .access-restricted {
    transform: translateY(0);
}

/* Glitch text for unknown */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    animation: glitch-1 0.5s infinite;
    color: #ff00ff;
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-2 0.5s infinite;
    color: #00ffff;
    z-index: -2;
}

/* Animations */
@keyframes border-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes glitch-flicker {
    0%, 90%, 100% { opacity: 1; }
    91% { opacity: 0.5; }
    92% { opacity: 1; }
    93% { opacity: 0.3; }
    94% { opacity: 1; }
}

@keyframes unknown-pulse {
    0%, 100% { filter: brightness(0.8); }
    50% { filter: brightness(1.2); }
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 1px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -1px); }
    60% { clip-path: inset(10% 0 60% 0); transform: translate(-1px, 2px); }
    80% { clip-path: inset(80% 0 5% 0); transform: translate(1px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
    40% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, 1px); }
    60% { clip-path: inset(30% 0 40% 0); transform: translate(1px, -2px); }
    80% { clip-path: inset(5% 0 80% 0); transform: translate(-1px, 2px); }
}

/* Responsive */
@media (max-width: 768px) {
    .planet-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: var(--space-md);
    }
    
    .planet-visual-v2 {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .planet-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Note: planet-visual-container style defined above */

/* Planet Sphere - Enhanced with rotation */
.planet-visual-v2 {
    width: 120px;
    height: 120px;
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.planet-visual-v2 .planet-sphere {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset -15px -15px 30px rgba(0,0,0,0.5),
        0 0 30px rgba(0,0,0,0.3);
    animation: rotatePlanet 20s linear infinite;
}

/* Remove decorative elements from inside planets - use surface textures instead */
.planet-sphere .vegetation,
.planet-sphere .crystal,
.planet-sphere .tech-element,
.planet-sphere .psi-element,
.planet-sphere .chem-bubble {
    display: none;
}

/* Add surface textures with pseudo-elements */
.biomasa-card-v2 .planet-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(74, 222, 128, 0.3), transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(34, 197, 94, 0.2), transparent 30%),
        radial-gradient(circle at 50% 80%, rgba(74, 222, 128, 0.2), transparent 35%);
    animation: surfaceShift 15s ease-in-out infinite;
}

.cristal-card-v2 .planet-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(96, 165, 250, 0.3) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 40%, rgba(147, 197, 253, 0.2) 60%, transparent 80%);
    animation: crystalShimmer 8s linear infinite;
}

.tech-card-v2 .planet-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 10px,
            rgba(245, 158, 11, 0.1) 10px,
            rgba(245, 158, 11, 0.1) 20px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 10px,
            rgba(251, 146, 60, 0.1) 10px,
            rgba(251, 146, 60, 0.1) 20px
        );
    animation: techGrid 10s linear infinite;
}

.psi-card-v2 .planet-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 50% 50%, transparent 30%, rgba(167, 139, 250, 0.3) 70%);
    animation: psionicPulse 4s ease-in-out infinite;
}

.psi-card-v2 .planet-sphere::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        conic-gradient(from 0deg, transparent, rgba(167, 139, 250, 0.2), transparent);
    animation: psionicSpin 6s linear infinite;
}

.quimico-card-v2 .planet-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 40%, rgba(236, 72, 153, 0.4), transparent 30%),
        radial-gradient(circle at 60% 70%, rgba(244, 114, 182, 0.3), transparent 25%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.2), transparent 35%);
    animation: chemBubble 12s ease-in-out infinite;
}

/* Unknown planet special effect */
.unknown-card-v2 .planet-sphere {
    background: radial-gradient(circle at 30% 30%, #1a0033, #000);
    animation: rotatePlanet 10s linear infinite reverse, glitchPlanet 5s steps(1) infinite;
}

.unknown-card-v2 .planet-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        repeating-conic-gradient(from 0deg at 50% 50%, 
            transparent 0deg, 
            rgba(255, 0, 255, 0.1) 10deg, 
            transparent 20deg);
    animation: unknownScan 3s linear infinite;
}

/* Fix the lore panel padding issue */
.planet-lore-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(10px);
    padding: var(--space-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    z-index: 20;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Changed from overflow-y: auto */
}

.lore-content {
    flex: 1;
    overflow-y: auto;
    padding-right: var(--space-sm); /* Add padding for scrollbar */
    max-height: calc(100% - 60px); /* Reserve space for header */
}


/* New Animations */
@keyframes rotatePlanet {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes surfaceShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    33% { transform: scale(1.1) rotate(120deg); }
    66% { transform: scale(0.95) rotate(240deg); }
}

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

@keyframes techGrid {
    from { transform: translate(0, 0); }
    to { transform: translate(20px, 20px); }
}

@keyframes psionicPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

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

@keyframes chemBubble {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1) translateX(-5px); }
    50% { transform: scale(0.9) translateY(-5px); }
    75% { transform: scale(1.05) translateX(5px); }
}

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

@keyframes glitchPlanet {
    0%, 90%, 100% { filter: hue-rotate(0deg) brightness(1); }
    91% { filter: hue-rotate(90deg) brightness(1.5); }
    92% { filter: hue-rotate(-90deg) brightness(0.8); }
    93% { filter: hue-rotate(180deg) brightness(1.2); }
}

/* Hover effects for planets */
.planet-card-v2:hover .planet-sphere {
    animation-duration: 5s; /* Speed up rotation on hover */
}

.planet-card-v2:hover .planet-visual-v2 {
    animation-play-state: paused; /* Stop floating on hover */
    transform: scale(1.1); /* Slight zoom */
}

/* Atmospheric glow effect */
.planet-sphere::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255, 255, 255, 0.5), 
        transparent 30%);
    opacity: 0.6;
    pointer-events: none;
}

/* Different glow positions for variety */
.cristal-card-v2 .planet-sphere::after {
    background: radial-gradient(circle at 40% 25%, 
        rgba(200, 230, 255, 0.6), 
        transparent 35%);
}

.tech-card-v2 .planet-sphere::after {
    background: radial-gradient(circle at 35% 35%, 
        rgba(255, 200, 150, 0.4), 
        transparent 30%);
}

.psi-card-v2 .planet-sphere::after {
    background: radial-gradient(circle at 25% 30%, 
        rgba(200, 180, 255, 0.5), 
        transparent 40%);
}

.quimico-card-v2 .planet-sphere::after {
    background: radial-gradient(circle at 45% 30%, 
        rgba(255, 180, 220, 0.4), 
        transparent 35%);
}

/* Unknown planet has no glow */
.unknown-card-v2 .planet-sphere::after {
    display: none;
}

/* Note: planet-content, planet-description, and planet-card-v2 styles defined above */

/* ===== UNIQUE PLANETS SPECIAL STYLES ===== */

/* Unique planet base styling */
.unique-card {
    border-width: 2px;
    background: linear-gradient(var(--bg-secondary), rgba(0,0,0,0.3));
}

.unique-card .planet-name {
    background: linear-gradient(135deg, var(--text-primary), var(--accent-bio));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Aethelgard - Aggressive Flora */
.aethelgard-sphere {
    background: linear-gradient(135deg, #0f4c0f, #2d5016, #1a3409);
    animation: rotatePlanet 15s linear infinite;
}

.aethelgard-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(154, 205, 50, 0.4), transparent 25%),
        radial-gradient(circle at 60% 70%, rgba(34, 139, 34, 0.3), transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(107, 142, 35, 0.3), transparent 20%),
        radial-gradient(circle at 40% 50%, rgba(0, 100, 0, 0.2), transparent 35%);
    animation: plantAttack 3s ease-in-out infinite;
}

@keyframes plantAttack {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1) rotate(10deg); }
    50% { transform: scale(0.95) rotate(-5deg); }
    75% { transform: scale(1.05) rotate(5deg); }
}

/* Volucris - Gas Giant */
.volucris-sphere {
    background: linear-gradient(0deg, 
        #8B4513 0%, #D2691E 20%, #FFD700 40%, 
        #FF8C00 60%, #8B4513 80%, #654321 100%);
    animation: rotatePlanet 12s linear infinite;
}

.volucris-sphere::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 100%;
    left: -10%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.1) 10px,
        rgba(255, 255, 255, 0.1) 20px
    );
    animation: stormFlow 5s linear infinite;
}

@keyframes stormFlow {
    from { transform: translateY(0); }
    to { transform: translateY(20px); }
}

/* Erg - Nano Sand */
.erg-sphere {
    background: linear-gradient(135deg, #C19A6B, #D2B48C, #DEB887);
    animation: rotatePlanet 25s linear infinite;
}

.erg-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        repeating-conic-gradient(from 0deg at 50% 50%, 
            #C19A6B 0deg, 
            #DEB887 10deg, 
            #D2B48C 20deg);
    animation: sandShift 8s linear infinite;
}

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

/* Vortexia - Gravity Chaos */
.vortexia-sphere {
    background: radial-gradient(circle at center, #4B0082, #8A2BE2, #9932CC);
    animation: rotatePlanet 18s linear infinite reverse, gravityDistort 6s ease-in-out infinite;
}

.vortexia-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg, transparent, rgba(138, 43, 226, 0.5), transparent);
    animation: vortexSpin 4s linear infinite;
}

@keyframes gravityDistort {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1, 0.9); }
    50% { transform: scale(0.9, 1.1); }
    75% { transform: scale(1.05, 0.95); }
}

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

/* Chronosync - Time Anomaly */
.chronosync-sphere {
    background: conic-gradient(from 0deg, #1e3c72, #2a5298, #1e3c72);
    animation: rotatePlanet 30s linear infinite, timeFlux 10s linear infinite;
}

.chronosync-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        repeating-radial-gradient(circle at center, 
            transparent 0px, 
            transparent 10px, 
            rgba(255, 255, 255, 0.1) 10px, 
            rgba(255, 255, 255, 0.1) 20px);
    animation: timePulse 2s ease-in-out infinite;
}

@keyframes timeFlux {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(360deg); }
}

@keyframes timePulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* Bioforge - Living Lab */
.bioforge-sphere {
    background: linear-gradient(135deg, #2E7D32, #00BCD4, #4CAF50);
    animation: rotatePlanet 20s linear infinite, mutate 8s ease-in-out infinite;
}

.bioforge-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(0, 255, 0, 0.3), transparent 20%),
        radial-gradient(circle at 70% 60%, rgba(0, 188, 212, 0.3), transparent 25%),
        radial-gradient(circle at 50% 90%, rgba(76, 175, 80, 0.3), transparent 30%);
    animation: bioMorph 5s ease-in-out infinite;
}

@keyframes mutate {
    0%, 100% { filter: brightness(1) saturate(1); }
    33% { filter: brightness(1.2) saturate(1.5); }
    66% { filter: brightness(0.8) saturate(0.7); }
}

@keyframes bioMorph {
    0%, 100% { transform: scale(1) rotate(0deg); }
    33% { transform: scale(1.2) rotate(120deg); }
    66% { transform: scale(0.8) rotate(240deg); }
}

/* Necrópolis - Digital Decay */
.necropolis-sphere {
    background: linear-gradient(135deg, #0F0F0F, #1C1C1C, #000000);
    animation: rotatePlanet 15s steps(20) infinite, digitalGlitch 3s steps(1) infinite;
}

.necropolis-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 0, 0.1) 2px,
            rgba(0, 255, 0, 0.1) 4px
        );
    animation: dataCorruption 1s linear infinite;
}

@keyframes digitalGlitch {
    0%, 95%, 100% { filter: brightness(1) contrast(1); }
    96% { filter: brightness(2) contrast(2) hue-rotate(90deg); }
    97% { filter: brightness(0.5) contrast(0.5) hue-rotate(-90deg); }
    98% { filter: brightness(1.5) contrast(1.5) invert(1); }
    99% { filter: brightness(0.8) contrast(0.8) hue-rotate(180deg); }
}

@keyframes dataCorruption {
    from { transform: translateY(0); }
    to { transform: translateY(4px); }
}

/* Mareas Vivientes - Living Ocean */
.mareas-sphere {
    background: radial-gradient(circle at 30% 30%, #006994, #004d7a, #002635);
    animation: rotatePlanet 22s linear infinite, oceanBreathe 6s ease-in-out infinite;
}

.mareas-sphere::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(0, 105, 148, 0.4) 70%);
    animation: tidalFlow 4s ease-in-out infinite;
}

.mareas-sphere::after {
    content: '';
    position: absolute;
    width: 20%;
    height: 20%;
    top: 40%;
    left: 40%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 50%;
    animation: eyeBlink 5s ease-in-out infinite;
}

@keyframes oceanBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

@keyframes eyeBlink {
    0%, 90%, 100% { opacity: 0.8; transform: scale(1); }
    95% { opacity: 0; transform: scale(0.8); }
}

/* Hover effects for unique planets */
.unique-card:hover .planet-sphere {
    animation-duration: 3s; /* Speed up rotation significantly on hover */
}

.unique-card .sector-icon-badge {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Special glow for unique planets */
.unique-card .planet-visual-container::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: radial-gradient(circle at center, 
        transparent 30%, 
        rgba(255, 255, 255, 0.05) 50%, 
        transparent 70%);
    animation: uniqueGlow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes uniqueGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}