/**
 * Interactive Styles for Enhanced User Experience
 * Animations, transitions, and interactive elements
 */

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 30px rgba(212, 175, 55, 0.6);
    }
}

/* Scroll animations */
.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-in.slide-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

/* Enhanced card interactions */
.player-card, .ranking-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.player-card::before, .ranking-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.player-card:hover::before, .ranking-card:hover::before {
    left: 100%;
}

.player-card:hover, .ranking-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.player-card:active, .ranking-card:active {
    transform: translateY(-2px) scale(0.98);
}

/* Countdown timer styles */
#countdown-timer {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.countdown-item {
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    min-width: 100px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
}

.countdown-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #d4af37;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.countdown-label {
    display: block;
    font-size: 0.9rem;
    color: #ffffff;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ceremony-live {
    color: #ff4444;
    font-weight: bold;
    animation: pulse 2s infinite;
    font-size: 1.5rem;
}

/* Floating Action Button */
.floating-action-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    border: none;
    color: #1a1a2e;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-action-button.open .fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-action-button.open .fab-main {
    transform: rotate(45deg);
}

.fab-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.fab-item:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    transform: scale(1.1);
}

/* Toast notifications */
.toast-notification {
    position: fixed;
    bottom: 100px;
    right: 2rem;
    background: rgba(26, 26, 46, 0.95);
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    max-width: 300px;
}

.toast-notification.show {
    transform: translateX(0);
}

/* Loading animations */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a1c3a 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-top: 3px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Hero section enhancements */
.hero-section.loaded {
    animation: fadeInUp 1s ease-out;
}

.hero-section.loaded .hero-title {
    animation: slideInLeft 1s ease-out 0.3s both;
}

.hero-section.loaded .hero-subtitle {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-section.loaded .hero-cta {
    animation: fadeInUp 1s ease-out 0.9s both;
}

/* Parallax elements */
[data-parallax] {
    will-change: transform;
}

/* Scroll indicators */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(212, 175, 55, 0.2);
    z-index: 999;
}

.scroll-progress {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #f4d03f);
    width: 0%;
    transition: width 0.1s ease;
}

/* Interactive buttons */
.btn-interactive {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-interactive::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn-interactive:hover::before {
    width: 300px;
    height: 300px;
}

.btn-interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .floating-action-button {
        bottom: 1rem;
        right: 1rem;
    }
    
    .fab-main {
        width: 48px;
        height: 48px;
    }
    
    .fab-item {
        width: 40px;
        height: 40px;
    }
    
    #countdown-timer {
        gap: 1rem;
    }
    
    .countdown-item {
        min-width: 80px;
        padding: 1rem 0.5rem;
    }
    
    .countdown-number {
        font-size: 2rem;
    }
    
    .toast-notification {
        right: 1rem;
        bottom: 80px;
        max-width: calc(100vw - 2rem);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .parallax-element {
        transform: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .fab-main {
        border: 2px solid #000;
    }
    
    .fab-item {
        border: 2px solid #d4af37;
    }
    
    .countdown-item {
        border: 2px solid #d4af37;
    }
}

/* Focus styles for accessibility */
.fab-main:focus,
.fab-item:focus,
.btn-interactive:focus {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .floating-action-button,
    .toast-notification,
    .loading-screen {
        display: none !important;
    }
}
