/* Professional Random Q&A Game Styles */

.random-qa-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

/* Players Circle */
.players-circle {
    position: relative;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 
        0 0 0 8px rgba(255, 255, 255, 0.1),
        0 0 0 12px rgba(0, 0, 0, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 0 0 2px rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 2rem 0;
}

/* Circle Pattern */
.players-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px, 60px 60px, 40px 40px;
    opacity: 0.6;
}

/* Center Marker */
.center-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #e74c3c 0%, #c0392b 100%);
    border-radius: 50%;
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.8),
        0 0 0 6px rgba(231, 76, 60, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.center-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Player Cards */
.player-card {
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 3px solid rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

.player-card:hover {
    transform: scale(1.1);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.player-card.selected {
    transform: scale(1.2);
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 
        0 8px 20px rgba(231, 76, 60, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: selectedPulse 1s ease-in-out infinite;
}

.player-card.asker {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    animation: askerGlow 2s ease-in-out infinite;
}

.player-card.answerer {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    animation: answererGlow 2s ease-in-out infinite;
}

@keyframes selectedPulse {
    0%, 100% { transform: scale(1.2); }
    50% { transform: scale(1.3); }
}

@keyframes askerGlow {
    0%, 100% { box-shadow: 0 8px 20px rgba(243, 156, 18, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 12px 24px rgba(243, 156, 18, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
}

@keyframes answererGlow {
    0%, 100% { box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 12px 24px rgba(39, 174, 96, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
}

.player-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    padding: 0.25rem;
    word-break: break-word;
}

/* Game Title */
.game-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
}

/* Game Instructions */
.game-instructions {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.game-instructions h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.game-instructions p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Game Controls */
.game-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.select-pair-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.select-pair-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.select-pair-btn:active {
    transform: translateY(0);
}

.select-pair-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.reset-game-btn {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reset-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(149, 165, 166, 0.4);
}

/* Selection Result */
.selection-result {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    text-align: center;
    display: none;
    box-shadow: var(--shadow-lg);
}

.selection-result.show {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pair-selection {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.asker-section,
.answerer-section {
    flex: 1;
    min-width: 150px;
}

.asker-section h4,
.answerer-section h4 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.player-name.asker,
.player-name.answerer {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 1rem;
    border-radius: 12px;
    margin: 0;
}

.player-name.asker {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1), rgba(230, 126, 34, 0.1));
    color: #f39c12;
    border: 2px solid rgba(243, 156, 18, 0.3);
}

.player-name.answerer {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(46, 204, 113, 0.1));
    color: #27ae60;
    border: 2px solid rgba(39, 174, 96, 0.3);
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}


/* Loading States */
.random-qa-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.random-qa-container.loading .player-card {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .random-qa-container {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .players-circle {
        width: 350px;
        height: 350px;
    }
    
    .player-card {
        width: 60px;
        height: 60px;
    }
    
    .player-name {
        font-size: 0.7rem;
    }
    
    .center-marker {
        width: 20px;
        height: 20px;
    }
    
    .center-marker::before {
        width: 8px;
        height: 8px;
    }
    
    .game-title {
        font-size: 1.5rem;
    }
    
    .game-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .select-pair-btn,
    .reset-game-btn {
        width: 100%;
        justify-content: center;
    }
    
    .pair-selection {
        flex-direction: column;
        gap: 1rem;
    }
    
    .vs-divider {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .players-circle {
        width: 280px;
        height: 280px;
    }
    
    .player-card {
        width: 50px;
        height: 50px;
    }
    
    .player-name {
        font-size: 0.6rem;
    }
    
    .center-marker {
        width: 16px;
        height: 16px;
    }
    
    .center-marker::before {
        width: 6px;
        height: 6px;
    }
    
    .game-title {
        font-size: 1.3rem;
    }
    
    .game-instructions {
        padding: 1rem;
    }
    
    .selection-result {
        padding: 1rem;
    }
}

/* Accessibility */
.select-pair-btn:focus,
.reset-game-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.player-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .player-card.selected,
    .player-card.asker,
    .player-card.answerer {
        animation: none;
    }
    
    .random-qa-container.loading .player-card {
        animation: none;
    }
    
    .selection-result.show {
        animation: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}