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

:root {
    --bg-dark: #0a0a1a;
    --bg-card: #1a1a2e;
    --accent-cyan: #00d4ff;
    --accent-coral: #ff6b6b;
    --accent-teal: #4ecdc4;
    --text-light: #ffffff;
    --text-muted: #b0b0c0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    color: var(--text-light);
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Particles Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-cyan);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}

/* Header */
.header {
    text-align: center;
    padding: 40px 0;
    animation: fadeInDown 0.8s ease-out;
}

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-icon {
    font-size: 50px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo-text {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal), var(--accent-coral));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 500;
}

/* Groups Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 20px 0;
    flex: 1;
}

@media (max-width: 600px) {
    .groups-grid {
        grid-template-columns: 1fr;
    }
}

.group-card {
    position: relative;
    background: linear-gradient(145deg, var(--bg-card), #252545);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
    text-decoration: none;
    color: var(--text-light);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeInUp 0.6s ease-out backwards;
}

.group-card:nth-child(1) { animation-delay: 0.1s; }
.group-card:nth-child(2) { animation-delay: 0.2s; }
.group-card:nth-child(3) { animation-delay: 0.3s; }
.group-card:nth-child(4) { animation-delay: 0.4s; }

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

.group-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-cyan);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.group-card:hover .card-glow {
    opacity: 1;
}

.card-icon {
    font-size: 50px;
    margin-bottom: 15px;
    display: block;
}

.card-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--text-light), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-title2 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card-count {
    display: inline-block;
    background: rgba(78, 205, 196, 0.2);
    color: var(--accent-teal);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Group Header */
.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 30px;
    animation: fadeInDown 0.6s ease-out;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.back-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent-cyan);
}

.back-icon {
    font-size: 18px;
}

.group-title {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.spacer {
    width: 100px;
}

/* Roulette Container */
.roulette-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Roulette Frame */
.roulette-frame {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin-bottom: 40px;
}

.roulette-glow {
    position: absolute;
    inset: -3px;
    background: linear-gradient(45deg, var(--accent-cyan), var(--accent-coral), var(--accent-teal), var(--accent-cyan));
    background-size: 400% 400%;
    border-radius: 25px;
    animation: gradientShift 4s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.roulette-window {
    background: linear-gradient(180deg, #0d0d20, #151530);
    border-radius: 20px;
    padding: 40px 20px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

.roulette-window::before,
.roulette-window::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.roulette-window::before {
    left: 0;
    background: linear-gradient(90deg, #0d0d20, transparent);
}

.roulette-window::after {
    right: 0;
    background: linear-gradient(-90deg, #0d0d20, transparent);
}

.spinning-names {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: var(--accent-cyan);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.name-placeholder {
    color: var(--text-muted);
    font-size: 20px;
    font-weight: 500;
}

/* Winner Display */
.winner-display {
    text-align: center;
    margin-bottom: 30px;
    animation: winnerAppear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes winnerAppear {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.winner-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-coral), #ff8e53);
    color: white;
    padding: 8px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 15px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 107, 107, 0.8); }
}

.winner-name {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-coral), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: winnerGlow 2s ease-in-out infinite;
}

@keyframes winnerGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 107, 107, 0.5)); }
    50% { filter: drop-shadow(0 0 25px rgba(255, 107, 107, 0.8)); }
}

/* Spin Button */
.spin-btn {
    position: relative;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
    border: none;
    border-radius: 50px;
    padding: 22px 60px;
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--bg-dark);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.spin-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.5);
}

.spin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spin-btn.spinning {
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0) scale(1.05); }
    25% { transform: translateX(-5px) scale(1.05); }
    75% { transform: translateX(5px) scale(1.05); }
}

.btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.spin-btn:hover .btn-glow {
    opacity: 1;
}

/* Reset Button */
.reset-btn {
    margin-top: 20px;
    background: transparent;
    border: 2px solid var(--accent-coral);
    border-radius: 50px;
    padding: 15px 40px;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-coral);
    cursor: pointer;
    transition: all 0.3s;
}

.reset-btn:hover {
    background: var(--accent-coral);
    color: var(--bg-dark);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% { 
        transform: translateY(0) rotate(0deg) scale(1); 
        opacity: 1; 
    }
    100% { 
        transform: translateY(100vh) rotate(720deg) scale(0); 
        opacity: 0; 
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.footer p {
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Responsive */
@media (max-width: 600px) {
    .logo-text {
        font-size: 28px;
    }
    
    .logo-icon {
        font-size: 36px;
    }
    
    .group-card {
        padding: 25px 20px;
    }
    
    .card-icon {
        font-size: 40px;
    }
    
    .card-title {
        font-size: 22px;
    }
    
    .group-title {
        font-size: 20px;
    }
    
    .spinning-names {
        font-size: 22px;
    }
    
    .winner-name {
        font-size: 32px;
    }
    
    .spin-btn {
        padding: 18px 45px;
        font-size: 20px;
    }
    
    .back-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .spacer {
        width: 70px;
    }
}
