@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Roboto', sans-serif;
    background: #8CC461;
    min-height: 100vh;
}

.container {
    width: 1280px;
    height: 100vh;
    margin: 0 auto;
    position: relative;
}

.hidden {
    display: none !important;
}

/* ==================== GAME SCREEN ==================== */

/* Rectangle 1 - Header Border */
.header {
    position: absolute;
    width: 800px;
    height: 158px;
    left: 180px;
    top: 62px;
    border: 2px solid #FFFFFF;
    border-radius: 13px;
}

/* ROCK PAPER SCISSORS */
.title {
    position: absolute;
    left: 208px;
    top: 74px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 600;
    font-size: 40px;
    line-height: 47px;
    letter-spacing: 0.1em;
    color: #FFFFFF;
}

/* Rectangle 4 - Computer Score Box */
.computer-box {
    position: absolute;
    width: 139px;
    height: 128px;
    left: 675px;
    top: 77px;
    background: #FFFFFF;
    border-radius: 9px;
}

/* COMPUTER Label */
.computer-label-top {
    position: absolute;
    width: 103px;
    height: 20px;
    left: 693px;
    top: 84px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 600;
    font-size: 17px;
    line-height: 20px;
    letter-spacing: 0.1em;
    color: #656565;
}

/* SCORE Label */
.computer-label-bottom {
    position: absolute;
    width: 61px;
    height: 16px;
    left: 710px;
    top: 106px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-size: 17px;
    line-height: 20px;
    letter-spacing: 0.1em;
    color: #656565;
}

/* Computer Score */
.computer-score {
    position: absolute;
    width: 80px;
    height: 60px;
    left: 700px;
    top: 128px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-size: 68px;
    line-height: 80px;
    text-align: center;
    color: #252525;
}

/* Rectangle 3 - Your Score Box */
.your-box {
    position: absolute;
    width: 139px;
    height: 128px;
    left: 830px;
    top: 77px;
    background: #FFFFFF;
    border: 3px solid #0074B6;
    border-radius: 9px;
}

/* YOUR Label */
.your-label-top {
    position: absolute;
    width: 103px;
    height: 20px;
    left: 875px;
    top: 84px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 600;
    font-size: 17px;
    line-height: 20px;
    letter-spacing: 0.1em;
    color: #656565;
}

/* SCORE Label */
.your-label-bottom {
    position: absolute;
    width: 61px;
    height: 16px;
    left: 870px;
    top: 106px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-size: 17px;
    line-height: 20px;
    letter-spacing: 0.1em;
    color: #656565;
}

/* Your Score */
.your-score {
    position: absolute;
    width: 80px;
    height: 60px;
    left: 860px;
    top: 128px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-size: 68px;
    line-height: 80px;
    text-align: center;
    color: #252525;
}

/* ==================== TRIANGLE CHOICES ==================== */

.choices {
    position: relative;
    width: 100%;
    height: 700px;
}

/* Line 1 - Horizontal (top line between rock and scissors) */
.choices::before {
    content: '';
    position: absolute;
    width: 240px;
    height: 0px;
    left: 400px;
    top: 355px;
    border: 10px solid rgba(0, 0, 0);
    opacity: 64%;
    z-index: 0;
}

/* Line 3 - Left Diagonal (from rock to paper) */
.choices::after {
    content: '';
    position: absolute;
    width: 240px;
    height: 0px;
    left: 402px;
    top: 362px;
    border: 10px solid rgba(0, 0, 0);
    opacity: 64%;
    transform: rotate(60deg);
    transform-origin: left center;
    z-index: 0;
}

/* Line 2 - Right Diagonal (from scissors to paper) */
.line-right-diagonal {
    position: absolute;
    width: 240px;
    height: 0px;
    left: 557px;
    top: 605px;
    border: 10px solid rgba(0, 0, 0);
    opacity: 64%;
    transform: rotate(-60deg);
    transform-origin: left center;
    z-index: 0;
}

/* Choice Buttons Base */
.choice-btn {
    position: absolute;
    width: 150px;
    height: 150px;
    background: #FFFFFF;
    border-radius: 50%;
    box-shadow: inset 3px 0px 21px 1px rgba(0, 0, 0, 0.2);
    filter: drop-shadow(-1px 1px 11px rgba(0, 0, 0, 0.35));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    z-index: 10;
}

.choice-btn:hover {
    transform: scale(1.05);
}

/* Group 2 - Rock (top-left) */
.rock-btn {
    left: 325px;
    top: 280px;
    border: 20px solid #0074B6;
}

/* Group 3 - Scissors (top-right) */
.scissors-btn {
    left: 635px;
    top: 280px;
    border: 20px solid #BD00FF;
}

/* Group 1 - Paper (bottom-center) */
.paper-btn {
    left: 480px;
    top: 515px;
    border: 20px solid #FFA943;
}

/* Icons */
.rock-btn .icon {
    width: 62px;
    height: 80px;
}

.paper-btn .icon {
    width: 72px;
    height: 72px;
}

.scissors-btn .icon {
    width: 37px;
    height: 53px;
    transform: rotate(5.27deg);
}

/* ==================== RULES BUTTON ==================== */

/* Rectangle 2 */
.rules-btn {
    position: absolute;
    width: 115px;
    height: 40px;
    left: 1205px;
    bottom: 100px;
    background: transparent;
    border: 2px solid #FFFFFF;
    border-radius: 10px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 600;
    font-size: 21px;
    line-height: 25px;
    letter-spacing: 0.1em;
    color: #FFFFFF;
    cursor: pointer;
    transition: background 0.3s;
}

.rules-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.winner-rules-btn {
    top: auto;
    bottom: 50px;
}

/* ==================== RULES POPUP ==================== */

.rules-popup {
    position: fixed;
    right: 60px;
    bottom: 160px;
    width: 325px;
    height: 278px;
    background: transparent;
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    z-index: 1000;
}

/* Frame 4 */
.rules-content {
    position: relative;
    width: 290px;
    height: 350px;
    background: #004429;
    border: 7px solid #FFFFFF;
    border-radius: 13px;
    padding: 28px;
}

/* Ellipse 6 - Close Button */
.close-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    right: -30px;
    top: -30px;
    background: #FF0000;
    border: 4px solid #FFFFFF;
    border-radius: 50%;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 10px;
    
}
.x-image img{
    width: 53px;
    height: 24px;
    padding: auto;
}

.close-btn:hover {
    transform: scale(1.1);
}

/* Game Rules */
.rules-title {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 600;
    font-size: 24px;
    line-height: 28px;
    color: #FFFFFF;
    margin-bottom: 25px;
    text-align: center;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 18px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: #FFFFFF;
}

/* Rectangle 5, 6, 7, 8 - Yellow Bullets */
.rules-list li::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    left: 0;
    top: 3px;
    background: #FFD600;
    border-radius: 2px;
}

/* ==================== RESULT SCREEN ==================== */

.result-area {
    position: absolute;
    width: 100%;
    top: 300px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.player-section,
.pc-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.picked-label {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 20px;
    letter-spacing: 0.1em;
    color: #FFFFFF;
}

.choice-display {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: inset 3px 0px 21px 1px rgba(0, 0, 0, 0.2);
    filter: drop-shadow(-1px 1px 11px rgba(0, 0, 0, 0.35));
    display: flex;
    align-items: center;
    justify-content: center;
}

.choice-display.rock-choice {
    border: 20px solid #0074B6;
}

.choice-display.scissors-choice {
    border: 20px solid #BD00FF;
}

.choice-display.paper-choice {
    border: 20px solid #FFA943;
}

.result-icon {
    max-width: 90px;
    max-height: 90px;
}

.result-message {
    text-align: center;
}

.result-message h2 {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-size: 48px;
    line-height: 56px;
    letter-spacing: 0.1em;
    color: #FFFFFF;
    margin-bottom: 15px;
}

.result-message p {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 23px;
    letter-spacing: 0.1em;
    color: #FFFFFF;
    margin-bottom: 25px;
}

.play-again-btn {
    background: #FFFFFF;
    border: 2px solid #FFFFFF;
    border-radius: 10px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 19px;
    letter-spacing: 0.1em;
    color: #656565;
    padding: 14px 40px;
    cursor: pointer;
    transition: transform 0.2s;
}

.play-again-btn:hover {
    transform: scale(1.05);
}

/* Play Again button specifically in Winner Screen */
.winner-screen .play-again-btn {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.winner-screen .play-again-btn:hover {
    transform: translateX(-50%) scale(1.05);
}

.next-btn {
    position: absolute;
    width: 115px;
    height: 40px;
    right: 100px;
    bottom: 100px;
    background: transparent;
    border: 2px solid #FFFFFF;
    border-radius: 10px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 600;
    font-size: 21px;
    line-height: 19px;
    letter-spacing: 0.1em;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.next-btn:hover {
    transform: scale(1.05);
}

.winner-glow {
    position: relative;
}

.winner-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, 
        transparent 0%,
        transparent 40%,
        rgba(40, 140, 50, 0.3) 50%,
        rgba(40, 140, 50, 0.2) 70%,
        rgba(40, 140, 50, 0.1) 85%,
        transparent 100%);
    border-radius: 50%;
    z-index: -1;
    animation: glowPulse 2s ease-in-out infinite;
}

.winner-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, 
        transparent 0%,
        transparent 50%,
        rgba(40, 140, 50, 0.15) 60%,
        rgba(40, 140, 50, 0.08) 75%,
        transparent 100%);
    border-radius: 50%;
    z-index: -2;
    animation: glowPulse 2s ease-in-out infinite 0.5s;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.95);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.8;
    }
}

/* ==================== WINNER SCREEN ==================== */

.winner-screen {
    position: relative;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.star{
    position: absolute;
    top: 100px;
    left: 375px;
    width: 297px;
    height: 504px;
}


.trophy {
    position: absolute;
    top: 200px;
    height: 200px;
    width: 200px;
}


.winner-title {
    position: absolute;
    bottom: 240px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-size: 80px;
    line-height: 94px;
    letter-spacing: 0.1em;
    color: #FFFFFF;
    margin-bottom: 15px;
    z-index: 10;
}

.winner-subtitle {
    position: relative;
    top: 170px;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 600;
    font-size: 28px;
    line-height: 33px;
    letter-spacing: 0.1em;
    color: #FFFFFF;
    margin-bottom: 40px;
    z-index: 10;
}

/* ==================== MOBILE RESPONSIVE ==================== */

@media (max-width: 768px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 20px;
    }

    /* Header */
    .header {
        width: 100%;
        height: 100px;
        left: 0;
        top: 20px;
        border-radius: 8px;
    }

    .title {
        left: 20px;
        top: 30px;
        font-size: 20px;
        line-height: 24px;
    }

    /* Score Boxes */
    .computer-box,
    .your-box {
        width: 80px;
        height: 80px;
        top: 30px;
    }

    .computer-box {
        right: 90px;
        left: auto;
    }

    .your-box {
        right: 10px;
        left: auto;
    }

    .computer-label-top,
    .your-label-top {
        font-size: 10px;
        line-height: 12px;
        width: auto;
    }

    .computer-label-top {
        right: 105px;
        left: auto;
        top: 36px;
    }

    .computer-label-bottom {
        right: 120px;
        left: auto;
        top: 50px;
        font-size: 10px;
    }

    .your-label-top {
        right: 30px;
        left: auto;
        top: 36px;
    }

    .your-label-bottom {
        right: 33px;
        left: auto;
        top: 50px;
        font-size: 10px;
    }

    .computer-score,
    .your-score {
        font-size: 36px;
        line-height: 40px;
        width: auto;
    }

    .computer-score {
        right: 120px;
        left: auto;
        top: 70px;
    }

    .your-score {
        right: 40px;
        left: auto;
        top: 70px;
    }

    /* Triangle Choices */
    .choices {
        height: 400px;
        margin-top: 80px;
    }

    .choice-btn {
        width: 100px;
        height: 100px;
        border-width: 12px;
    }

    .rock-btn {
        left: 50px;
        top: 180px;
    }

    .scissors-btn {
        right: 50px;
        left: auto;
        top: 180px;
    }

    .paper-btn {
        left: 50%;
        transform: translateX(-50%);
        top: 300px;
    }

    .rock-btn .icon {
        width: 50px;
        height: 35px;
    }

    .paper-btn .icon {
        width: 45px;
        height: 45px;
    }

    .scissors-btn .icon {
        width: 25px;
        height: 35px;
    }

    /* Triangle Lines - Hide on mobile for cleaner look */
    .choices::before {
        display: none;
    }

    .choices::after {
        display: none;
    }

    .line-right-diagonal {
        display: none;
    }

    /* Rules Button */
    .rules-btn {
        width: 90px;
        height: 35px;
        right: 20px;
        left: auto;
        top: auto;
        bottom: 20px;
        font-size: 16px;
    }

    /* Rules Popup */
    .rules-popup {
        left: 50%;
        top: 500px;
        bottom: auto;
        transform: translateX(-50%);
        padding: 0 20px;
    }

    .rules-content {
        width: 100%;
        max-width: 300px;
        padding: 20px;
    }

    .rules-title {
        font-size: 20px;
        line-height: 24px;
        margin-bottom: 15px;
    }

    .rules-list li {
        font-size: 11px;
        line-height: 14px;
        margin-bottom: 12px;
    }

    /* Result Screen */
    .result-area {
        flex-direction: column;
        top: 180px;
        gap: 30px;
    }

    .result-message {
        order: -1;
    }

    .picked-label {
        font-size: 12px;
    }

    .choice-display {
        width: 100px;
        height: 100px;
    }

    .result-icon {
        width: 50px;
        height: 50px;
    }

    #resultText {
        font-size: 32px;
        line-height: 38px;
    }

    #resultSubtext {
        font-size: 14px;
    }

    .play-again-btn {
        font-size: 14px;
        padding: 10px 30px;
    }

    .next-btn {
        right: 20px;
        bottom: 30px;
        font-size: 14px;
        padding: 10px 30px;
    }

    .winner-glow::before {
        width: 250px;
        height: 250px;
    }

    .winner-glow::after {
        width: 320px;
        height: 320px;
    }

    /* Winner Screen */
    .trophy {
        font-size: 120px;
        margin-bottom: 20px;
    }

    .winner-title {
        font-size: 48px;
        line-height: 56px;
        bottom: 160px;
    }

    .winner-subtitle {
        font-size: 18px;
        line-height: 22px;
        top: 100px;
    }

    .winner-screen .play-again-btn {
        bottom: 30px;
        font-size: 14px;
        padding: 10px 30px;
    }

    .star {
        font-size: 30px;
    }

    .star2,
    .star4,
    .star6 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .header {
        height: 80px;
    }

    .title {
        font-size: 16px;
        line-height: 20px;
        top: 25px;
    }

    .computer-box,
    .your-box {
        width: 60px;
        height: 60px;
        top: 25px;
    }

    .computer-box {
        right: 70px;
    }

    .your-box {
        right: 10px;
    }

    .computer-label-top,
    .your-label-top {
        font-size: 8px;
        top: 28px;
    }

    .computer-label-top {
        right: 78px;
    }

    .your-label-top {
        right: 20px;
    }

    .computer-label-bottom,
    .your-label-bottom {
        font-size: 8px;
        top: 38px;
    }

    .computer-label-bottom {
        right: 85px;
    }

    .your-label-bottom {
        right: 25px;
    }

    .computer-score,
    .your-score {
        font-size: 28px;
        top: 52px;
    }

    .computer-score {
        right: 85px;
    }

    .your-score {
        right: 28px;
    }

    .choice-btn {
        width: 80px;
        height: 80px;
        border-width: 10px;
    }

    .rock-btn {
        left: 30px;
        top: 160px;
    }

    .scissors-btn {
        right: 30px;
        top: 160px;
    }

    .paper-btn {
        top: 270px;
    }

    .choices::before {
        width: 160px;
        left: 75px;
        top: 205px;
    }

    .choices::after {
        width: 140px;
        left: 72px;
        top: 210px;
    }

    .line-right-diagonal {
        width: 140px;
        left: 155px;
        top: 205px;
    }

    .rock-btn .icon {
        width: 40px;
        height: 28px;
    }

    .paper-btn .icon {
        width: 35px;
        height: 35px;
    }

    .scissors-btn .icon {
        width: 20px;
        height: 28px;
    }

    .winner-title {
        font-size: 36px;
        line-height: 42px;
    }

    .winner-subtitle {
        font-size: 16px;
    }

    .trophy {
        font-size: 100px;
    }
}

