/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Changed from center to flex-start */
    padding: 20px;
    overflow-y: auto; /* Changed from hidden to auto */
}

.container {
    width: 100%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    position: relative;
    z-index: 10;
    margin: 20px 0; /* Added margin for spacing */
}

/* Header Styles */
h1 {
    color: white;
    font-size: 2.8rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Game Container */
.game-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Score Board - Moved to Top */
.score-board {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    color: white;
    order: 1;
}

.score {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    min-width: 120px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.score p:first-child {
    font-size: 3.5rem;
    font-weight: 700;
}

.vs {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.round-counter {
    color: white;
    font-size: 1.2rem;
    margin-top: 10px;
    font-weight: 600;
    order: 2;
}

/* Choices - Moved to Bottom */
.choices {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    order: 3;
    margin-top: 20px;
}

.choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 15px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
}

.choice:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.choice p {
    color: white;
    margin-top: 10px;
    font-weight: 600;
}

.icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#rock .icon {
    color: #1a2a6c;
}

#paper .icon {
    color: #b21f1f;
}

#scissors .icon {
    color: #fdbb2d;
}

/* Message Container */
.msg-container {
    margin-top: 10px;
    order: 4;
}

#msg {
    background: rgba(8, 27, 49, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

/* Buttons */
.buttons {
    order: 5;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

#reset-btn, #auto-play-btn {
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#auto-play-btn {
    background: linear-gradient(to right, #00b09b, #96c93d);
}

#reset-btn:hover, #auto-play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Fireworks */
.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.firework {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    pointer-events: none;
}

/* Winner overlay with fireworks */
.winner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.winner-overlay.active {
    opacity: 1;
    visibility: visible;
}

.winner-content {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.5s ease;
    z-index: 110;
    position: relative;
}

.winner-overlay.active .winner-content {
    transform: scale(1);
}

.winner-content h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.winner-content p {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 30px;
}

#play-again-btn {
    background: linear-gradient(to right, #00b09b, #96c93d);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#play-again-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .choices {
        gap: 15px;
    }
    
    .icon {
        width: 80px;
        height: 80px;
        font-size: 30px;
    }
    
    .score-board {
        gap: 20px;
    }
    
    .score {
        min-width: 100px;
        padding: 15px;
    }
    
    .score p:first-child {
        font-size: 2.8rem;
    }
    
    .winner-content h2 {
        font-size: 2.5rem;
    }
    
    .buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.2rem;
    }
    
    .container {
        padding: 15px;
    }
    
    .icon {
        width: 70px;
        height: 70px;
        font-size: 25px;
    }
    
    .score {
        min-width: 80px;
        padding: 10px;
    }
    
    .score p:first-child {
        font-size: 2.2rem;
    }
    
    #msg {
        font-size: 1.2rem;
        padding: 12px 20px;
    }
    
    .winner-content {
        padding: 20px;
    }
    
    .winner-content h2 {
        font-size: 2rem;
    }
    
    .winner-content p {
        font-size: 1.2rem;
    }
    
    .choices {
        gap: 10px;
    }
    
    .choice {
        padding: 10px;
    }
}