/**
 * Poseidon 3D Animation CSS
 * Advanced styling for 3D Poseidon character animation
 * Version: 3.x
 * ~2500 lines of comprehensive CSS for 3D animation enhancement
 */

/* ============================================
   CONTAINER AND LAYOUT
   ============================================ */

.poseidon-3d-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, #0a1a2e 0%, #1a2a3e 50%, #0a1a2e 100%);
    border-radius: var(--radius-lg, 12px);
}

.poseidon-3d-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
    cursor: default;
}

.poseidon-3d-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* ============================================
   LIGHTING EFFECTS
   ============================================ */

.poseidon-3d-ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(74, 144, 226, 0.3) 0%,
        rgba(30, 58, 138, 0.2) 30%,
        rgba(10, 26, 46, 0.1) 60%,
        transparent 100%
    );
    animation: ambientPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ambientPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.poseidon-3d-rim-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(0, 212, 255, 0.1) 25%,
        transparent 50%,
        rgba(0, 191, 255, 0.1) 75%,
        transparent 100%
    );
    animation: rimLightSweep 6s linear infinite;
    pointer-events: none;
}

@keyframes rimLightSweep {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ============================================
   WATER EFFECTS
   ============================================ */

.poseidon-3d-water-surface {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(
        to top,
        rgba(0, 191, 255, 0.4) 0%,
        rgba(0, 150, 255, 0.2) 30%,
        transparent 100%
    );
    animation: waterWaves 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes waterWaves {
    0%, 100% {
        transform: translateY(0) scaleY(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-5px) scaleY(1.05);
        opacity: 0.8;
    }
}

.poseidon-3d-bubbles {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.poseidon-3d-bubble {
    position: absolute;
    bottom: -10px;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(160, 224, 255, 0.8) 0%, rgba(96, 165, 250, 0.4) 100%);
    border-radius: 50%;
    animation: bubbleRise 4s ease-in infinite;
    opacity: 0.7;
}

.poseidon-3d-bubble:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 4s;
}

.poseidon-3d-bubble:nth-child(2) {
    left: 25%;
    animation-delay: 0.5s;
    animation-duration: 5s;
    width: 6px;
    height: 6px;
}

.poseidon-3d-bubble:nth-child(3) {
    left: 40%;
    animation-delay: 1s;
    animation-duration: 4.5s;
}

.poseidon-3d-bubble:nth-child(4) {
    left: 55%;
    animation-delay: 1.5s;
    animation-duration: 5.5s;
    width: 10px;
    height: 10px;
}

.poseidon-3d-bubble:nth-child(5) {
    left: 70%;
    animation-delay: 2s;
    animation-duration: 4s;
}

.poseidon-3d-bubble:nth-child(6) {
    left: 85%;
    animation-delay: 2.5s;
    animation-duration: 5s;
    width: 7px;
    height: 7px;
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) translateX(0) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100vh) translateX(20px) scale(1.2);
        opacity: 0;
    }
}

/* ============================================
   PARTICLE EFFECTS
   ============================================ */

.poseidon-3d-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.poseidon-3d-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #00ffff 0%, transparent 70%);
    border-radius: 50%;
    animation: sparkleFloat 6s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.8), 0 0 16px rgba(0, 255, 255, 0.4);
}

.poseidon-3d-sparkle:nth-child(1) {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.poseidon-3d-sparkle:nth-child(2) {
    top: 40%;
    left: 60%;
    animation-delay: 1s;
}

.poseidon-3d-sparkle:nth-child(3) {
    top: 60%;
    left: 30%;
    animation-delay: 2s;
}

.poseidon-3d-sparkle:nth-child(4) {
    top: 30%;
    left: 80%;
    animation-delay: 3s;
}

.poseidon-3d-sparkle:nth-child(5) {
    top: 70%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes sparkleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(0.8);
        opacity: 0.3;
    }
    50% {
        transform: translate(30px, -30px) scale(1.2);
        opacity: 1;
    }
}

/* ============================================
   TRIDENT EFFECTS
   ============================================ */

.poseidon-3d-trident-glow {
    position: absolute;
    top: 20%;
    left: 15%;
    width: 15%;
    height: 60%;
    background: radial-gradient(
        ellipse,
        rgba(0, 255, 255, 0.3) 0%,
        rgba(0, 191, 255, 0.2) 40%,
        transparent 70%
    );
    animation: tridentPulse 2s ease-in-out infinite;
    pointer-events: none;
    filter: blur(15px);
}

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

.poseidon-3d-lightning {
    position: absolute;
    top: 15%;
    left: 20%;
    width: 5%;
    height: 20%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 255, 255, 0.6) 20%,
        rgba(0, 255, 255, 0.8) 50%,
        rgba(0, 255, 255, 0.6) 80%,
        transparent 100%
    );
    animation: lightningFlicker 0.3s ease-in-out infinite;
    pointer-events: none;
    filter: blur(2px);
}

@keyframes lightningFlicker {
    0%, 100% {
        opacity: 0.4;
        transform: translateX(-2px);
    }
    25% {
        opacity: 1;
        transform: translateX(2px);
    }
    50% {
        opacity: 0.6;
        transform: translateX(-1px);
    }
    75% {
        opacity: 0.9;
        transform: translateX(1px);
    }
}

/* ============================================
   CHARACTER GLOW AND HIGHLIGHTS
   ============================================ */

.poseidon-3d-character-glow {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 50%;
    background: radial-gradient(
        ellipse,
        rgba(74, 144, 226, 0.4) 0%,
        rgba(30, 58, 138, 0.3) 30%,
        transparent 70%
    );
    animation: characterGlow 3s ease-in-out infinite;
    pointer-events: none;
    filter: blur(20px);
}

@keyframes characterGlow {
    0%, 100% {
        opacity: 0.6;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.05);
    }
}

.poseidon-3d-eye-glow {
    position: absolute;
    top: 32%;
    left: 48%;
    width: 8%;
    height: 4%;
    background: radial-gradient(
        circle,
        rgba(0, 212, 255, 0.9) 0%,
        rgba(0, 191, 255, 0.6) 50%,
        transparent 100%
    );
    animation: eyeGlow 2s ease-in-out infinite;
    pointer-events: none;
    filter: blur(8px);
    border-radius: 50%;
}

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

/* ============================================
   CAUSTICS AND WATER LIGHTING
   ============================================ */

.poseidon-3d-caustics {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(0, 212, 255, 0.05) 10px,
            rgba(0, 212, 255, 0.05) 20px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 10px,
            rgba(0, 191, 255, 0.05) 10px,
            rgba(0, 191, 255, 0.05) 20px
        );
    animation: causticsMove 8s linear infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
}

@keyframes causticsMove {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 100px 100px, -100px -100px;
    }
}

/* ============================================
   MOTION BLUR AND DEPTH EFFECTS
   ============================================ */

.poseidon-3d-depth-fog {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 40%,
        rgba(10, 26, 46, 0.3) 70%,
        rgba(10, 26, 46, 0.6) 100%
    );
    pointer-events: none;
    z-index: 5;
}

.poseidon-3d-motion-blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 191, 255, 0.1) 25%,
        transparent 50%,
        rgba(0, 212, 255, 0.1) 75%,
        transparent 100%
    );
    animation: motionBlurSweep 3s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: screen;
}

@keyframes motionBlurSweep {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .poseidon-3d-container {
        border-radius: var(--radius-md, 8px);
    }
    
    .poseidon-3d-character-glow {
        width: 80%;
        height: 60%;
    }
    
    .poseidon-3d-trident-glow {
        width: 20%;
        height: 70%;
    }
}

@media (max-width: 480px) {
    .poseidon-3d-container {
        border-radius: var(--radius-sm, 6px);
    }
    
    .poseidon-3d-bubble {
        width: 6px;
        height: 6px;
    }
    
    .poseidon-3d-sparkle {
        width: 3px;
        height: 3px;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

.poseidon-3d-container * {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ============================================
   LOADING STATE
   ============================================ */

.poseidon-3d-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 4px solid rgba(74, 144, 226, 0.3);
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

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

.poseidon-3d-loading-text {
    position: absolute;
    top: calc(50% + 40px);
    left: 50%;
    transform: translateX(-50%);
    color: #4a90e2;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    z-index: 100;
}

/* ============================================
   INTERACTION STATES
   ============================================ */

.poseidon-3d-container:hover .poseidon-3d-character-glow {
    animation-duration: 2s;
    opacity: 0.9;
}

.poseidon-3d-container.speaking .poseidon-3d-lightning {
    animation-duration: 0.2s;
    opacity: 1;
}

.poseidon-3d-container.speaking .poseidon-3d-eye-glow {
    animation-duration: 1s;
    opacity: 1;
}

.poseidon-3d-container.listening .poseidon-3d-ambient-glow {
    animation-duration: 2s;
}

.poseidon-3d-container.listening .poseidon-3d-bubble {
    animation-duration: 3s;
}

/* ============================================
   THEME VARIANTS
   ============================================ */

.poseidon-3d-container.theme-deep-ocean {
    background: linear-gradient(180deg, #001122 0%, #003366 50%, #001122 100%);
}

.poseidon-3d-container.theme-stormy {
    background: linear-gradient(180deg, #0a0a1a 0%, #1a1a3a 50%, #0a0a1a 100%);
}

.poseidon-3d-container.theme-calm-waters {
    background: linear-gradient(180deg, #1a2a3e 0%, #2a4a5e 50%, #1a2a3e 100%);
}

/* ============================================
   ADVANCED ANIMATION CONTROLS
   ============================================ */

.poseidon-3d-animation-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.poseidon-3d-container:hover .poseidon-3d-animation-controls {
    opacity: 1;
}

.poseidon-3d-control-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    background: rgba(10, 26, 46, 0.8);
    border-radius: 50%;
    color: #4a90e2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.poseidon-3d-control-btn:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: #4a90e2;
    transform: scale(1.1);
}

.poseidon-3d-control-btn:active {
    transform: scale(0.95);
}

/* ============================================
   QUALITY PRESETS
   ============================================ */

.poseidon-3d-container.quality-low {
    filter: blur(1px);
}

.poseidon-3d-container.quality-low .poseidon-3d-sparkle,
.poseidon-3d-container.quality-low .poseidon-3d-bubble {
    display: none;
}

.poseidon-3d-container.quality-medium .poseidon-3d-sparkle {
    opacity: 0.5;
}

.poseidon-3d-container.quality-high {
    filter: none;
}

.poseidon-3d-container.quality-ultra {
    filter: none;
}

.poseidon-3d-container.quality-ultra .poseidon-3d-sparkle {
    box-shadow: 
        0 0 8px rgba(0, 255, 255, 0.8),
        0 0 16px rgba(0, 255, 255, 0.4),
        0 0 24px rgba(0, 255, 255, 0.2);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .poseidon-3d-container *,
    .poseidon-3d-container *::before,
    .poseidon-3d-container *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .poseidon-3d-container {
        display: none;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.poseidon-3d-hidden {
    display: none !important;
}

.poseidon-3d-visible {
    display: block !important;
}

.poseidon-3d-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    border-radius: 0;
}

/* ============================================
   ADDITIONAL EFFECTS AND ENHANCEMENTS
   ============================================ */

.poseidon-3d-ripple-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border: 2px solid rgba(0, 191, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rippleExpand 2s ease-out infinite;
    pointer-events: none;
}

@keyframes rippleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

.poseidon-3d-energy-orb {
    position: absolute;
    top: 30%;
    left: 20%;
    width: 40px;
    height: 40px;
    background: radial-gradient(
        circle,
        rgba(0, 255, 255, 0.9) 0%,
        rgba(0, 191, 255, 0.6) 50%,
        transparent 100%
    );
    border-radius: 50%;
    animation: energyPulse 2s ease-in-out infinite;
    pointer-events: none;
    filter: blur(8px);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.8),
        0 0 40px rgba(0, 191, 255, 0.4);
}

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

.poseidon-3d-mist-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(
        to top,
        rgba(160, 216, 255, 0.3) 0%,
        rgba(96, 165, 250, 0.2) 50%,
        transparent 100%
    );
    animation: mistRise 5s ease-in-out infinite;
    pointer-events: none;
    filter: blur(20px);
}

@keyframes mistRise {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-10px);
        opacity: 0.6;
    }
}

.poseidon-3d-foam {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 60% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.4) 0%, transparent 50%);
    animation: foamFloat 4s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
}

@keyframes foamFloat {
    0%, 100% {
        transform: translateY(0) scaleX(1);
    }
    50% {
        transform: translateY(-5px) scaleX(1.1);
    }
}

.poseidon-3d-light-rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 48%, rgba(0, 212, 255, 0.1) 49%, rgba(0, 212, 255, 0.1) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(0, 191, 255, 0.1) 49%, rgba(0, 191, 255, 0.1) 51%, transparent 52%);
    background-size: 100px 100px;
    animation: lightRaysMove 10s linear infinite;
    pointer-events: none;
    opacity: 0.5;
}

@keyframes lightRaysMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100px 100px;
    }
}

.poseidon-3d-refraction {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 191, 255, 0.05) 2px,
            rgba(0, 191, 255, 0.05) 4px
        );
    animation: refractionShift 6s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: screen;
}

@keyframes refractionShift {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(10px);
    }
}

.poseidon-3d-volumetric-light {
    position: absolute;
    top: 20%;
    left: 30%;
    width: 40%;
    height: 60%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 212, 255, 0.2) 30%,
        rgba(0, 191, 255, 0.3) 50%,
        rgba(0, 212, 255, 0.2) 70%,
        transparent 100%
    );
    animation: volumetricLightSway 4s ease-in-out infinite;
    pointer-events: none;
    filter: blur(30px);
    transform-origin: center;
}

@keyframes volumetricLightSway {
    0%, 100% {
        transform: rotate(-2deg) scaleY(1);
        opacity: 0.6;
    }
    50% {
        transform: rotate(2deg) scaleY(1.1);
        opacity: 0.8;
    }
}

.poseidon-3d-subsurface-scattering {
    position: absolute;
    top: 25%;
    left: 45%;
    width: 25%;
    height: 45%;
    background: radial-gradient(
        ellipse,
        rgba(74, 144, 226, 0.4) 0%,
        rgba(30, 58, 138, 0.3) 40%,
        transparent 80%
    );
    animation: subsurfaceGlow 3s ease-in-out infinite;
    pointer-events: none;
    filter: blur(25px);
    mix-blend-mode: screen;
}

@keyframes subsurfaceGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.poseidon-3d-specular-highlight {
    position: absolute;
    top: 30%;
    left: 50%;
    width: 15%;
    height: 20%;
    background: radial-gradient(
        ellipse,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(0, 212, 255, 0.3) 50%,
        transparent 100%
    );
    animation: specularMove 5s ease-in-out infinite;
    pointer-events: none;
    filter: blur(15px);
    border-radius: 50%;
}

@keyframes specularMove {
    0%, 100% {
        transform: translate(-50%, -50%) translate(10px, 10px);
        opacity: 0.6;
    }
    25% {
        transform: translate(-50%, -50%) translate(-10px, 15px);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) translate(-15px, -10px);
        opacity: 0.7;
    }
    75% {
        transform: translate(-50%, -50%) translate(15px, -15px);
        opacity: 0.9;
    }
}

.poseidon-3d-ambient-occlusion {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, transparent 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%),
        radial-gradient(circle at 75% 75%, transparent 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0.3;
}

.poseidon-3d-bloom-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 50% 40%, rgba(0, 255, 255, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 20% 60%, rgba(0, 191, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    filter: blur(40px);
    mix-blend-mode: screen;
    opacity: 0.6;
}

.poseidon-3d-color-grading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(180deg, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
        linear-gradient(0deg, rgba(30, 58, 138, 0.1) 0%, transparent 50%);
    pointer-events: none;
    mix-blend-mode: overlay;
}

.poseidon-3d-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle,
        transparent 0%,
        transparent 40%,
        rgba(0, 0, 0, 0.3) 80%,
        rgba(0, 0, 0, 0.5) 100%
    );
    pointer-events: none;
}

.poseidon-3d-film-grain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='4' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E");
    pointer-events: none;
    mix-blend-mode: overlay;
    animation: grainMove 0.2s steps(6) infinite;
}

@keyframes grainMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-100px, -100px);
    }
}

.poseidon-3d-chromatic-aberration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, 
            rgba(255, 0, 0, 0.1) 0%,
            transparent 1%,
            transparent 99%,
            rgba(0, 0, 255, 0.1) 100%
        );
    pointer-events: none;
    mix-blend-mode: screen;
    animation: chromaticShift 3s ease-in-out infinite;
}

@keyframes chromaticShift {
    0%, 100% {
        transform: translateX(0);
        opacity: 0;
    }
    50% {
        transform: translateX(2px);
        opacity: 0.3;
    }
}

.poseidon-3d-lens-flare {
    position: absolute;
    top: 20%;
    left: 70%;
    width: 100px;
    height: 100px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(0, 212, 255, 0.4) 30%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    filter: blur(20px);
    animation: lensFlareMove 8s ease-in-out infinite;
}

@keyframes lensFlareMove {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.6;
    }
}

.poseidon-3d-god-rays {
    position: absolute;
    top: 0;
    left: 30%;
    width: 5%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 212, 255, 0.3) 20%,
        rgba(0, 191, 255, 0.4) 50%,
        rgba(0, 212, 255, 0.3) 80%,
        transparent 100%
    );
    animation: godRaySweep 6s ease-in-out infinite;
    pointer-events: none;
    filter: blur(15px);
    transform-origin: top center;
}

@keyframes godRaySweep {
    0%, 100% {
        transform: rotate(-5deg) scaleY(0.8);
        opacity: 0.4;
    }
    50% {
        transform: rotate(5deg) scaleY(1.2);
        opacity: 0.7;
    }
}

.poseidon-3d-depth-of-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 40%,
        rgba(10, 26, 46, 0.3) 70%,
        rgba(10, 26, 46, 0.6) 100%
    );
    pointer-events: none;
    mix-blend-mode: multiply;
}

.poseidon-3d-motion-blur-trail {
    position: absolute;
    top: 35%;
    left: 25%;
    width: 10%;
    height: 30%;
    background: linear-gradient(
        to right,
        rgba(0, 191, 255, 0.4) 0%,
        rgba(0, 212, 255, 0.2) 50%,
        transparent 100%
    );
    animation: motionTrail 1s ease-out infinite;
    pointer-events: none;
    filter: blur(10px);
    transform-origin: left center;
}

@keyframes motionTrail {
    0% {
        transform: translateX(-100%) scaleX(0);
        opacity: 0;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translateX(0) scaleX(1);
        opacity: 0;
    }
}

.poseidon-3d-reflection-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, transparent 0%, rgba(0, 191, 255, 0.1) 25%, transparent 50%),
        linear-gradient(45deg, transparent 0%, rgba(0, 212, 255, 0.1) 25%, transparent 50%);
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.5;
    animation: reflectionMapShift 4s ease-in-out infinite;
}

@keyframes reflectionMapShift {
    0%, 100% {
        background-position: 0 0, 0 0;
    }
    50% {
        background-position: 50px 50px, -50px -50px;
    }
}

.poseidon-3d-normal-map-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 191, 255, 0.05) 2px,
            rgba(0, 191, 255, 0.05) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 212, 255, 0.05) 2px,
            rgba(0, 212, 255, 0.05) 4px
        );
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.3;
}

.poseidon-3d-parallax-layer-1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 40%, rgba(0, 191, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
    animation: parallax1 10s ease-in-out infinite;
}

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

.poseidon-3d-parallax-layer-2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 60%, rgba(0, 212, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
    animation: parallax2 8s ease-in-out infinite;
}

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

.poseidon-3d-parallax-layer-3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(74, 144, 226, 0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: parallax3 12s ease-in-out infinite;
}

@keyframes parallax3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(5px, -5px) scale(1.05);
    }
}

/* ============================================
   TRANSITION EFFECTS
   ============================================ */

.poseidon-3d-fade-in {
    animation: fadeIn3D 0.5s ease-in;
}

@keyframes fadeIn3D {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.poseidon-3d-fade-out {
    animation: fadeOut3D 0.5s ease-out;
}

@keyframes fadeOut3D {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

.poseidon-3d-zoom-in {
    animation: zoomIn3D 0.6s ease-out;
}

@keyframes zoomIn3D {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.poseidon-3d-zoom-out {
    animation: zoomOut3D 0.6s ease-in;
}

@keyframes zoomOut3D {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.8);
        opacity: 0;
    }
}

.poseidon-3d-slide-in-left {
    animation: slideInLeft3D 0.5s ease-out;
}

@keyframes slideInLeft3D {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.poseidon-3d-slide-in-right {
    animation: slideInRight3D 0.5s ease-out;
}

@keyframes slideInRight3D {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.poseidon-3d-rotate-in {
    animation: rotateIn3D 0.6s ease-out;
}

@keyframes rotateIn3D {
    from {
        transform: rotateY(-90deg) scale(0.8);
        opacity: 0;
    }
    to {
        transform: rotateY(0) scale(1);
        opacity: 1;
    }
}

/* ============================================
   PERFORMANCE MONITORING
   ============================================ */

.poseidon-3d-performance-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    background: rgba(10, 26, 46, 0.9);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: var(--radius-sm, 6px);
    color: #4a90e2;
    font-size: 11px;
    font-family: monospace;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

.poseidon-3d-container:hover .poseidon-3d-performance-indicator {
    opacity: 1;
}

.poseidon-3d-performance-indicator.low-fps {
    border-color: #ef4444;
    color: #f87171;
}

.poseidon-3d-performance-indicator.medium-fps {
    border-color: #f59e0b;
    color: #fbbf24;
}

.poseidon-3d-performance-indicator.high-fps {
    border-color: #22c55e;
    color: #4ade80;
}

/* ============================================
   DEBUG MODE
   ============================================ */

.poseidon-3d-container.debug .poseidon-3d-performance-indicator {
    opacity: 1;
}

.poseidon-3d-container.debug .poseidon-3d-animation-controls {
    opacity: 1;
}

.poseidon-3d-wireframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(74, 144, 226, 0.1) 19px, rgba(74, 144, 226, 0.1) 20px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(74, 144, 226, 0.1) 19px, rgba(74, 144, 226, 0.1) 20px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 150;
}

.poseidon-3d-container.debug .poseidon-3d-wireframe-overlay {
    opacity: 1;
}

/* ============================================
   RESPONSIVE ENHANCEMENTS
   ============================================ */

@media (max-width: 1024px) {
    .poseidon-3d-container {
        border-radius: var(--radius-md, 8px);
    }
    
    .poseidon-3d-character-glow {
        filter: blur(15px);
    }
    
    .poseidon-3d-trident-glow {
        filter: blur(10px);
    }
}

@media (max-width: 640px) {
    .poseidon-3d-container {
        border-radius: var(--radius-sm, 6px);
    }
    
    .poseidon-3d-ambient-glow {
        width: 150%;
        height: 150%;
    }
    
    .poseidon-3d-control-btn {
        width: 28px;
        height: 28px;
    }
}

@media (min-width: 1920px) {
    .poseidon-3d-container {
        border-radius: var(--radius-xl, 16px);
    }
    
    .poseidon-3d-character-glow {
        filter: blur(30px);
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

[data-theme="dark"] .poseidon-3d-container {
    background: linear-gradient(180deg, #000510 0%, #001122 50%, #000510 100%);
}

[data-theme="dark"] .poseidon-3d-ambient-glow {
    background: radial-gradient(
        circle,
        rgba(255, 215, 0, 0.2) 0%,
        rgba(255, 165, 0, 0.15) 30%,
        rgba(10, 26, 46, 0.1) 60%,
        transparent 100%
    );
}

[data-theme="dark"] .poseidon-3d-eye-glow {
    background: radial-gradient(
        circle,
        rgba(255, 215, 0, 0.9) 0%,
        rgba(255, 165, 0, 0.6) 50%,
        transparent 100%
    );
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    .poseidon-3d-container {
        border: 2px solid #4a90e2;
    }
    
    .poseidon-3d-control-btn {
        border-width: 2px;
    }
}

/* ============================================
   ANIMATION PERFORMANCE OPTIMIZATION
   ============================================ */

@media (prefers-reduced-motion: no-preference) {
    .poseidon-3d-container {
        will-change: transform;
    }
}

/* ============================================
   TOUCH DEVICE SUPPORT
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    .poseidon-3d-animation-controls {
        opacity: 1;
    }
    
    .poseidon-3d-control-btn {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   ADDITIONAL UTILITY CLASSES
   ============================================ */

.poseidon-3d-no-animations * {
    animation: none !important;
    transition: none !important;
}

.poseidon-3d-paused * {
    animation-play-state: paused !important;
}

.poseidon-3d-slow-motion * {
    animation-duration: calc(var(--base-duration, 1s) * 2) !important;
}

.poseidon-3d-fast-motion * {
    animation-duration: calc(var(--base-duration, 1s) * 0.5) !important;
}

/* ============================================
   EXPORT AND SCREENSHOT MODES
   ============================================ */

.poseidon-3d-container.export-mode {
    animation: none !important;
}

.poseidon-3d-container.export-mode * {
    animation: none !important;
}

.poseidon-3d-container.screenshot-mode {
    filter: contrast(1.1) brightness(1.05) saturate(1.1);
}

/* ============================================
   FINAL POLISH AND ENHANCEMENTS
   ============================================ */

.poseidon-3d-final-polish {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    mix-blend-mode: screen;
    animation: finalPolishPulse 4s ease-in-out infinite;
}

@keyframes finalPolishPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* ============================================
   ADDITIONAL ADVANCED EFFECTS
   ============================================ */

.poseidon-3d-shimmer-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 45%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 55%,
        transparent 100%
    );
    animation: shimmerSweep 3s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
}

@keyframes shimmerSweep {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.poseidon-3d-aurora-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(180deg, rgba(0, 255, 255, 0.1) 0%, transparent 30%),
        linear-gradient(180deg, transparent 70%, rgba(0, 191, 255, 0.1) 100%);
    animation: auroraFlow 8s ease-in-out infinite;
    pointer-events: none;
    filter: blur(30px);
}

@keyframes auroraFlow {
    0%, 100% {
        transform: translateY(0) scaleY(1);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-20px) scaleY(1.1);
        opacity: 0.8;
    }
}

.poseidon-3d-ripple-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border: 3px solid rgba(0, 191, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rippleRingExpand 3s ease-out infinite;
    pointer-events: none;
}

@keyframes rippleRingExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

.poseidon-3d-energy-field {
    position: absolute;
    top: 30%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(0, 255, 255, 0.4) 0%,
        rgba(0, 191, 255, 0.3) 30%,
        transparent 70%
    );
    border-radius: 50%;
    animation: energyFieldPulse 2s ease-in-out infinite;
    pointer-events: none;
    filter: blur(20px);
    transform: translate(-50%, -50%);
}

@keyframes energyFieldPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.9;
    }
}

.poseidon-3d-magnetic-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            transparent 0deg,
            rgba(0, 191, 255, 0.05) 5deg,
            transparent 10deg
        );
    animation: magneticFieldRotate 20s linear infinite;
    pointer-events: none;
    opacity: 0.5;
}

@keyframes magneticFieldRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.poseidon-3d-water-distortion {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 10px,
            rgba(0, 191, 255, 0.1) 10px,
            rgba(0, 191, 255, 0.1) 20px
        );
    animation: waterDistortion 4s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
}

@keyframes waterDistortion {
    0%, 100% {
        transform: translateY(0) skewY(0deg);
    }
    50% {
        transform: translateY(-5px) skewY(1deg);
    }
}

.poseidon-3d-surface-tension {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(160, 224, 255, 0.1) 30%,
        transparent 100%
    );
    animation: surfaceTension 3s ease-in-out infinite;
    pointer-events: none;
    border-top: 2px solid rgba(0, 191, 255, 0.3);
}

@keyframes surfaceTension {
    0%, 100% {
        transform: translateY(0);
        border-top-width: 2px;
    }
    50% {
        transform: translateY(-3px);
        border-top-width: 3px;
    }
}

.poseidon-3d-whirlpool {
    position: absolute;
    bottom: 10%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: 
        repeating-conic-gradient(
            from 0deg,
            transparent 0deg,
            rgba(0, 191, 255, 0.2) 30deg,
            transparent 60deg
        );
    border-radius: 50%;
    animation: whirlpoolSpin 4s linear infinite;
    pointer-events: none;
    filter: blur(10px);
    transform: translate(-50%, 0);
}

@keyframes whirlpoolSpin {
    0% {
        transform: translate(-50%, 0) rotate(0deg) scale(1);
    }
    100% {
        transform: translate(-50%, 0) rotate(360deg) scale(1.2);
    }
}

.poseidon-3d-tidal-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(
        to top,
        rgba(0, 150, 255, 0.4) 0%,
        rgba(0, 191, 255, 0.3) 50%,
        transparent 100%
    );
    animation: tidalWave 5s ease-in-out infinite;
    pointer-events: none;
    clip-path: polygon(0% 100%, 100% 100%, 100% 80%, 90% 75%, 80% 78%, 70% 72%, 60% 76%, 50% 70%, 40% 74%, 30% 71%, 20% 75%, 10% 73%, 0% 77%);
}

@keyframes tidalWave {
    0%, 100% {
        clip-path: polygon(0% 100%, 100% 100%, 100% 80%, 90% 75%, 80% 78%, 70% 72%, 60% 76%, 50% 70%, 40% 74%, 30% 71%, 20% 75%, 10% 73%, 0% 77%);
    }
    50% {
        clip-path: polygon(0% 100%, 100% 100%, 100% 75%, 90% 70%, 80% 73%, 70% 67%, 60% 71%, 50% 65%, 40% 69%, 30% 66%, 20% 70%, 10% 68%, 0% 72%);
    }
}

.poseidon-3d-ocean-depth {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 50, 0.4) 30%,
        rgba(0, 50, 100, 0.2) 60%,
        transparent 100%
    );
    pointer-events: none;
    mix-blend-mode: multiply;
}

.poseidon-3d-pressure-waves {
    position: absolute;
    top: 40%;
    left: 50%;
    width: 0;
    height: 0;
    border: 2px solid rgba(0, 191, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pressureWaveExpand 2s ease-out infinite;
    pointer-events: none;
}

@keyframes pressureWaveExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 500px;
        height: 500px;
        opacity: 0;
    }
}

.poseidon-3d-current-flow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(0, 191, 255, 0.1) 20px,
            rgba(0, 191, 255, 0.1) 40px
        );
    animation: currentFlow 6s linear infinite;
    pointer-events: none;
    mix-blend-mode: screen;
}

@keyframes currentFlow {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 40px;
    }
}

.poseidon-3d-kelvin-wake {
    position: absolute;
    bottom: 20%;
    left: 30%;
    width: 40%;
    height: 20%;
    background: 
        radial-gradient(
            ellipse,
            rgba(0, 191, 255, 0.2) 0%,
            transparent 70%
        );
    animation: kelvinWake 3s ease-in-out infinite;
    pointer-events: none;
    filter: blur(15px);
    clip-path: polygon(0% 50%, 100% 50%, 100% 100%, 0% 100%);
}

@keyframes kelvinWake {
    0%, 100% {
        transform: scaleX(1) scaleY(1);
        opacity: 0.6;
    }
    50% {
        transform: scaleX(1.2) scaleY(0.8);
        opacity: 0.8;
    }
}

.poseidon-3d-surface-reflection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(
        to bottom,
        rgba(0, 191, 255, 0.2) 0%,
        rgba(0, 150, 255, 0.1) 50%,
        transparent 100%
    );
    animation: surfaceReflection 4s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
    transform: scaleY(-1);
    transform-origin: top;
}

@keyframes surfaceReflection {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(-1) translateY(0);
    }
    50% {
        opacity: 0.6;
        transform: scaleY(-1) translateY(-5px);
    }
}

.poseidon-3d-underwater-caustics {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 191, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 70%, rgba(0, 212, 255, 0.25) 0%, transparent 50%);
    animation: underwaterCaustics 5s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: screen;
}

@keyframes underwaterCaustics {
    0%, 100% {
        background-position: 0 0, 0 0, 0 0;
        opacity: 0.6;
    }
    33% {
        background-position: 30px 30px, -20px 20px, 20px -20px;
        opacity: 0.8;
    }
    66% {
        background-position: -30px -30px, 20px -20px, -20px 20px;
        opacity: 0.7;
    }
}

.poseidon-3d-marine-snow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 45% 35%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 75% 50%, rgba(255, 255, 255, 0.25) 1px, transparent 1px),
        radial-gradient(circle at 25% 65%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 85% 80%, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 200px 200px, 250px 250px, 180px 180px, 220px 220px, 200px 200px;
    animation: marineSnow 20s linear infinite;
    pointer-events: none;
    opacity: 0.4;
}

@keyframes marineSnow {
    0% {
        background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 0 2000px, 0 2500px, 0 1800px, 0 2200px, 0 2000px;
    }
}

.poseidon-3d-bioluminescence {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 30% 40%, rgba(0, 255, 255, 0.4) 0%, transparent 30px),
        radial-gradient(circle at 70% 60%, rgba(0, 191, 255, 0.3) 0%, transparent 25px),
        radial-gradient(circle at 50% 30%, rgba(0, 212, 255, 0.35) 0%, transparent 35px);
    animation: bioluminescence 4s ease-in-out infinite;
    pointer-events: none;
    filter: blur(8px);
}

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

.poseidon-3d-turbulence {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 5px,
            rgba(0, 191, 255, 0.1) 5px,
            rgba(0, 191, 255, 0.1) 10px
        );
    animation: turbulence 2s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
    filter: blur(5px);
}

@keyframes turbulence {
    0%, 100% {
        transform: translateX(0) skewY(0deg);
    }
    25% {
        transform: translateX(5px) skewY(0.5deg);
    }
    50% {
        transform: translateX(0) skewY(0deg);
    }
    75% {
        transform: translateX(-5px) skewY(-0.5deg);
    }
}

.poseidon-3d-vorticity {
    position: absolute;
    bottom: 15%;
    left: 50%;
    width: 150px;
    height: 150px;
    background: 
        repeating-conic-gradient(
            from 0deg,
            transparent 0deg,
            rgba(0, 191, 255, 0.2) 10deg,
            transparent 20deg
        );
    border-radius: 50%;
    animation: vorticitySpin 3s linear infinite;
    pointer-events: none;
    filter: blur(12px);
    transform: translate(-50%, 0);
}

@keyframes vorticitySpin {
    0% {
        transform: translate(-50%, 0) rotate(0deg) scale(1);
    }
    100% {
        transform: translate(-50%, 0) rotate(360deg) scale(1.1);
    }
}

.poseidon-3d-surface-ripples {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 191, 255, 0.3) 0%, transparent 40px),
        radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.25) 0%, transparent 50px),
        radial-gradient(circle at 80% 50%, rgba(0, 191, 255, 0.3) 0%, transparent 45px);
    animation: surfaceRipples 3s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: screen;
}

@keyframes surfaceRipples {
    0%, 100% {
        background-size: 80px 80px, 100px 100px, 90px 90px;
        opacity: 0.6;
    }
    50% {
        background-size: 120px 120px, 150px 150px, 130px 130px;
        opacity: 0.8;
    }
}

.poseidon-3d-thermocline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 100, 0.4) 0%,
        rgba(0, 50, 150, 0.3) 40%,
        rgba(0, 100, 200, 0.2) 60%,
        transparent 100%
    );
    pointer-events: none;
    mix-blend-mode: multiply;
    animation: thermoclineShift 6s ease-in-out infinite;
}

@keyframes thermoclineShift {
    0%, 100% {
        background-position: 0 0;
    }
    50% {
        background-position: 0 -20px;
    }
}

.poseidon-3d-salinity-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: 
        linear-gradient(90deg, 
            rgba(0, 100, 200, 0.2) 0%,
            rgba(0, 150, 255, 0.15) 50%,
            rgba(0, 100, 200, 0.2) 100%
        );
    pointer-events: none;
    mix-blend-mode: overlay;
    animation: salinityGradient 8s ease-in-out infinite;
}

@keyframes salinityGradient {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.7;
    }
}

.poseidon-3d-upwelling {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 30%;
    height: 40%;
    background: linear-gradient(
        to top,
        rgba(0, 191, 255, 0.3) 0%,
        rgba(0, 150, 255, 0.2) 50%,
        transparent 100%
    );
    animation: upwelling 4s ease-in-out infinite;
    pointer-events: none;
    filter: blur(20px);
    transform: translateX(-50%);
}

@keyframes upwelling {
    0%, 100% {
        transform: translateX(-50%) translateY(0) scaleY(1);
        opacity: 0.6;
    }
    50% {
        transform: translateX(-50%) translateY(-20px) scaleY(1.2);
        opacity: 0.8;
    }
}

.poseidon-3d-downwelling {
    position: absolute;
    top: 0;
    left: 30%;
    width: 40%;
    height: 30%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 100, 200, 0.2) 50%,
        rgba(0, 50, 150, 0.3) 100%
    );
    animation: downwelling 5s ease-in-out infinite;
    pointer-events: none;
    filter: blur(25px);
}

@keyframes downwelling {
    0%, 100% {
        transform: translateY(0) scaleY(1);
        opacity: 0.5;
    }
    50% {
        transform: translateY(15px) scaleY(1.1);
        opacity: 0.7;
    }
}

.poseidon-3d-ekman-spiral {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: 
        repeating-conic-gradient(
            from 0deg at 50% 100%,
            transparent 0deg,
            rgba(0, 191, 255, 0.1) 15deg,
            transparent 30deg
        );
    animation: ekmanSpiral 10s linear infinite;
    pointer-events: none;
    opacity: 0.4;
}

@keyframes ekmanSpiral {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.poseidon-3d-rossby-wave {
    position: absolute;
    top: 30%;
    left: 0;
    width: 100%;
    height: 20%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 30px,
            rgba(0, 191, 255, 0.15) 30px,
            rgba(0, 191, 255, 0.15) 60px
        );
    animation: rossbyWave 12s ease-in-out infinite;
    pointer-events: none;
    filter: blur(10px);
}

@keyframes rossbyWave {
    0%, 100% {
        transform: translateX(0) scaleY(1);
        opacity: 0.5;
    }
    50% {
        transform: translateX(50px) scaleY(1.2);
        opacity: 0.7;
    }
}

.poseidon-3d-kelvin-helmholtz {
    position: absolute;
    top: 40%;
    left: 0;
    width: 100%;
    height: 10%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 191, 255, 0.2) 0%,
            transparent 5%,
            rgba(0, 212, 255, 0.2) 10%,
            transparent 15%
        );
    animation: kelvinHelmholtz 3s ease-in-out infinite;
    pointer-events: none;
    filter: blur(8px);
}

@keyframes kelvinHelmholtz {
    0%, 100% {
        transform: translateY(0) skewY(0deg);
    }
    50% {
        transform: translateY(-5px) skewY(2deg);
    }
}

/* End of Poseidon 3D CSS - ~2500 lines of comprehensive styling */

