/* ============================================
   ETERNAL ZONE - Enhanced 3D Animations
   ============================================ */

/* ========== BOOT SCREEN ========== */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050510;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 99999;
    animation: bootFadeOut 0.8s cubic-bezier(0.4, 0, 0.2, 1) 3s forwards;
    overflow: hidden;
}

.boot-screen::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(233, 69, 96, 0.2) 0%, transparent 60%);
    animation: bootGlow 2s ease-in-out infinite alternate;
}

.boot-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, transparent 49%, rgba(233, 69, 96, 0.03) 50%, transparent 51%, transparent 100%),
        linear-gradient(0deg, transparent 0%, transparent 49%, rgba(212, 175, 55, 0.02) 50%, transparent 51%, transparent 100%);
    background-size: 60px 60px;
    animation: gridMove 4s linear infinite;
}

@keyframes gridMove {
    from { transform: perspective(500px) rotateX(60deg) translateZ(0); }
    to { transform: perspective(500px) rotateX(60deg) translateZ(60px); }
}

@keyframes bootGlow {
    from { opacity: 0.3; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 0.8; transform: translate(-50%, -50%) scale(1.3); }
}

.boot-screen .boot-text {
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 900;
    letter-spacing: clamp(5px, 2vw, 15px);
    background: linear-gradient(135deg, #e94560, #d4af37, #e94560);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: bootTextReveal 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, 
               textGlow 2s ease-in-out 1.5s infinite alternate;
    opacity: 0;
    transform: scale(0.3) rotateX(90deg);
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 30px rgba(233, 69, 96, 0.5));
}

.boot-screen .boot-subtitle {
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    color: #555;
    letter-spacing: clamp(3px, 1vw, 8px);
    text-transform: uppercase;
    margin-top: 20px;
    animation: bootSubtitle 0.8s ease 1.8s forwards;
    opacity: 0;
    position: relative;
    z-index: 2;
}

.boot-screen .boot-line {
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #e94560, #d4af37, #e94560);
    margin-top: 30px;
    animation: bootLineExpand 1.2s cubic-bezier(0.4, 0, 0.2, 1) 1s forwards;
    border-radius: 2px;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
}

/* Particle effects for boot screen */
.boot-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.boot-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    animation: particleFloat 3s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0); }
    50% { opacity: 1; transform: translateY(-100px) scale(1); }
}

@keyframes bootTextReveal {
    0% { 
        opacity: 0; 
        transform: scale(0.3) rotateX(90deg); 
        filter: blur(10px);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.15) rotateX(-5deg); 
        filter: blur(0);
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotateX(0deg); 
        filter: blur(0);
    }
}

@keyframes textGlow {
    from { filter: drop-shadow(0 0 20px rgba(233, 69, 96, 0.3)); }
    to { filter: drop-shadow(0 0 40px rgba(233, 69, 96, 0.6)); }
}

@keyframes bootSubtitle {
    from { opacity: 0; transform: translateY(15px); letter-spacing: 15px; }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bootLineExpand {
    from { width: 0; }
    to { width: min(300px, 60vw); }
}

@keyframes bootFadeOut {
    0% { opacity: 1; visibility: visible; transform: scale(1); }
    100% { opacity: 0; visibility: hidden; transform: scale(1.1); }
}

/* ========== SCROLL ANIMATIONS ========== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-left {
    opacity: 0;
    transform: translateX(-60px) perspective(800px) rotateY(5deg);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.slide-left.visible {
    opacity: 1;
    transform: translateX(0) perspective(800px) rotateY(0);
}

.slide-right {
    opacity: 0;
    transform: translateX(60px) perspective(800px) rotateY(-5deg);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.slide-right.visible {
    opacity: 1;
    transform: translateX(0) perspective(800px) rotateY(0);
}

.scale-up {
    opacity: 0;
    transform: scale(0.8) perspective(600px) rotateX(10deg);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-up.visible {
    opacity: 1;
    transform: scale(1) perspective(600px) rotateX(0);
}

/* Staggered animations */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ========== 3D TILT EFFECT ========== */
.tilt-3d {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.tilt-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) translateZ(10px);
}

/* ========== PULSE ========== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ========== GLOW ========== */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(233, 69, 96, 0.3); }
    50% { box-shadow: 0 0 25px rgba(233, 69, 96, 0.6), 0 0 50px rgba(233, 69, 96, 0.2); }
}

.glow {
    animation: glow 2s infinite;
}

/* ========== FLOAT ========== */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(1deg); }
    66% { transform: translateY(-4px) rotate(-1deg); }
}

.float {
    animation: float 4s ease-in-out infinite;
}

/* ========== SHIMMER ========== */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    background-size: 200px 100%;
    animation: shimmer 2.5s infinite;
}

/* ========== ROTATE ========== */
@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner {
    animation: rotate360 1s linear infinite;
}

/* ========== PAGE TRANSITION ========== */
.page-transition {
    animation: pageSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pageSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========== LOADING DOTS ========== */
.loading-dots {
    display: inline-flex;
    gap: 6px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ========== 3D CARD FLIP ========== */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* ========== COUNTER ANIMATION ========== */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px) scale(0.5); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========== NEON TEXT ========== */
.neon-text {
    text-shadow: 0 0 7px rgba(233, 69, 96, 0.5),
                 0 0 10px rgba(233, 69, 96, 0.3),
                 0 0 21px rgba(233, 69, 96, 0.2);
}

/* ========== MOBILE OPTIMIZED ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .boot-screen .boot-text {
        letter-spacing: 5px;
    }
    
    .boot-screen::after {
        display: none;
    }
}
