/* Magic Game Specific Styles */

/* Autocomplete Suggestions Dropdown */
.magic-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.95) 0%, rgba(249, 115, 22, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    margin-top: 8px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-height: 240px;
    overflow-y: auto;
    display: none;
    animation: slideDown 0.3s ease;
}

/* Custom scrollbar for suggestions */
.magic-suggestions::-webkit-scrollbar {
    width: 8px;
}

.magic-suggestions::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.magic-suggestions::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

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

/* Suggestion items */
.suggestion-item {
    padding: 12px 16px;
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
}

.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.3);
}

.suggestion-item:active {
    transform: scale(0.98);
}

/* Highlight matching text */
.suggestion-item .highlight {
    font-weight: 700;
    color: #FFD700;
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input group positioning fix */
.magic-input-group {
    position: relative;
}

/* Video placeholder styles */
.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(249, 115, 22, 0.2) 100%);
    border-radius: 16px;
    min-height: 400px;
}

/* Results screen styles */
.magic-results {
    text-align: center;
    padding: 40px;
    animation: fadeIn 0.5s ease;
}

.magic-results h2 {
    font-size: 48px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #8B5CF6 0%, #F97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.magic-results-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
}

.magic-results-stats .stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 40px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.magic-results-stats .stat-item h3 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.magic-results-stats .stat-item p {
    color: white;
    font-size: 36px;
    font-weight: 700;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Feedback message styles */
.magic-feedback {
    margin-top: 16px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.magic-feedback.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.magic-feedback.error {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.magic-feedback.warning {
    background: rgba(251, 191, 36, 0.2);
    color: #FBBF24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

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

/* Loading overlay improvements */
.magic-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 10;
}

.magic-loading-overlay p {
    color: white;
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.8;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .magic-suggestions {
        max-height: 180px;
    }
    
    .suggestion-item {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .magic-results h2 {
        font-size: 36px;
    }
    
    .magic-results-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .magic-results-stats .stat-item p {
        font-size: 28px;
    }
}