/* Esports Talent Testing - Shared Styles */

/* Custom animations and game-specific styles */
.game-grid {
    display: grid;
    gap: 4px;
}

.memory-cell {
    aspect-ratio: 1;
    transition: all 0.3s ease;
    cursor: pointer;
}

.memory-cell:hover {
    transform: scale(1.05);
}

.flash {
    animation: flash 0.5s ease-in-out;
}

@keyframes flash {
    0%, 100% { 
        background-color: rgb(59, 130, 246); 
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }
    50% { 
        background-color: rgb(239, 68, 68); 
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.8);
    }
}

.multitask-target {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.multitask-target:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Click target animations */
#click-target {
    transition: all 0.1s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#click-target:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Pulse animation for active states */
.pulse {
    animation: pulse 2s infinite;
}

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

/* Score animations */
.score-increase {
    animation: scoreIncrease 0.5s ease-out;
}

@keyframes scoreIncrease {
    0% {
        transform: scale(1);
        color: inherit;
    }
    50% {
        transform: scale(1.2);
        color: #10b981;
    }
    100% {
        transform: scale(1);
        color: inherit;
    }
}

/* Gradient backgrounds for cards */
.bg-gray-750 {
    background-color: rgb(55, 65, 81);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .game-grid {
        width: 300px !important;
        height: 300px !important;
    }
    
    #click-target {
        width: 250px !important;
        height: 250px !important;
        font-size: 2rem !important;
    }
    
    #multitask-arena {
        height: 400px !important;
    }
    
    .multitask-target {
        width: 35px;
        height: 35px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error feedback */
.feedback-success {
    color: #10b981 !important;
    animation: fadeIn 0.3s ease-in;
}

.feedback-error {
    color: #ef4444 !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Performance indicators */
.performance-excellent {
    color: #8b5cf6 !important;
}

.performance-good {
    color: #10b981 !important;
}

.performance-average {
    color: #f59e0b !important;
}

.performance-poor {
    color: #ef4444 !important;
}

/* Target spawn animation */
.target-spawn {
    animation: targetSpawn 0.3s ease-out;
}

@keyframes targetSpawn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Button hover effects */
button {
    transition: all 0.2s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

/* Focus states for accessibility */
button:focus,
.memory-cell:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Disabled states */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gray-800 {
        background-color: #000000;
        border: 1px solid #ffffff;
    }
    
    .bg-gray-700 {
        background-color: #1a1a1a;
        border: 1px solid #666666;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .bg-gray-900,
    .bg-gray-800,
    .bg-gray-700 {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    
    button {
        border: 1px solid #000000;
        background-color: #ffffff;
        color: #000000;
    }
}