@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #0f172a, #1e1b4b);
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    --accent: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -15px rgba(139, 92, 246, 0.3);
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
    box-shadow: 0 10px 20px -10px var(--primary-color);
}

/* Game UI Elements */
.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.currency-container {
    display: flex;
    gap: 20px;
}

.currency-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid var(--glass-border);
}

.currency-badge.soft { color: #cbd5e1; }
.currency-badge.hard { color: var(--accent); }

/* Wheel specific */
.wheel-container {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 40px auto;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid #1e293b; /* Bordo solido per evitare sbavature del gradiente sottostante */
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.4), inset 0 0 20px rgba(0,0,0,0.8);
    background: conic-gradient(
        #3b82f6 0deg 45deg, 
        #8b5cf6 45deg 90deg, 
        #f59e0b 90deg 135deg, 
        #ef4444 135deg 180deg,
        #10b981 180deg 225deg,
        #f43f5e 225deg 270deg,
        #8b5cf6 270deg 315deg,
        #3b82f6 315deg 360deg
    );
    transition: transform 4s cubic-bezier(0.1, 0.9, 0.2, 1);
    position: relative;
}

.wheel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20%;
    height: 20%;
    background: #0f172a;
    border-radius: 50%;
    border: 6px solid #1e293b;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    background: linear-gradient(to bottom, #f8fafc, #cbd5e1);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.8));
}

/* Card Reveal */
.card-reveal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.card-reveal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.player-card {
    width: 250px;
    height: 350px;
    background: linear-gradient(135deg, #334155, #0f172a);
    border: 2px solid #64748b;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    position: relative;
    overflow: hidden;
}

.player-card.bronze { border-color: #cd7f32; box-shadow: 0 0 30px rgba(205, 127, 50, 0.4); }
.player-card.silver { border-color: #c0c0c0; box-shadow: 0 0 30px rgba(192, 192, 192, 0.4); }
.player-card.gold { border-color: #ffd700; box-shadow: 0 0 30px rgba(255, 215, 0, 0.5); }
.player-card.legendary { 
    border-color: #ff00ff; 
    box-shadow: 0 0 40px rgba(255, 0, 255, 0.6); 
    background: linear-gradient(135deg, #4a044e, #0f172a);
}

.card-name { font-size: 1.5rem; font-weight: 800; margin-top: 20px; text-transform: uppercase; text-align: center;}
.card-position { font-size: 1.2rem; color: var(--accent); margin-bottom: 20px; }
.card-rating { font-size: 4rem; font-weight: 800; }
.close-btn { margin-top: auto; background: transparent; border: 1px solid white; padding: 8px 16px; color: white; border-radius: 8px; cursor: pointer; transition: background 0.3s ease;}
.close-btn:hover { background: rgba(255,255,255,0.1); }
