/* Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    perspective: 1000px;
    margin-bottom: 30px;
}

.loading-coin {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 50%, #d4af37 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #000;
    font-size: 12px;
    letter-spacing: 1px;
    animation: loadingSpin 2s ease-in-out infinite;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.8),
        0 5px 20px rgba(0, 0, 0, 0.3);
}

.loading-text {
    color: #ffd700;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Smooth loading coin animation */
@keyframes loadingSpin {
    0% { transform: rotateY(0deg) scaleX(1); }
    12.5% { transform: rotateY(45deg) scaleX(0.8); }
    25% { transform: rotateY(90deg) scaleX(0.2); }
    37.5% { transform: rotateY(135deg) scaleX(0.8); }
    50% { transform: rotateY(180deg) scaleX(1); }
    62.5% { transform: rotateY(225deg) scaleX(0.8); }
    75% { transform: rotateY(270deg) scaleX(0.2); }
    87.5% { transform: rotateY(315deg) scaleX(0.8); }
    100% { transform: rotateY(360deg) scaleX(1); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Main coin - Real 3D flip effect */
.css-fallback {
    display: block;
}

/* Clean 3D Coin Container */
.coin-3d-enhanced {
    width: 300px;
    height: 300px;
    position: relative;
    transform-style: preserve-3d;
    animation: perfectSpin 2s linear infinite;
    margin: 0 auto;
}

.coin-side {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.coin-side::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    right: 10%;
    bottom: 10%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.coin-side::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    right: 20%;
    bottom: 20%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.coin-front {
    transform: rotateY(0deg) translateZ(15px);
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6) 0%, transparent 50%),
        linear-gradient(135deg, #ffd700 0%, #ffb347 50%, #d4af37 100%);
    font-size: 2.5rem;
    color: #000;
    font-weight: 900;
    letter-spacing: 3px;
    border: 3px solid #b8860b;
    box-shadow: 
        0 0 40px rgba(255, 215, 0, 0.8),
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.4);
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 215, 0, 0.6);
    backface-visibility: hidden;
}

.coin-back {
    transform: rotateY(180deg) translateZ(-15px);
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6) 0%, transparent 50%),
        linear-gradient(135deg, #ffd700 0%, #ffb347 50%, #d4af37 100%);
    font-size: 2.5rem;
    color: #000;
    font-weight: 900;
    letter-spacing: 3px;
    border: 3px solid #b8860b;
    box-shadow: 
        0 0 40px rgba(255, 215, 0, 0.8),
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.4);
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 215, 0, 0.6);
    backface-visibility: hidden;
}


/* Clean coin edge */
.coin-edge {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 30px;
    background: linear-gradient(90deg, transparent, #b8860b, #d4af37, #ffd700, #d4af37, #b8860b, transparent);
    transform: translate(-50%, -50%) rotateX(90deg);
    border-radius: 15px;
}



/* Perfect fast 3D coin spin */
@keyframes perfectSpin {
    0% { 
        transform: rotateX(0deg) rotateY(0deg); 
    }
    100% { 
        transform: rotateX(0deg) rotateY(360deg); 
    }
}

/* Coin reflection effect */
.coin-reflection {
    position: absolute;
    top: 30%;
    left: 20%;
    width: 60px;
    height: 100px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 50%;
    filter: blur(15px);
    animation: reflectionMove 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes reflectionMove {
    0%, 100% { 
        transform: translateX(0px) translateY(0px) rotate(45deg);
        opacity: 0.3;
    }
    50% { 
        transform: translateX(30px) translateY(-20px) rotate(45deg);
        opacity: 0.6;
    }
}

/* Floating coins around main coin */
.floating-mini-coin {
    position: absolute;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #ffd700, #ffb347, #40e0d0, #48cae4);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 0 8px rgba(64, 224, 208, 0.4);
    animation: floatAround 8s ease-in-out infinite;
}

.mini-coin-1 {
    top: 20%;
    left: -10%;
    animation-delay: 0s;
}

.mini-coin-2 {
    top: 70%;
    right: -10%;
    animation-delay: 2s;
}

.mini-coin-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.mini-coin-4 {
    top: 10%;
    right: 20%;
    animation-delay: 6s;
}

@keyframes floatAround {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.6;
    }
    25% { 
        transform: translateY(-30px) translateX(20px) scale(1.2);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-10px) translateX(40px) scale(0.8);
        opacity: 1;
    }
    75% { 
        transform: translateY(20px) translateX(10px) scale(1.1);
        opacity: 0.7;
    }
}

/* Enhanced energy field */
.coin-energy-field {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    border: 2px solid rgba(64, 224, 208, 0.2);
    border-radius: 50%;
    animation: energyPulse 3s ease-in-out infinite;
}

.coin-energy-field::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 50%;
    animation: energyPulse 3s ease-in-out infinite reverse;
}

.coin-energy-field::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border: 1px solid rgba(64, 224, 208, 0.4);
    border-radius: 50%;
    animation: energyPulse 3s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes energyPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.7;
    }
}

/* Coin glow effect */
.coin-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, rgba(255, 215, 0, 0.3) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    animation: simpleGlow 2s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes simpleGlow {
    0% { opacity: 0.5; }
    100% { opacity: 0.8; }
}

/* Interactive hover effects */
.coin-3d-container:hover .coin-3d-enhanced {
    animation-play-state: paused;
    transform: rotateY(15deg) rotateX(15deg);
}

.coin-3d-container:hover .coin-glow {
    animation-duration: 1s;
    opacity: 1;
}

.coin-3d-container:hover .floating-mini-coin {
    animation-duration: 4s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .webgl-coin-container {
        width: 250px;
        height: 250px;
    }
    
    .coin-3d-enhanced {
        width: 200px;
        height: 200px;
    }
    
    .coin-side {
        width: 200px;
        height: 200px;
    }
    
    .coin-front, .coin-back {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .coin-energy-field {
        width: 300px;
        height: 300px;
    }
    
    .coin-glow {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .webgl-coin-container {
        width: 200px;
        height: 200px;
    }
    
    .coin-3d-enhanced {
        width: 150px;
        height: 150px;
    }
    
    .coin-side {
        width: 150px;
        height: 150px;
    }
    
    .coin-front, .coin-back {
        font-size: 1.4rem;
        letter-spacing: 0px;
    }
} 