/*=============== GAME STYLES ===============*/
:root {
    --game-bg: hsl(0, 0%, 15%);
    --game-primary: hsl(14, 98%, 50%);
    --game-primary-light: hsl(14, 98%, 60%);
    --game-secondary: hsl(0, 0%, 30%);
    --game-text: hsl(0, 0%, 90%);
    --game-text-light: hsl(0, 0%, 70%);
    --game-success: hsl(120, 60%, 50%);
    --game-danger: hsl(0, 80%, 60%);
    --game-warning: hsl(45, 100%, 50%);
    --game-border: hsl(0, 0%, 25%);
    --game-shadow: rgba(0, 0, 0, 0.3);
    --game-font: 'Bai Jamjuree', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--game-font);
    background: linear-gradient(135deg, hsl(0, 0%, 10%) 0%, hsl(0, 0%, 20%) 100%);
    color: var(--game-text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    width: 100%;
    max-width: 1200px;
    background: var(--game-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px var(--game-shadow);
    border: 2px solid var(--game-border);
    position: relative;
}

.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--game-primary), 
        var(--game-warning),
        var(--game-primary));
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Header */
.game-header {
    padding: 30px 40px;
    background: linear-gradient(135deg, 
        hsl(0, 0%, 12%) 0%, 
        hsl(0, 0%, 18%) 100%);
    border-bottom: 2px solid var(--game-border);
}

.game-title {
    text-align: center;
}

.game-title h1 {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.game-title-main {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, 
        var(--game-primary) 0%, 
        var(--game-warning) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px var(--game-shadow);
    position: relative;
    padding: 0 15px;
}

.game-title-main:nth-child(2) {
    animation-delay: 0.2s;
}

.game-title-main:nth-child(3) {
    animation-delay: 0.4s;
}

.game-subtitle {
    font-size: 1.2rem;
    color: var(--game-text-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Score Board */
.score-board {
    padding: 40px;
    background: linear-gradient(135deg, 
        hsl(0, 0%, 13%) 0%, 
        hsl(0, 0%, 17%) 100%);
    margin: 20px;
    border-radius: 20px;
    border: 2px solid var(--game-border);
    box-shadow: 0 10px 30px var(--game-shadow);
}

.score-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--game-primary);
    margin-bottom: 20px;
    text-align: center;
}

.score-info i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.score-message {
    font-size: 1.2rem;
    color: var(--game-text-light);
    text-align: center;
    margin-bottom: 40px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--game-border);
}

.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.player-score,
.computer-score {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px;
    background: linear-gradient(135deg, 
        hsl(0, 0%, 16%) 0%, 
        hsl(0, 0%, 20%) 100%);
    border-radius: 18px;
    border: 2px solid var(--game-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.player-score.winner,
.computer-score.winner {
    border-color: var(--game-primary);
    box-shadow: 0 0 30px rgba(255, 98, 0, 0.3);
    transform: scale(1.02);
}

.player-score::before,
.computer-score::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--game-primary), 
        transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.player-score.winner::before,
.computer-score.winner::before {
    opacity: 1;
}

.score-icon {
    font-size: 2.5rem;
    color: var(--game-primary);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 98, 0, 0.1);
    border-radius: 50%;
    border: 2px solid var(--game-primary);
}

.score-details {
    text-align: center;
    flex-grow: 1;
    padding: 0 30px;
}

.score-label {
    font-size: 1.1rem;
    color: var(--game-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.score-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--game-text);
    text-shadow: 0 2px 4px var(--game-shadow);
}

.choice-display {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        hsl(0, 0%, 18%) 0%, 
        hsl(0, 0%, 22%) 100%);
    border-radius: 50%;
    border: 3px solid var(--game-border);
    font-size: 3.5rem;
    color: var(--game-primary);
    transition: all 0.3s ease;
}

.choice-display.winner {
    background: linear-gradient(135deg, 
        var(--game-primary) 0%, 
        var(--game-warning) 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 98, 0, 0.5);
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1.1); }
    50% { transform: scale(1.2); }
}

.vs-separator {
    padding: 20px;
    background: var(--game-secondary);
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--game-warning);
    min-width: 100px;
    text-align: center;
    border: 2px solid var(--game-border);
    position: relative;
}

.vs-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -30px;
    right: -30px;
    height: 2px;
    background: var(--game-border);
    transform: translateY(-50%);
    z-index: -1;
}

/* Game Controls */
.game-controls {
    padding: 40px;
    margin: 20px;
    background: linear-gradient(135deg, 
        hsl(0, 0%, 13%) 0%, 
        hsl(0, 0%, 17%) 100%);
    border-radius: 20px;
    border: 2px solid var(--game-border);
}

.controls-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--game-text-light);
    margin-bottom: 40px;
    font-weight: 600;
    letter-spacing: 1px;
}

.move-buttons {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.move-btn {
    width: 180px;
    height: 180px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, 
        hsl(0, 0%, 18%) 0%, 
        hsl(0, 0%, 22%) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
}

.move-btn:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--game-shadow);
}

.move-btn:active {
    transform: translateY(-5px);
}

.move-btn.selected {
    border-color: var(--game-primary);
    box-shadow: 0 0 40px rgba(255, 98, 0, 0.4);
}

.move-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.move-btn:hover .move-icon {
    transform: scale(1.2);
}

.move-label {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.move-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.1), 
        transparent 70%);
    top: -100%;
    left: -100%;
    transition: all 0.6s ease;
}

.move-btn:hover .move-effect {
    top: 100%;
    left: 100%;
}

.rock-btn .move-icon { color: hsl(0, 70%, 60%); }
.paper-btn .move-icon { color: hsl(200, 70%, 60%); }
.scissors-btn .move-icon { color: hsl(120, 70%, 60%); }

/* Game Stats */
.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 30px;
    margin: 20px;
    background: linear-gradient(135deg, 
        hsl(0, 0%, 13%) 0%, 
        hsl(0, 0%, 17%) 100%);
    border-radius: 20px;
    border: 2px solid var(--game-border);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, 
        hsl(0, 0%, 16%) 0%, 
        hsl(0, 0%, 20%) 100%);
    border-radius: 15px;
    border: 2px solid var(--game-border);
    min-width: 200px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--game-primary);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--game-primary);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 98, 0, 0.1);
    border-radius: 50%;
    border: 2px solid var(--game-primary);
}

.stat-info {
    flex-grow: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--game-text);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    color: var(--game-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
.game-footer {
    padding: 30px 40px;
    background: linear-gradient(135deg, 
        hsl(0, 0%, 12%) 0%, 
        hsl(0, 0%, 18%) 100%);
    border-top: 2px solid var(--game-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--game-text-light);
}

.copyright i {
    color: var(--game-primary);
}

.dev-name {
    color: var(--game-primary);
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--game-text-light);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--game-border);
    transition: all 0.3s ease;
}

.footer-link:hover {
    background: var(--game-primary);
    color: white;
    border-color: var(--game-primary);
    transform: translateY(-2px);
}

.footer-link i {
    font-size: 1.2rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.endgame-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 500px;
    background: linear-gradient(135deg, 
        hsl(0, 0%, 15%) 0%, 
        hsl(0, 0%, 20%) 100%);
    border-radius: 24px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid var(--game-border);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.endgame-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.endgame-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--game-primary), 
        var(--game-warning),
        var(--game-primary));
}

.modal-content {
    padding: 50px 40px;
    text-align: center;
}

.modal-icon {
    font-size: 5rem;
    color: var(--game-primary);
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 98, 0, 0.1);
    border-radius: 50%;
    border: 3px solid var(--game-primary);
    margin: 0 auto 30px;
    animation: pulse 2s infinite;
}

.modal-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--game-text);
    margin-bottom: 15px;
    background: linear-gradient(135deg, 
        var(--game-primary) 0%, 
        var(--game-warning) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-subtitle {
    font-size: 1.5rem;
    color: var(--game-text-light);
    margin-bottom: 10px;
}

.modal-message {
    font-size: 1.2rem;
    color: var(--game-text);
    margin-bottom: 40px;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.modal-btn {
    padding: 18px 40px;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.restart-btn {
    background: linear-gradient(135deg, 
        var(--game-primary) 0%, 
        var(--game-warning) 100%);
    color: white;
}

.restart-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 98, 0, 0.4);
}

.close-btn {
    background: linear-gradient(135deg, 
        hsl(0, 0%, 25%) 0%, 
        hsl(0, 0%, 30%) 100%);
    color: var(--game-text);
    border: 2px solid var(--game-border);
}

.close-btn:hover {
    background: linear-gradient(135deg, 
        hsl(0, 0%, 30%) 0%, 
        hsl(0, 0%, 35%) 100%);
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-title h1 {
        flex-direction: column;
        gap: 10px;
    }
    
    .score-display {
        flex-direction: column;
        gap: 30px;
    }
    
    .game-stats {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .game-container {
        margin: 10px;
        border-radius: 20px;
    }
    
    .game-header {
        padding: 20px;
    }
    
    .game-title-main {
        font-size: 2rem;
    }
    
    .score-board,
    .game-controls,
    .game-stats {
        margin: 10px;
        padding: 20px;
    }
    
    .move-buttons {
        gap: 20px;
    }
    
    .move-btn {
        width: 140px;
        height: 140px;
    }
    
    .move-icon {
        font-size: 3rem;
    }
    
    .score-value {
        font-size: 2.5rem;
    }
    
    .choice-display {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
    
    .modal-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .game-title-main {
        font-size: 1.6rem;
    }
    
    .move-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .move-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-btn {
        justify-content: center;
    }
}