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

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #2c3e50;
    font-family: Arial, sans-serif;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#gameCanvas {
    display: block;
    background-color: #34495e;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#startMenu {
    z-index: 1001;
    background-color: #000;
}

#gameOverScreen {
    z-index: 1000;
}

.start-menu-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.mascot-container {
    width: min(300px, 60vw);
    height: min(300px, 60vw);
    position: relative;
    margin-bottom: min(20px, 3vh);
}

.mascot-hamster {
    width: 100%;
    height: 100%;
    background-image: url('mascot.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    animation: bounce-and-tilt 3s infinite;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.3));
}

@keyframes bounce-and-tilt {
    0%, 100% {
        transform: translateY(0) rotate(-3deg);
    }
    25% {
        transform: translateY(-15px) rotate(3deg);
    }
    50% {
        transform: translateY(0) rotate(-3deg);
    }
    75% {
        transform: translateY(-8px) rotate(3deg);
    }
}

.title {
    text-align: center;
}

.title h1 {
    color: #fff;
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(142, 68, 173, 0.8);
    font-weight: bold;
    letter-spacing: 1px;
}

.title .title-top {
    font-size: 2.5em;
    margin-bottom: 5px;
}

.title h2 {
    color: #fff;
    font-size: 2em;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(142, 68, 173, 0.8);
    font-weight: bold;
    letter-spacing: 1px;
}

.menu-content {
    background: transparent;
    padding: 0;
    border-radius: 0;
    text-align: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.menu-content h1 {
    color: #fff;
    font-size: min(3em, 8vw);
    margin-bottom: min(20px, 3vh);
    text-shadow: 0 0 10px rgba(142, 68, 173, 0.8);
    font-weight: bold;
    letter-spacing: 1px;
}

.menu-content h2 {
    font-size: min(1.5rem, 5vw);
    margin: 0 0 min(2rem, 4vh) 0;
    color: #3498db;
}

.controls {
    margin: 20px 0;
}

.controls p {
    color: #fff;
    font-size: 1.2em;
    margin: 0;
}

.controls-info {
    background-color: #2c3e50;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    text-align: left;
}

.controls-info p {
    margin: 0.5rem 0;
    color: #ecf0f1;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: min(1rem, 2vh) min(2rem, 4vw);
    font-size: min(1.2rem, 4vw);
    border-radius: min(5px, 1vh);
    cursor: pointer;
    margin-top: min(1rem, 2vh);
    transition: background-color 0.3s;
    width: min(300px, 80vw);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

button:hover {
    background-color: #2980b9;
}

.hud {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.coffee-meter {
    width: 200px;
    height: 20px;
    background-color: #2c3e50;
    border-radius: 10px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    background-color: #3498db;
    width: 100%;
    transition: width 0.3s;
}

.score {
    color: white;
    font-size: 1.2rem;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
}

.power-up-timer {
    position: absolute;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    display: none;
    margin-bottom: 5px;
}

.power-up-timer.caffeine-rush {
    background-color: rgba(139, 69, 19, 0.7); /* Brown for caffeine rush */
    top: 100px; /* Position below the score */
}

.power-up-timer.magnet {
    background-color: rgba(231, 76, 60, 0.7); /* Red for magnet */
    top: 140px; /* Position below caffeine rush timer */
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(44, 62, 80, 0.9);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
}

#restartButton {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #3498db;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 18px;
}

#restartButton:hover {
    background-color: #2980b9;
}

.leaderboard {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.3s;
    width: 300px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.leaderboard:hover {
    background-color: #2980b9;
}

.leaderboard h2 {
    color: white;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: bold;
}

.leaderboard-list {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: min(15px, 2vh);
    border-radius: min(5px, 1vh);
    margin: min(15px, 2vh) 0;
    max-height: min(400px, 60vh);
    overflow-y: auto;
}

.leaderboard-list .leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: min(12px, 2vh);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: min(1.1em, 3vw);
}

.leaderboard-list .leaderboard-entry:last-child {
    border-bottom: none;
}

.leaderboard-list .rank {
    color: #3498db;
    font-weight: bold;
    margin-right: 10px;
}

.leaderboard-list .score {
    color: #3498db;
    font-weight: bold;
}

.leaderboard-entry.highlight {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

.leaderboard-entry .rank {
    color: white;
    font-weight: bold;
    margin-right: 10px;
}

.leaderboard-entry .score {
    color: white;
    font-weight: bold;
}

#leaderboardPopup {
    z-index: 1002;
    background-color: rgba(0, 0, 0, 0.9);
}

#leaderboardPopup .menu-content {
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

#leaderboardPopup h2 {
    color: #3498db;
    font-size: 2em;
    margin-bottom: 20px;
    text-align: center;
}

#closeLeaderboardButton {
    margin-top: 20px;
    background-color: #2c3e50;
}

#closeLeaderboardButton:hover {
    background-color: #34495e;
}

.start-menu-image {
    width: 100%;
    margin: 0;
    padding: 0;
}

.full-width-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
}

#startButton {
    background-color: #00E5FF;
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 24px;
    border-radius: 30px;
    cursor: pointer;
    margin: 20px auto;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
    position: absolute;
    left: 50%;
    bottom: 100px;
    transform: translateX(-50%);
    width: auto;
}

#startButton:hover {
    background-color: #00B8D4;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.7);
}

.wallet-connect {
    position: absolute;
    left: 50%;
    bottom: 160px;
    transform: translateX(-50%);
    width: auto !important;
    z-index: 1002;
}

.wallet-address {
    position: absolute;
    left: 50%;
    bottom: 140px;
    transform: translateX(-50%);
    width: auto !important;
    z-index: 1002;
}

.stats-icon {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

#leaderboardButton {
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#leaderboardButton:hover {
    transform: scale(1.1);
}

.icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
} 