/* Additional CSS for enhanced styling and animations */

/* Enhanced animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-10px); }
    70% { transform: translateY(-5px); }
}

/* Apply animations to elements */
.feature-card {
    animation: fadeIn 0.6s ease-out forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

.game-card {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.15s; }
.game-card:nth-child(3) { animation-delay: 0.2s; }
.game-card:nth-child(4) { animation-delay: 0.25s; }
.game-card:nth-child(5) { animation-delay: 0.3s; }
.game-card:nth-child(6) { animation-delay: 0.35s; }

/* Enhanced hover effects */
.btn:hover {
    animation: pulse 0.3s ease-in-out;
}

.play-btn:hover {
    animation: bounce 0.6s ease-in-out;
}

/* Improved focus states for accessibility */
.btn:focus,
.tab-btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Enhanced loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

/* Enhanced error states */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ffebee;
    color: #c62828;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid #f44336;
    box-shadow: var(--shadow-heavy);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

.error-message button {
    background: none;
    border: none;
    color: #c62828;
    font-weight: 600;
    cursor: pointer;
    margin-left: 1rem;
}

/* Success message styling */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #e8f5e8;
    color: #2e7d32;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid #4caf50;
    box-shadow: var(--shadow-heavy);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

/* Enhanced form styling */
.form-group {
    position: relative;
}

.form-group input:focus + label,
.form-group select:focus + label,
.form-group textarea:focus + label {
    color: var(--secondary-color);
}

.form-validation-error {
    color: #f44336;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-validation-success {
    color: #4caf50;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #000080;
        --text-dark: #000000;
        --border-color: #000000;
    }
    
    .btn {
        border: 2px solid;
    }
}

/* Dark mode support (if enabled by user) */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #1a1a1a;
        --text-dark: #ffffff;
        --border-color: #333333;
    }
    
    .feature-card,
    .game-card,
    .footer {
        background: #2d2d2d;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .btn,
    .mobile-menu-toggle,
    .age-verification-overlay,
    .cookie-consent {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .game-frame {
        display: none;
    }
    
    .legal-content {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
