/* Party Games - Custom Styles */

/* Smooth transitions for all interactive elements */
* {
    transition-property: transform, opacity, background-color, border-color, box-shadow;
    transition-duration: 0.15s;
    transition-timing-function: ease-out;
}

/* Disable transitions for fast polling updates */
.no-transition * {
    transition: none !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Button press effect */
button:active:not(:disabled) {
    transform: scale(0.97);
}

/* Input focus glow */
input:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

/* Card hover lift effect */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Pulse animation for waiting states */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bounce animation for celebrations */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* Shake animation for wrong answers */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.animate-shake {
    animation: shake 0.3s ease-in-out;
}

/* Scale in animation */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out forwards;
}

/* Slide up animation */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out forwards;
}

/* Timer urgency effect */
.timer-urgent {
    animation: pulse 0.5s ease-in-out infinite;
    color: #f87171 !important;
}

/* Quiplash winner glow */
@keyframes winnerGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(245, 158, 11, 0.8);
    }
}

.winner-glow {
    animation: winnerGlow 1.5s ease-in-out infinite;
}

/* Mobile touch improvements */
@media (hover: none) {
    button:active:not(:disabled) {
        transform: scale(0.95);
    }
}

/* Prevent text selection on interactive elements */
button, .no-select {
    -webkit-user-select: none;
    user-select: none;
}

/* Large touch targets for mobile */
@media (max-width: 640px) {
    button {
        min-height: 44px;
    }

    input {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
}

/* Room code display styling */
.room-code {
    letter-spacing: 0.2em;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Player card styling */
.player-card {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
}

/* Answer card styling */
.answer-card {
    backdrop-filter: blur(10px);
}

/* Voting button styling */
.vote-button {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
}

.vote-button:hover {
    background: linear-gradient(135deg, #818CF8 0%, #A78BFA 100%);
}

/* Result winner styling */
.result-winner {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

/* Quiplash banner */
.quiplash-banner {
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 1s ease-in-out infinite;
}

/* Loading spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #F59E0B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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