/* Custom CSS for coin animation and special effects */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@400;500;600;700&display=swap');

/* Enhanced coin animation styles - Single coin with two sides */
.coin {
    transition: transform 1s cubic-bezier(0.4, 0.0, 0.2, 1);
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
    position: relative;
    border: 8px solid #d97706;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 900;
    overflow: hidden;
    transform: rotateY(0deg);
}

/* Add perspective to coin container */
.coin-container {
    perspective: 1000px;
    perspective-origin: center center;
}

/* Shiny edge effect */
.coin::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -100%;
    width: 120%;
    height: 120%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shine 3s infinite;
    z-index: 10;
    pointer-events: none;
}

/* Default state - Heads (Crown) */
.coin {
    background: radial-gradient(circle at 30% 30%, #fbbf24, #f59e0b, #d97706);
    border-color: #92400e;
    color: #451a03;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}

.coin::after {
    content: '👑';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    z-index: 20;
}

/* Tails state - Silver with eagle */
.coin.showing-tails {
    background: radial-gradient(circle at 30% 30%, #e5e7eb, #9ca3af, #6b7280);
    border-color: #4b5563;
    color: #1f2937;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}

.coin.showing-tails::after {
    content: '🦅';
}

/* Animation states for coin */

.coin.flip-heads {
    animation: flipToHeads 1.2s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.coin.flip-tails {
    animation: flipToTails 1.2s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes flipToHeads {
    0% { 
        transform: rotateY(0deg) scale(1); 
    }
    25% { 
        transform: rotateY(450deg) scale(1.2) rotateX(15deg); 
        filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.5));
    }
    50% { 
        transform: rotateY(900deg) scale(1.3) rotateX(0deg); 
        filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
    }
    75% { 
        transform: rotateY(1350deg) scale(1.2) rotateX(-15deg); 
        filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.5));
    }
    100% { 
        transform: rotateY(0deg) scale(1) rotateX(0deg); /* End at heads (0 degrees) */
        filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
    }
}

@keyframes flipToTails {
    0% { 
        transform: rotateY(0deg) scale(1); 
    }
    25% { 
        transform: rotateY(450deg) scale(1.2) rotateX(15deg); 
        filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.5));
    }
    50% { 
        transform: rotateY(900deg) scale(1.3) rotateX(0deg); 
        filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
    }
    75% { 
        transform: rotateY(1350deg) scale(1.2) rotateX(-15deg); 
        filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.5));
    }
    100% { 
        transform: rotateY(180deg) scale(1) rotateX(0deg); /* End at tails (180 degrees) */
        filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
    }
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Gradient backgrounds */
.bg-gradient-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.bg-gradient-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.9) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.bg-gradient-gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.bg-gradient-silver {
    background: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 100%);
}

.bg-gradient-bronze {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Custom button styles */
.btn-glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.btn-gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.btn-gold:hover {
    box-shadow: 0 6px 25px rgba(251, 191, 36, 0.4);
    transform: translateY(-2px);
}

/* Message animations */
.message {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.message.show {
    transform: translateX(0);
}

/* Loading spinner */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* Pulse animation for stats */
.stat-pulse {
    animation: pulse 2s infinite;
}

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

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.3);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

/* Glassmorphism effects */
.glass {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.glass-light {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

/* Neon text effects */
.neon-text {
    text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
}

/* Enhanced hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Custom focus states */
.focus-glow:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Responsive text scaling */
@media (max-width: 768px) {
    .coin {
        width: 120px !important;
        height: 120px !important;
    }
    
    .coin-face {
        font-size: 3rem !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}