* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000000;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

#game {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#title {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #f7f7f7;
    margin: 0;
    flex: 1;
    text-align: center;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8), 0 0 40px rgba(0, 255, 255, 0.5);
}

#scores {
    display: flex;
    gap: 50px;
    font-size: 18px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 18px 40px;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3), inset 0 0 20px rgba(0, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.5);
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.score-label {
    font-size: 13px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.score-value {
    font-size: 32px;
    font-weight: 900;
    color: #cbcbcb;
    text-shadow: 0 0 15px rgba(210, 210, 210, 0.8);
}

#container {
    display: flex;
    width: 100%;
    gap: 25px;
    justify-content: center;
    align-items: center;
}

#user, #comp {
    flex: 1;
    max-width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 110px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(184, 184, 184, 0.4), inset 0 0 30px rgba(255, 0, 255, 0.1);
    border: 2px solid rgba(176, 176, 176, 0.5);
    transition: all 0.3s ease;
    position: relative;
}

#user::before {
    content: 'YOU';
    position: absolute;
    top: 15px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

#comp::before {
    content: 'COMPUTER';
    position: absolute;
    top: 15px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ff00ff;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.8);
}

#userChoice, #compChoice {
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

#msg {
    font-size: 26px;
    font-weight: 900;
    padding: 16px 45px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3), inset 0 0 20px rgba(0, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

#controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
}

#btns {
    display: flex;
    justify-content: center;
    gap: 18px;
    width: 100%;
    max-width: 600px;
}

.btn {
    flex: 1;
    padding: 10px 10px;
    font-size: 20px;
    font-weight: 900;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #2a2a2a;
    border: 1px solid #444;
}

.btn:hover {
    transform: translateY(-3px) scale(1.03);
    background: #3a3a3a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn:active {
    transform: translateY(-1px) scale(1.01);
}

#resetbtn {
    padding: 12px;
    font-size: 26px;
    font-weight: 700;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: #1a1a1a;
    color: #999;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#resetbtn:hover {
    background: #2a2a2a;
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    color: #fff;
    border-color: #555;
}

.win {
    background: rgba(0, 255, 136, 0.2) !important;
    border-color: #00ff88 !important;
    color: #00ff88 !important;
    animation: pulse 0.5s ease, neonPulse 1s ease-in-out infinite;
}

.lose {
    background: rgba(255, 0, 80, 0.2) !important;
    border-color: #ff0050 !important;
    color: #ff0050 !important;
    animation: pulse 0.5s ease, neonPulse 1s ease-in-out infinite;
}

.draw {
    background: rgba(255, 215, 0, 0.2) !important;
    border-color: #ffd700 !important;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.8), inset 0 0 30px rgba(255, 215, 0, 0.3) !important;
    color: #ffd700 !important;
    text-shadow: 0 0 20px rgba(255, 215, 0, 1) !important;
    animation: pulse 0.5s ease, neonPulse 1s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Mobile - This is the key fix */
@media (max-width: 768px) {
    #game {
        padding: 15px;
        gap: 12px;
    }

    #title {
        font-size: 22px;
        letter-spacing: 1px;
    }

    #resetbtn {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    #scores {
        gap: 30px;
        padding: 10px 25px;
    }

    .score-label {
        font-size: 11px;
    }

    .score-value {
        font-size: 24px;
    }

    #container {
        flex-direction: column;
        gap: 12px;
    }

    #user, #comp {
        max-width: 100%;
        width: 100%;
        height: 140px;
    }

    #user::before, #comp::before {
        font-size: 13px;
        top: 10px;
    }

    #userChoice, #compChoice {
        font-size: 70px;
    }

    #msg {
        font-size: 18px;
        padding: 12px 25px;
        letter-spacing: 1px;
    }

    #controls {
        gap: 12px;
    }

    #btns {
        flex-direction: column;
        max-width: 100%;
        gap: 10px;
    }

    .btn {
        padding: 16px 20px;
        font-size: 17px;
        width: 100%;
    }
}

/* Small phones */
@media (max-width: 480px) {
    #game {
        padding: 12px;
        gap: 10px;
    }

    #title {
        font-size: 20px;
    }

    #resetbtn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    #scores {
        gap: 25px;
        padding: 8px 20px;
    }

    .score-value {
        font-size: 22px;
    }

    #user, #comp {
        height: 130px;
    }

    #userChoice, #compChoice {
        font-size: 60px;
    }

    #msg {
        font-size: 16px;
        padding: 10px 20px;
    }

    .btn {
        padding: 15px 18px;
        font-size: 16px;
    }

    #btns {
        gap: 8px;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    #game {
        padding: 10px;
        gap: 8px;
    }

    #title {
        font-size: 18px;
    }

    #user, #comp {
        height: 120px;
    }

    #userChoice, #compChoice {
        font-size: 55px;
    }

    #msg {
        font-size: 14px;
        padding: 8px 15px;
    }

    .btn {
        padding: 14px 16px;
        font-size: 15px;
    }
}

/* Landscape mobile */
@media (max-height: 600px) and (orientation: landscape) {
    #game {
        padding: 10px;
        gap: 8px;
    }

    #container {
        flex-direction: row;
        gap: 15px;
    }

    #user, #comp {
        max-width: 48%;
        height: 140px;
    }

    #scores {
        padding: 6px 20px;
    }

    #msg {
        padding: 8px 20px;
        font-size: 14px;
    }

    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    #btns {
        flex-direction: row;
        gap: 10px;
    }
}

/* Short screens in portrait */
@media (max-height: 700px) and (orientation: portrait) {
    #user, #comp {
        height: 120px;
    }

    #userChoice, #compChoice {
        font-size: 60px;
    }
}