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

body {
    font-family: 'Arial', sans-serif;
    background: #ffcc80;
    min-height: 100vh;
    color: #1E1E1E;
    overflow-y: auto;
}

/* Hide scrollbars */
html, body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
}

#app {
    min-height: 100vh;
}

.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Username Screen */
#username-screen {
    background: #ffcc80;
}

.container {
    background: #FFFFFF;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(30, 30, 30, 0.2);
    text-align: center;
    max-width: 400px;
    width: 100%;
    border: 3px solid #1E1E1E;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #FF3B30;
    text-shadow: 3px 3px 0px #1E1E1E;
    font-weight: bold;
}

.username-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#username-input {
    padding: 15px;
    border: 3px solid #1E1E1E;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #FFFFFF;
}

#username-input:focus {
    outline: none;
    border-color: #FF3B30;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.3);
}

#start-btn {
    padding: 15px 30px;
    background: #FF3B30;
    color: #FFFFFF;
    border: 3px solid #1E1E1E;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0px #1E1E1E;
}

#start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 5px 5px 0px #1E1E1E;
    background: #FFD60A;
    color: #1E1E1E;
}

/* Game Screen */
#game-screen {
    flex-direction: column;
    background: #ffcc80;
    padding: 0;
    min-height: 100vh;
}

.online-counter {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: #FF3B30;
    color: #FFFFFF;
    padding: 10px 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(30, 30, 30, 0.3);
    border: 2px solid #1E1E1E;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 50px;
}

.online-label {
    font-size: 14px;
}

.online-value {
    font-size: 18px;
    text-shadow: 1px 1px 0px #1E1E1E;
}

.mute-button {
    position: fixed;
    top: 20px;
    left: 120px;
    z-index: 1001;
    color: #1E1E1E;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mute-button:hover {
    transform: translateY(-2px);
    color: #FF3B30;
}

.mute-button.muted {
    color: #FF3B30;
}

.mute-button.muted .mute-icon {
    opacity: 0.7;
}

.mute-icon {
    font-size: 20px;
    transition: all 0.3s ease;
}

.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #E0E0E0;
    padding: 20px 30px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(30, 30, 30, 0.2);
    flex-wrap: wrap;
    gap: 20px;
    max-width: 90%;
    min-width: 300px;
    border: 3px solid #1E1E1E;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-link {
    position: fixed;
    top: 5px;
    right: -650px;
    text-decoration: none;
    z-index: 1001;
}

.x-icon {
    width: 50px;
    height: 50px;
    background: #1E1E1E;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 2px 2px 0px #FF3B30;
    border: 2px solid #FF3B30;
    overflow: hidden;
}

.x-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Makes the logo white */
    transition: all 0.3s ease;
}

.x-icon:hover {
    transform: translateY(-1px);
    box-shadow: 3px 3px 0px #FF3B30;
    background: #FF3B30;
}

.x-icon:hover .x-logo {
    filter: brightness(0) invert(1); /* Keeps logo white on red background */
}




.stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.label {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

.value {
    font-size: 24px;
    font-weight: bold;
    color: #FF3B30;
    text-shadow: 1px 1px 0px #1E1E1E;
}

/* Game Area */
.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    padding-top: 150px; /* More space to prevent overlap with fixed header */
}

.bonk-container {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bonk {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.bonk-image {
    width: 250px;
    height: auto;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.4));
    transition: transform 0.1s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.bonk.bonking {
    transform: translateX(120px) rotate(-30deg);
}

.bonk.bonking .bonk-image {
    transform: scale(1.3) rotate(-25deg);
}

.button-container {
    display: flex;
    justify-content: center;
}

.click-btn {
    width: 180px;
    height: auto;
    cursor: pointer;
    transition: all 0.2s ease;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.4));
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.click-btn:hover {
    transform: translateY(-3px) scale(1.05);
    filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.5));
}

.click-btn:active {
    transform: translateY(-1px) scale(0.95);
}

.click-btn.clicking {
    animation: buttonHit 0.4s ease;
}

@keyframes buttonHit {
    0% { transform: scale(1); }
    15% { transform: scale(0.8); }
    30% { transform: scale(1.2); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Leaderboard */
.leaderboard-section {
    background: #E0E0E0;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(30, 30, 30, 0.2);
    width: 100%;
    max-width: 600px;
    margin: 0 auto 120px auto; /* Increased bottom margin to clear contract address */
    border: 3px solid #1E1E1E;
}

.leaderboard-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #FF3B30;
    text-shadow: 2px 2px 0px #1E1E1E;
    font-weight: bold;
}

.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #FFFFFF;
    border-radius: 10px;
    border-left: 4px solid #FF3B30;
    border: 2px solid #1E1E1E;
    transition: transform 0.2s ease;
    margin-bottom: 5px;
}

.leaderboard-item:hover {
    transform: translateX(5px);
    background: #FFD60A;
    color: #1E1E1E;
}

.leaderboard-item.current-user {
    background: #FF3B30;
    color: #FFFFFF;
    border-left-color: #FFD60A;
    border-color: #FFD60A;
}

.rank {
    font-weight: bold;
    font-size: 18px;
    min-width: 30px;
}

.username {
    flex: 1;
    margin-left: 15px;
    font-weight: bold;
}

.clicks {
    font-weight: bold;
    color: #FF3B30;
    text-shadow: 1px 1px 0px #1E1E1E;
}

.leaderboard-item.current-user .clicks {
    color: #FFFFFF;
    text-shadow: 1px 1px 0px #1E1E1E;
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .online-counter {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        height: 45px;
    }
    
    .online-label {
        font-size: 12px;
    }
    
    .online-value {
        font-size: 16px;
    }
    
    .mute-button {
        top: 10px;
        left: 100px;
        width: 45px;
        height: 45px;
    }
    
    .mute-icon {
        font-size: 18px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        padding: 15px 20px;
        top: 15px;
        max-width: 95%;
        min-width: 280px;
    }
    
    .game-area {
        padding-top: 170px; /* More space for mobile bubble header */
    }
    
    .stats {
        justify-content: center;
    }
    
    .bonk-image {
        width: 200px;
    }
    
    .click-btn {
        width: 150px;
    }
    
    h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 30px 20px;
    }
    
    .bonk-image {
        width: 120px;
    }
    
    .click-btn {
        width: 120px;
    }
}

/* Contract Address Scrolling */
.contract-address-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    z-index: 1000;
    background: #FF3B30;
    border: 3px solid #1E1E1E;
    border-radius: 25px;
    padding: 15px 25px;
    box-shadow: 5px 5px 0px #1E1E1E;
    max-width: 90%;
    min-width: 400px;
}

.contract-address-scroll {
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
    animation: scrollContract 8s linear infinite;
    color: #FFFFFF;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
}

.contract-label {
    font-weight: bold;
    color: #FFFFFF;
}

.contract-address {
    color: #FFFFFF;
    font-weight: bold;
}

@keyframes scrollContract {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Pause animation on hover */
.contract-address-container:hover .contract-address-scroll {
    animation-play-state: paused;
} 