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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: rgb(235, 194, 159);
    min-height: 100vh;
    text-align: center;
    color: #2d3436;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px, 70px 70px;
    pointer-events: none;
    animation: floatingDots 20s ease-in-out infinite;
}

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

h1 {
    background: linear-gradient(135deg, #7e9fb2, #94a6b3, #8da9b6);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    color: rgb(198, 79, 79);
    height: 5rem;
    line-height: 5rem;
    font-size: 1.8rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 0 0 30px 30px;
    position: relative;
}

h1::after {
    
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.1rem;
    animation: bounce 3s ease-in-out infinite;
    opacity: 0.8;
}

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

.choices {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    margin: 3rem auto;
    max-width: 90%;
    flex-wrap: wrap;
    position: relative;
    padding: 0 1rem;
}

.choices::before {
    content: 'Choose your move';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #505a5b;
    font-weight: 500;
    background: rgba(222, 118, 118, 0.7);
    padding: 0.4rem 1rem;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.choice {
    height: 160px;
    width: 160px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 2px 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.9);
    /* Touch optimization */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.choice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.choice:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 
     0 0 0 3px #62b2e0;
   
}

.choice:hover::before {
    transform: translateX(100%);
}

.choice:active {
    transform: translateY(-5px) scale(1.01);
    animation: wiggle 0.4s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: translateY(-8px) scale(1.02) rotate(0deg); }
    25% { transform: translateY(-8px) scale(1.02) rotate(-3deg); }
    75% { transform: translateY(-8px) scale(1.02) rotate(3deg); }
}

img {
    height: 110px;
    width: 110px;
    object-fit: contain;
    border-radius: 50%;
    padding: 15px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.choice:hover img {
    transform: rotate(5deg) scale(1.05);
}

.score-board {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin: 3rem auto;
    max-width: min(600px, 90%);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(200, 200, 200, 0.3);
    position: relative;
}

.score-board::before {
    content: 'Score';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #dddfe0;
    color: rgb(230, 71, 71);
    padding: 0.3rem 1.2rem;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 1.5rem;
    
    border-radius: 15px;
    min-width: 120px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}



.score:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.score p:first-child {
    font-size: 2.5rem;
    font-weight: 600;
    color: #2d3436;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    margin: 0;
}

#user-score, #comp-score {
    font-size: 1rem;
    font-weight: 500;
    color: #505a5b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

#user-score::before {
    content: ' ';
}

#comp-score::before {
    content: ' ';
}

.msg-container {
    margin: 3rem auto;
    max-width: min(600px, 90%);
    padding: 0 1rem;
}

#msg {
    background: rgb(237, 115, 136);
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    animation: breathe 4s ease-in-out infinite;
    position: relative;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
}

#msg::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: rgb(237, 115, 136);
    background-size: 300% 300%;
    border-radius: 25px;
    z-index: -1;
    opacity: 0.6;
    animation: gradientBorder 6s ease infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-10px) scale(1.05); }
    80% { transform: translateY(-5px) scale(1.02); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

#msg:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.game-controls {
    margin: 3rem auto;
    text-align: center;
    max-width: min(600px, 90%);
    padding: 0 1rem;
}

.reset-button {
    background: rgb(237, 115, 136);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(126, 159, 178, 0.3);
    margin-bottom: 1.5rem;
    /* Touch optimization */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    min-height: 44px; /* iOS minimum touch target */
}

.reset-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(126, 159, 178, 0.4);
    background: linear-gradient(135deg, #718da0, #839aa8);
}

.reset-button:active {
    transform: translateY(0px);
    animation: buttonPop 0.3s ease;
}

@keyframes buttonPop {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.fun-facts {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    padding: 1rem;
    margin: 0.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.fun-facts p {
    margin: 0;
    font-size: 0.85rem;
    color: #505a5b;
    font-style: italic;
}

.player-score {
    animation: playerGlow 3s ease-in-out infinite alternate;
}

.computer-score {
    animation: computerGlow 3s ease-in-out infinite alternate;
}

@keyframes playerGlow {
    0% { box-shadow: 0 5px 15px rgba(126, 159, 178, 0.2); }
    100% { box-shadow: 0 5px 15px rgba(126, 159, 178, 0.4); }
}

@keyframes computerGlow {
    0% { box-shadow: 0 5px 15px rgba(147, 158, 159, 0.2); }
    100% { box-shadow: 0 5px 15px rgba(147, 158, 159, 0.4); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .choices {
        gap: 2rem;
        margin: 2.5rem auto;
    }
    
    .choice {
        height: 150px;
        width: 150px;
    }
    
    img {
        height: 100px;
        width: 100px;
        padding: 12px;
    }
    
    .score-board {
        max-width: 500px;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
        height: 4rem;
        line-height: 4rem;
        margin-bottom: 1rem;
        letter-spacing: 1px;
    }
    
    .choices {
        gap: 1.8rem;
        margin: 2rem auto;
        max-width: 600px;
    }
    
    .choices::before {
        font-size: 0.8rem;
        top: -35px;
        padding: 0.3rem 0.8rem;
    }
    
    .choice {
        height: 140px;
        width: 140px;
    }
    
    img {
        height: 90px;
        width: 90px;
        padding: 10px;
    }
    
    .score-board {
        gap: 2rem;
        padding: 1.5rem;
        margin: 2rem 1rem;
        max-width: 450px;
    }
    
    .score {
        padding: 1.2rem;
        min-width: 100px;
    }
    
    .score p:first-child {
        font-size: 2.2rem;
    }
    
    #user-score, #comp-score {
        font-size: 0.9rem;
    }
    
    #msg {
        font-size: 1.1rem;
        padding: 0.9rem 1.8rem;
        margin: 0 1rem;
        max-width: 95%;
    }
    
    .reset-button {
        font-size: 0.85rem;
        padding: 0.7rem 1.3rem;
    }
    
    .fun-facts {
        margin: 0.5rem;
        padding: 0.8rem;
    }
    
    .fun-facts p {
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    body {
        padding: 0.5rem;
    }
    
    h1 {
        font-size: 1.4rem;
        height: 3.5rem;
        line-height: 3.5rem;
        margin-bottom: 1rem;
    }
    
    .choices {
        gap: 1.3rem;
        margin: 1.5rem auto;
        padding: 0 0.5rem;
    }
    
    .choices::before {
        font-size: 0.8rem;
        top: -30px;
    }
    
    .choice {
        height: 130px;
        width: 130px;
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid rgba(98, 178, 224, 0.2);
    }
    
    .choice:hover, .choice:active {
        border-color: #62b2e0;
        background: rgba(255, 255, 255, 1);
    }
    
    img {
        height: 85px;
        width: 85px;
        padding: 10px;
    }
    
    .score-board {
        gap: 1.3rem;
        padding: 1.2rem;
        margin: 1.5rem auto;
        max-width: 400px;
    }
    
    .score {
        padding: 1rem;
        min-width: 100px;
        gap: 0.5rem;
        background: rgba(255, 255, 255, 0.95);
    }
    
    .score p:first-child {
        font-size: 2.1rem;
    }
    
    #user-score, #comp-score {
        font-size: 0.85rem;
    }
    
    #msg {
        font-size: 1rem;
        padding: 0.9rem 1.5rem;
        min-height: 50px;
        max-width: 95%;
        line-height: 1.3;
    }
    
    .reset-button {
        font-size: 0.85rem;
        padding: 0.8rem 1.5rem;
        min-height: 44px;
    }
    
    .fun-facts {
        margin: 0.5rem;
        padding: 0.9rem;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    
    h1 {
        font-size: 1.2rem;
        height: 3rem;
        line-height: 3rem;
        border-radius: 0 0 15px 15px;
        margin-bottom: 1rem;
        letter-spacing: 1px;
    }
    
    .choices {
        flex-direction: row;
        gap: 0.8rem;
        margin: 1.5rem auto;
        padding: 0 0.5rem;
        justify-content: space-around;
        max-width: 100%;
    }
    
    .choices::before {
        position: absolute;
        top: -35px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
        margin-bottom: 0;
    }
    
    .choice {
        height: 100px;
        width: 100px;
        border: 3px solid rgba(98, 178, 224, 0.3);
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .choice:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
        border-color: #62b2e0;
    }
    
    .choice:active {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    img {
        height: 60px;
        width: 60px;
        padding: 6px;
    }
    
    .score-board {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        margin: 1.5rem auto;
        max-width: 280px;
        border-radius: 15px;
    }
    
    .score-board::before {
        font-size: 0.7rem;
        top: -12px;
        padding: 0.2rem 1rem;
    }
    
    .score {
        padding: 1rem;
        min-width: auto;
        width: 100%;
        max-width: 200px;
        gap: 0.5rem;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    }
    
    .score p:first-child {
        font-size: 2rem;
    }
    
    #user-score, #comp-score {
        font-size: 0.8rem;
        font-weight: 600;
    }
    
    .msg-container {
        margin: 2rem auto;
        padding: 0 0.5rem;
    }
    
    #msg {
        font-size: 0.95rem;
        padding: 0.8rem 1.5rem;
        border-radius: 12px;
        margin: 0;
        max-width: 100%;
        min-height: 45px;
        line-height: 1.3;
    }
    
    .game-controls {
        margin: 1.5rem auto 1rem;
        padding: 0 0.5rem;
    }
    
    .reset-button {
        font-size: 0.8rem;
        padding: 0.7rem 1.5rem;
        margin-bottom: 1rem;
        border-radius: 12px;
        min-width: 120px;
    }
    
    .fun-facts {
        margin: 0.5rem auto;
        padding: 0.8rem;
        border-radius: 12px;
        max-width: 280px;
    }
    
    .fun-facts p {
        font-size: 0.75rem;
        line-height: 1.4;
    }
}

@media (max-width: 360px) {
    body {
        padding: 0.3rem;
    }
    
    h1 {
        font-size: 1rem;
        height: 2.5rem;
        line-height: 2.5rem;
        margin-bottom: 0.8rem;
    }
    
    .choices {
        gap: 0.5rem;
        margin: 1rem auto;
        padding: 0 0.3rem;
    }
    
    .choice {
        height: 85px;
        width: 85px;
    }
    
    img {
        height: 50px;
        width: 50px;
        padding: 5px;
    }
    
    .score-board {
        margin: 1rem auto;
        padding: 0.8rem;
        max-width: 250px;
    }
    
    .score {
        padding: 0.8rem;
        max-width: 180px;
    }
    
    .score p:first-child {
        font-size: 1.8rem;
    }
    
    #user-score, #comp-score {
        font-size: 0.75rem;
    }
    
    #msg {
        font-size: 0.85rem;
        padding: 0.7rem 1.2rem;
        min-height: 40px;
    }
    
    .reset-button {
        font-size: 0.75rem;
        padding: 0.6rem 1.2rem;
        min-width: 100px;
    }
    
    .fun-facts {
        padding: 0.6rem;
        max-width: 250px;
    }
    
    .fun-facts p {
        font-size: 0.7rem;
    }
}

/* Ultra small screens */
@media (max-width: 320px) {
    h1 {
        font-size: 0.9rem;
        height: 2.2rem;
        line-height: 2.2rem;
    }
    
    .choices {
        gap: 0.3rem;
        padding: 0 0.2rem;
    }
    
    .choice {
        height: 75px;
        width: 75px;
    }
    
    img {
        height: 45px;
        width: 45px;
        padding: 4px;
    }
    
    .score-board {
        max-width: 220px;
        padding: 0.6rem;
    }
    
    .score {
        padding: 0.6rem;
        max-width: 160px;
    }
    
    .score p:first-child {
        font-size: 1.6rem;
    }
    
    #msg {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
    
    .reset-button {
        font-size: 0.7rem;
        padding: 0.5rem 1rem;
    }
}

/* Mobile landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
    h1 {
        height: 2.5rem;
        line-height: 2.5rem;
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .choices {
        flex-direction: row;
        gap: 1.5rem;
        margin: 1rem auto;
        max-width: 100%;
    }
    
    .choices::before {
        top: -25px;
        font-size: 0.7rem;
    }
    
    .choice {
        height: 100px;
        width: 100px;
    }
    
    img {
        height: 65px;
        width: 65px;
        padding: 8px;
    }
    
    .score-board {
        flex-direction: row;
        gap: 2rem;
        margin: 1rem auto;
        padding: 1rem;
        max-width: 400px;
    }
    
    .score {
        padding: 0.8rem;
        min-width: 80px;
    }
    
    .score p:first-child {
        font-size: 1.8rem;
    }
    
    #msg {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
        margin: 0.5rem auto;
    }
    
    .game-controls {
        margin: 1rem auto;
    }
    
    .reset-button {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
    }
    
    .fun-facts {
        margin: 0.3rem auto;
        padding: 0.6rem;
        max-width: 500px;
    }
    
    .fun-facts p {
        font-size: 0.7rem;
    }
}

