/* Clippy's Revenge - Game Styling */

#revengeCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    background-color: #1a1a2e;
    cursor: crosshair;
    touch-action: none; /* Prevent default touch behaviors */
    z-index: 1000;
}

/* Game container should fill the viewport */
.game-container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background-color: #0f0f1e;
}

/* Loading screen (if needed) */
.revenge-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff;
    font-family: 'Segoe UI', sans-serif;
    z-index: 10;
}

.revenge-loading h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.revenge-loading p {
    font-size: 20px;
    color: #aaaaaa;
}

/* High Score Form Styling */
.revenge-score-form {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.revenge-score-form h3 {
    color: #FFD700;
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.score-display {
    font-size: 20px;
    color: #4CAF50;
    margin: 5px 0;
    font-weight: bold;
}

.level-display {
    font-size: 16px;
    color: #2196F3;
    margin: 5px 0 20px 0;
}

.input-group {
    margin: 20px 0;
}

.input-group input {
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #333;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-right: 10px;
    width: 200px;
}

.input-group input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.input-group button, .play-again-btn, .back-btn {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s ease;
    font-weight: bold;
}

#revengeSubmitScore {
    background: #4CAF50;
    color: white;
}

#revengeSubmitScore:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.play-again-btn {
    background: #2196F3;
    color: white;
}

.play-again-btn:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

.back-btn {
    background: #666;
    color: white;
}

.back-btn:hover {
    background: #555;
    transform: translateY(-2px);
}

#revengeLeaderboard {
    margin-top: 20px;
    text-align: left;
}

#revengeLeaderboard h4 {
    text-align: center;
    color: #FFD700;
    margin-bottom: 15px;
}

.leaderboard-list {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 14px;
}

.leaderboard-entry .rank {
    font-weight: bold;
    color: #FFD700;
    min-width: 30px;
}

.leaderboard-entry .name {
    flex: 1;
    text-align: left;
    margin-left: 10px;
}

.leaderboard-entry .score {
    font-weight: bold;
    color: #4CAF50;
    min-width: 80px;
    text-align: right;
}

.leaderboard-entry .level {
    color: #2196F3;
    min-width: 40px;
    text-align: right;
    font-size: 12px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    #revengeCanvas {
        cursor: none; /* Hide cursor on mobile, use touch */
    }
    
    .revenge-score-form {
        padding: 15px;
    }
    
    .revenge-score-form h3 {
        font-size: 20px;
    }
    
    .score-display {
        font-size: 18px;
    }
    
    .input-group input {
        width: 180px;
        margin-right: 5px;
        margin-bottom: 10px;
    }
    
    .input-group button, .play-again-btn, .back-btn {
        padding: 10px 20px;
        font-size: 14px;
        margin: 3px;
    }
    
    .leaderboard-entry {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .leaderboard-entry .score {
        min-width: 60px;
    }
    
    .leaderboard-entry .level {
        min-width: 30px;
    }
}

/* Disable context menu on canvas */
#revengeCanvas {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
