/**
 * PartyBox - Game-Specific Styles
 * Wheel, game screens, and game-specific components
 */

/* Wheel Container */
.wheel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-container.large {
    margin: var(--spacing-lg) 0;
}

.wheel-container canvas {
    border-radius: 50%;
    box-shadow: 
        0 0 0 8px rgba(255, 255, 255, 0.1),
        0 0 40px rgba(255, 0, 110, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--accent);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    z-index: 10;
    animation: bounce 0.5s ease-in-out;
}

/* Game Screen Backgrounds */
#tod-game-screen {
    background: 
        radial-gradient(ellipse at top, rgba(131, 56, 236, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(255, 0, 110, 0.2) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

#nhie-game-screen {
    background: 
        radial-gradient(ellipse at center, rgba(131, 56, 236, 0.4) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

#wheel-game-screen {
    background: 
        radial-gradient(ellipse at center, rgba(255, 190, 11, 0.2) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

/* Game View Transitions */
.game-view {
    animation: fadeIn var(--transition-normal) ease;
}

/* Truth or Dare Specific */
#tod-wheel-view {
    min-height: 60vh;
}

#tod-player-view, #tod-task-view, #tod-manual-view {
    min-height: 70vh;
}

/* Task Card Variations */
.task-card.truth-card {
    border: 2px solid #3b82f6;
}

.task-card.dare-card {
    border: 2px solid var(--primary);
}

/* Never Have I Ever Statement Animations */
.statement-card.flip-out {
    animation: flipOut 0.2s ease forwards;
}

.statement-card.flip-in {
    animation: flipIn 0.3s ease forwards;
}

/* Shot Wheel Result */
.wheel-result-card.hidden {
    display: none;
}

.wheel-result-card.pop-in {
    animation: popIn 0.3s ease;
}

/* Confetti-like background effect */
.game-screen::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 0, 110, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(131, 56, 236, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(255, 190, 11, 0.05) 0%, transparent 30%);
}

/* Responsive adjustments for games */
@media (max-height: 700px) {
    .wheel-container canvas {
        width: 250px !important;
        height: 250px !important;
    }
    
    .statement-card {
        padding: var(--spacing-xl) var(--spacing-lg);
    }
    
    .statement-text {
        font-size: 1.25rem;
    }
    
    .current-player-card {
        padding: var(--spacing-lg);
    }
    
    .current-player-card .player-name {
        font-size: 1.5rem;
    }
    
    .choice-btn {
        padding: var(--spacing-lg);
    }
}

@media (min-width: 768px) {
    .wheel-container canvas {
        width: 350px !important;
        height: 350px !important;
    }
    
    .statement-card {
        padding: var(--spacing-xxl);
    }
    
    .statement-text {
        font-size: 1.75rem;
    }
    
    .task-text {
        font-size: 1.5rem;
    }
}

/* Landscape mode adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .game-view {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--spacing-md);
        align-content: center;
    }
    
    .wheel-container {
        flex: 0 0 auto;
    }
    
    .wheel-container canvas {
        width: 200px !important;
        height: 200px !important;
    }
    
    .choice-buttons {
        flex-direction: row;
    }
    
    .task-card, .current-player-card, .statement-card {
        max-width: 280px;
    }
}

/* Pulsing glow effect for active elements */
.btn-primary:not(:disabled),
.choice-btn {
    position: relative;
}

.btn-primary:not(:disabled)::after,
.choice-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.btn-primary:hover::after,
.choice-btn:hover::after {
    opacity: 1;
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Spin button special styling */
#tod-spin-btn, #shot-spin-btn {
    font-size: 1.25rem;
    padding: var(--spacing-lg) var(--spacing-xxl);
    background: linear-gradient(135deg, var(--accent), #e6a800);
    color: #1a0a2e;
    box-shadow: 
        0 4px 15px rgba(255, 190, 11, 0.4),
        0 0 30px rgba(255, 190, 11, 0.2);
}

#tod-spin-btn:hover:not(:disabled), 
#shot-spin-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 
        0 6px 20px rgba(255, 190, 11, 0.5),
        0 0 40px rgba(255, 190, 11, 0.3);
}

#tod-spin-btn:disabled, 
#shot-spin-btn:disabled {
    background: var(--bg-card);
    color: var(--text-muted);
    box-shadow: none;
}

/* Auto-Decide Card */
.auto-decide-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    min-width: 280px;
    margin-bottom: var(--spacing-md);
}

.auto-result-display {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg) var(--spacing-xl);
    text-align: center;
    margin: var(--spacing-lg) 0;
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: popIn 0.4s ease;
}

.auto-result-display.hidden {
    display: none;
}

.auto-result-display.truth {
    color: #3b82f6;
    border: 2px solid #3b82f6;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.auto-result-display.dare {
    color: var(--primary);
    border: 2px solid var(--primary);
    text-shadow: 0 0 30px rgba(255, 0, 110, 0.5);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.3);
}

@keyframes glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

/* Game Over Card */
.gameover-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(131, 56, 236, 0.2) 100%);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xxl);
    text-align: center;
    border: 2px solid var(--secondary);
    min-width: 280px;
    max-width: 350px;
}

.gameover-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    animation: bounce 1s ease-in-out;
}

.gameover-card h2 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: var(--spacing-md);
}

.gameover-card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xl);
}

.gameover-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}
