:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --success: #2ecc71;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--dark);
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
}

h1 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.cups {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
    height: 150px;
    perspective: 1000px;
}

.cup {
    font-size: 80px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    position: relative;
    transform-style: preserve-3d;
    transform: translateY(0);
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.2));
}

.cup:hover {
    transform: translateY(-10px);
    filter: drop-shadow(0 15px 5px rgba(0,0,0,0.1));
}

.cup::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    filter: blur(5px);
    transition: var(--transition);
}

.cup:hover::after {
    width: 70px;
    height: 15px;
    filter: blur(8px);
}

#message {
    font-size: 1.5em;
    margin: 30px 0;
    min-height: 40px;
    color: var(--accent);
    font-weight: 600;
}

#score {
    font-weight: bold;
    font-size: 1.5em;
    color: var(--primary);
    background: var(--light);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

#shuffle {
    padding: 12px 30px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    cursor: pointer;
    margin-top: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

#shuffle:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0,0,0,0.2);
}

#shuffle:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#shuffle::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.2);
    transform: rotate(30deg);
    transition: var(--transition);
}

#shuffle:hover::after {
    left: 100%;
}

#win-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 204, 113, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#win-screen h2 {
    font-size: 3em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

#play-again {
    padding: 15px 30px;
    background: white;
    color: var(--success);
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    cursor: pointer;
    margin-top: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow);
    font-weight: 600;
}

#play-again:hover {
    transform: scale(1.05);
    box-shadow: 0 7px 15px rgba(0,0,0,0.2);
}

/* Confetti effect */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    opacity: 0;
    animation: confetti 5s ease-in-out infinite;
}

@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100Vh) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .game-container {
        padding: 1rem;
        width: 90%;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .cups {
        gap: 20px;
        height: 120px;
    }
    
    .cup {
        font-size: 60px;
    }
}