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

:root {
    --primary-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-bg: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --card-bg: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #f0f0f0;
    --accent-color: #ffd700;
    --success-color: #4CAF50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196F3;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

#main {
    min-height: 100vh;
    background: var(--primary-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    position: relative;
    animation: backgroundShift 10s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    50% { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
}

/* Header Styles */
#header {
    text-align: center;
    margin-bottom: 20px;
    animation: slideInDown 1s ease-out;
}

#header h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#header img {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: bounce 2s infinite;
}

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

/* Game Stats */
#gameStats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 10px 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-item i {
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* Game Area */
#gameArea {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin-bottom: 30px;
    gap: 20px;
}

.game-section {
    flex: 1;
    text-align: center;
}

.game-section h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.choice-display {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 20px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.choice-display i {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.choice-display span {
    color: var(--text-primary);
    font-weight: 600;
}

#vsSection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#versus {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

#countdown {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: bold;
    min-height: 30px;
}

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

/* Choice Buttons */
#image {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.image {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.image:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.image:active {
    transform: translateY(-5px) scale(0.98);
}

.image img {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: var(--transition);
}

.choice-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 8px;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#rock {
    background: linear-gradient(135deg, #8B7355, #A0522D);
}

#paper {
    background: linear-gradient(135deg, #DEB887, #F4A460);
}

#scissor {
    background: linear-gradient(135deg, #C0C0C0, #708090);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Score Section */
#points {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.point {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 20px;
    min-width: 180px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.point::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.point:hover::before {
    left: 100%;
}

.score-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.score-header img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.score-header h2 {
    color: var(--text-primary);
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.score-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.win-streak {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--warning-color);
    font-weight: 600;
}

#user {
    border-color: var(--success-color);
}

#computer {
    border-color: var(--danger-color);
}

/* Result Section */
#result {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 20px 30px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: var(--transition);
    max-width: 600px;
}

#result h1 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#result img {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Control Panel */
#controlPanel {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.control-btn {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: var(--text-primary);
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.2);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn i {
    font-size: 1.1rem;
}

/* Particle Effects */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: float 6s linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Winner Animations */
.winner-celebration {
    animation: celebrate 1s ease-in-out;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.loser-animation {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Game State Classes */
.game-over {
    filter: brightness(0.7);
    pointer-events: none;
}

.selected {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--accent-color);
    border-color: var(--accent-color) !important;
}

.computer-thinking {
    animation: computerThink 1s ease-in-out infinite;
}

@keyframes computerThink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Responsive Design */
@media (max-width: 768px) {
    #header h1 {
        font-size: 2rem;
    }
    
    #gameArea {
        flex-direction: column;
        gap: 15px;
    }
    
    .image {
        width: 120px;
        height: 120px;
    }
    
    .image img {
        width: 60px;
        height: 60px;
    }
    
    #points {
        gap: 20px;
    }
    
    .point {
        min-width: 150px;
        padding: 15px;
    }
    
    .score-number {
        font-size: 2.5rem;
    }
    
    #result h1 {
        font-size: 1.1rem;
    }
    
    .control-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #main {
        padding: 10px;
    }
    
    #header h1 {
        font-size: 1.5rem;
    }
    
    #image {
        gap: 15px;
    }
    
    .image {
        width: 100px;
        height: 100px;
    }
    
    .image img {
        width: 50px;
        height: 50px;
    }
    
    #points {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .control-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Animation Classes */
@keyframes slideInDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.zoom-in {
    animation: zoomIn 0.5s ease-out;
}
