/* Pixel Art Game Styling for BUD Garden - Dark Herbone Style */

/* Import Pixel Font */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 16px;
}

::-webkit-scrollbar-track {
    background: #0f1419;
    border: 2px solid #00ff41;
    border-radius: 0;
}

::-webkit-scrollbar-thumb {
    background: #00ff41;
    border: 2px solid #0f1419;
    border-radius: 0;
    box-shadow: inset 0 0 5px rgba(0, 255, 65, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: #4aff6b;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

::-webkit-scrollbar-corner {
    background: #0f1419;
    border: 2px solid #00ff41;
}

/* Firefox scrollbar styling */
html {
    scrollbar-width: thick;
    scrollbar-color: #00ff41 #0f1419;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', cursive;
    background: #1a1f28;
    color: #00ff41;
    /* Improve mobile touch interaction */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow-x: hidden;
    min-height: 100vh;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    position: relative;
}

/* Mobile touch optimization for all buttons */
button {
    -webkit-tap-highlight-color: transparent;
}

/* Scanline effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9999;
}

/* CRT glow effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 9998;
}

/* Authentication Overlays */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a2a2a 0%, #0d1515 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10px;
    z-index: 10000;
    animation: fadeIn 0.5s ease-in;
}

/* Center the login and registration screens */
#loginOverlay,
#registrationOverlay,
#migrationOverlay {
    justify-content: center !important;
    padding-top: 0 !important;
}

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

.auth-logo {
    max-width: 300px;
    width: 80%;
    margin-bottom: 0;
    margin-top: 0;
    filter: drop-shadow(0 0 20px rgba(0, 255, 65, 0.5));
    animation: slideIn 0.5s ease-out;
}

.auth-logo.breathe {
    animation: slideIn 0.5s ease-out, logoBreathe 3s ease-in-out infinite;
    animation-delay: 0s, 0.5s;
}

@keyframes logoBreathe {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(0, 255, 65, 0.5));
    }
    50% { 
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(0, 255, 65, 0.7));
    }
}

.auth-container {
    background: rgba(26, 31, 40, 0.95);
    border: 3px solid #00ff41;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5), inset 0 0 30px rgba(0, 255, 65, 0.1);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

@keyframes shakeRed {
    0% { 
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% { 
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% { 
        transform: translateX(10px);
    }
    100% { 
        transform: translateX(0);
    }
}

@keyframes fadeOutBadge {
    0% { 
        opacity: 1; 
        transform: scale(1); 
    }
    70% { 
        opacity: 1; 
        transform: scale(1.1); 
    }
    100% { 
        opacity: 0; 
        transform: scale(0.8); 
    }
}

.auth-container.error {
    animation: shakeRed 0.6s ease-in-out;
    border-color: #ff0041;
    box-shadow: 0 0 30px rgba(255, 0, 65, 0.8), inset 0 0 30px rgba(255, 0, 65, 0.3);
}

.auth-title {
    font-size: 20px;
    color: #00ff41;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.auth-subtitle {
    font-size: 9px;
    color: #88cc99;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Invite Code Inputs */
.code-inputs {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.code-input {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border: 3px solid #00ff41;
    color: #00ff41;
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    text-align: center;
    text-transform: uppercase;
    outline: none;
    transition: all 0.3s;
}

.code-input:focus {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    border-color: #00ff41;
}

/* Error state for code inputs */
.code-input.error {
    border-color: #ff0041;
    background: rgba(255, 0, 65, 0.1);
    box-shadow: 0 0 15px rgba(255, 0, 65, 0.5);
}

/* Error Message */
.error-message {
    min-height: 0;
    color: #ff0041;
    font-size: 8px;
    text-align: center;
    margin: 10px 0;
    text-shadow: 0 0 10px rgba(255, 0, 65, 0.8);
    letter-spacing: 1px;
    animation: fadeIn 0.3s ease-out;
}

.error-message:empty {
    display: none;
    margin: 0;
}

/* Registration Form */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 8px;
    color: #00ff41;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-input {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 3px solid #00ff41;
    color: #00ff41;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    outline: none;
    transition: all 0.3s;
}

.auth-input:focus {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

.auth-input::placeholder {
    color: rgba(136, 204, 153, 0.5);
    font-size: 8px;
}

.auth-input.error {
    border-color: #ff0041;
    background: rgba(255, 0, 65, 0.1);
    box-shadow: 0 0 15px rgba(255, 0, 65, 0.5);
}

/* Auth Buttons */
.auth-btn {
    width: 100%;
    padding: 15px;
    background: rgba(0, 255, 65, 0.2);
    border: 3px solid #00ff41;
    color: #00ff41;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.auth-btn:hover {
    background: rgba(0, 255, 65, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

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

.proceed-btn {
    background: rgba(0, 255, 65, 0.3);
}

.secondary-btn {
    background: transparent;
    border-color: #88cc99;
    color: #88cc99;
}

.secondary-btn:hover {
    border-color: #00ff41;
    color: #00ff41;
}

.login-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 380px;
    max-width: calc(100% - 40px);
    padding: 15px;
    background: rgba(255, 136, 0, 0.1);
    border: 2px solid #ff8800;
    color: #ff8800;
    font-size: 6px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 4px 15px rgba(255, 136, 0, 0.3);
    backdrop-filter: blur(10px);
}

.login-btn:hover {
    background: rgba(255, 136, 0, 0.2);
    border-color: #ffaa00;
    color: #ffaa00;
    box-shadow: 0 6px 20px rgba(255, 136, 0, 0.5);
    transform: translateX(-50%) translateY(-2px);
}

/* Auth Social Buttons */
.auth-social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 20px;
}

.auth-social-btn {
    background: #1a1f28;
    border: 2px solid #00ff41;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-social-btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    transform: translateY(-2px);
}

.auth-social-btn img {
    width: 32px;
    height: 32px;
    display: block;
}

/* Easter Egg Joint */
.auth-easter-egg-joint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(0, 255, 65, 0.3));
    z-index: 10001;
}

.auth-easter-egg-joint:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 20px rgba(0, 255, 65, 0.6));
}

.auth-easter-egg-joint.spark-animation {
    animation: sparkJoint 0.6s ease-in-out;
}

@keyframes sparkJoint {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(10deg); filter: brightness(1.5) drop-shadow(0 0 30px rgba(255, 165, 0, 0.8)); }
    50% { transform: scale(1.3) rotate(-5deg); filter: brightness(2) drop-shadow(0 0 40px rgba(255, 100, 0, 1)); }
    75% { transform: scale(1.2) rotate(5deg); filter: brightness(1.5) drop-shadow(0 0 30px rgba(255, 165, 0, 0.8)); }
    100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 10px rgba(0, 255, 65, 0.3)); }
}

/* Responsive: Move joint up on smaller screens */
@media (max-width: 614px) {
    .auth-easter-egg-joint {
        bottom: 90px;
    }
}

/* Mobile responsive for auth screens */
@media (max-width: 480px) {
    .auth-container {
        padding: 20px;
        width: 95%;
    }
    
    .auth-title {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .auth-subtitle {
        font-size: 7px;
        margin-bottom: 25px;
    }
    
    .code-inputs {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .code-input {
        width: 45px;
        height: 45px;
        font-size: 18px;
        border-width: 2px;
    }
    
    .code-input:focus {
        border-width: 2px;
    }
    
    .code-input.error {
        border-width: 2px;
    }
    
    .code-input.error:focus {
        border-width: 2px;
    }
    
    .registration-form {
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 6px;
        margin-bottom: 8px;
    }
    
    .auth-input {
        padding: 10px;
        font-size: 8px;
        border-width: 2px;
    }
    
    .auth-input::placeholder {
        font-size: 6px;
    }
    
    .auth-btn {
        padding: 12px;
        font-size: 8px;
        border-width: 2px;
        margin-bottom: 10px;
    }
}

/* Buy Button */
.buy-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    padding: 12px 0;
    width: 130px;
    text-align: center;
    background: #00ff41;
    color: #1a1f28;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    text-decoration: none;
    border: 3px solid #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.buy-button:hover {
    background: #1a1f28;
    color: #00ff41;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.8);
    transform: translateY(-2px);
}

.buy-button:active {
    transform: translateY(0);
}

/* Buy Water Button */
.buy-water-button {
    position: fixed;
    top: 65px;
    right: 20px;
    z-index: 2000;
    padding: 12px 0;
    width: 130px;
    text-align: center;
    background: #4a9eff;
    color: #1a1f28;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    text-decoration: none;
    border: 3px solid #4a9eff;
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.5);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.buy-water-button:hover {
    background: #1a1f28;
    color: #4a9eff;
    box-shadow: 0 0 30px rgba(74, 158, 255, 0.8);
    transform: translateY(-2px);
}

.buy-water-button:active {
    transform: translateY(0);
}

/* Referral Code Display */
.referral-code-display {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2000;
    background: #0f1419;
    border: 3px solid #00ff41;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    font-family: 'Press Start 2P', cursive;
}

.referral-label {
    font-size: 8px;
    color: #00ff41;
    opacity: 0.7;
    letter-spacing: 1px;
}

.referral-code {
    font-size: 14px;
    color: #00ff41;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
}

.copy-code-btn {
    background: none;
    border: 2px solid #00ff41;
    color: #00ff41;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.3s;
    line-height: 1;
}

.copy-code-btn:hover {
    background: #00ff41;
    transform: scale(1.1);
}

.copy-code-btn:active {
    transform: scale(0.95);
}

.copy-code-btn.copied {
    background: #00ff41;
    color: #0f1419;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .referral-code-display {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        gap: 6px;
    }
    
    .referral-label {
        font-size: 6px;
    }
    
    .referral-code {
        font-size: 10px;
        letter-spacing: 1px;
    }
    
    .copy-code-btn {
        font-size: 12px;
        padding: 3px 6px;
    }
}

/* Game Container */
.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in;
}

.game-container.authenticated {
    opacity: 1;
    pointer-events: auto;
}

/* Header Styling */
.game-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px;
    background: #1a1f28;
    border: 3px solid #00ff41;
    border-radius: 0;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    margin-bottom: 10px;
    position: relative;
}

.game-header::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: transparent;
    z-index: -1;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.timer-section, .bud-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.title-section {
    text-align: center;
    padding: 10px 10px 10px 10px;
}

/* Logo styling */
.game-title-logo {
    height: 270px;
    width: auto;
    margin-top: -70px;
    margin-bottom: -55px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    filter: drop-shadow(2px 2px 4px rgba(0, 255, 65, 0.3));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.game-title-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(2px 2px 8px rgba(0, 255, 65, 0.6));
}

/* Old text title (kept for backwards compatibility) */
.game-title {
    font-size: 28px;
    text-shadow: 2px 2px 0 #00aa2e;
    margin-bottom: 10px;
    animation: none;
    letter-spacing: 2px;
    position: relative;
}

/* Subtle glitch effect on hover */
.game-title:hover {
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0% {
        text-shadow: 2px 2px 0 #00aa2e;
    }
    25% {
        text-shadow: -2px 2px 0 #00ff41, 2px -2px 0 #00aa2e;
    }
    50% {
        text-shadow: 2px -2px 0 #00ff41, -2px 2px 0 #00aa2e;
    }
    75% {
        text-shadow: -2px -2px 0 #00aa2e, 2px 2px 0 #00ff41;
    }
    100% {
        text-shadow: 2px 2px 0 #00aa2e;
    }
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.subtitle {
    font-size: 10px;
    color: #4a9d5f;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.timer-label, .bud-label {
    font-size: 9px;
    color: #4a9d5f;
    text-transform: uppercase;
}

.timer {
    font-size: 18px;
    color: #00ff41;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.bud-counter {
    font-size: 22px;
    color: #00ff41;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
    animation: none;
}

@keyframes budGlow {
    0%, 100% { text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5), 0 0 10px #00ff41; }
    50% { text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5), 0 0 20px #00ff41; }
}

.bud-value {
    font-size: 11px;
    color: #4a9d5f;
}

/* Main Game Area */
.game-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Isometric Room Container */
.room-container {
    background: #000000;
    border: 3px solid #00ff41;
    padding: 0;
    position: relative;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    overflow: hidden;
}

/* Protection Status Indicator */
.protection-status {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffd700;
    padding: 8px 12px;
    color: #ffd700;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    z-index: 50;
    pointer-events: none;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.room-view {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

/* Grid overlay system for isometric floor tiles */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
}

.grid-tile {
    position: absolute;
    width: 144px;
    height: 70px;
    cursor: pointer;
    pointer-events: all;
    transition: none; /* Remove smooth transitions for pixel-perfect effect */
    /* Mobile touch optimization */
    -webkit-tap-highlight-color: transparent;
}

.grid-tile:hover {
    z-index: 100;
}

/* Blocked tiles - cannot place items */
.grid-tile.blocked {
    pointer-events: none;
    opacity: 0.3;
}

.grid-tile.blocked:hover::before {
    display: none;
}

/* Placement mode highlights */
.grid-tile.placement-available::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 255, 65, 0.2);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    pointer-events: none;
    border: 2px solid rgba(0, 255, 65, 0.5);
    box-sizing: border-box;
}

.grid-tile.placement-blocked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 0, 0, 0.2);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    pointer-events: none;
    border: 2px solid rgba(255, 0, 0, 0.5);
    box-sizing: border-box;
}

/* Create pixel art diamond outline (Habbo Hotel style) */
.grid-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    transition: none;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    pointer-events: none;
    opacity: 0;
}

.grid-tile:hover::before {
    opacity: 1;
    /* Create outline by using background and box-shadow trick */
    background: transparent;
    box-shadow: 
        inset 0 0 0 6px #FFD700;
}

/* Touch states for mobile - add active state to show feedback on touch */
.grid-tile:active::before,
.grid-tile.touch-active::before {
    opacity: 1;
    background: transparent;
    box-shadow: 
        inset 0 0 0 6px #FFD700;
}

/* Occupied tiles (for placing objects) */
.grid-tile.occupied::before {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.3);
}

.grid-tile.occupied:hover::before {
    border-color: #ff0000;
    background: rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
}

/* Touch states for occupied tiles on mobile */
.grid-tile.occupied:active::before,
.grid-tile.occupied.touch-active::before {
    border-color: #ff0000;
    background: rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
}

/* Highlighted tiles (programmatically highlighted) */
.grid-tile.highlighted::before {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.15);
    animation: pulseHighlight 1.5s ease-in-out infinite;
}

/* Grid Aligner Mode - Show all tiles with visible borders */
.grid-tile.aligner-visible {
    opacity: 1 !important;
}

.grid-tile.aligner-visible::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 215, 0, 0.1);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    pointer-events: none;
    opacity: 1;
    box-shadow: inset 0 0 0 2px rgba(255, 215, 0, 0.8);
    animation: alignerPulse 2s ease-in-out infinite;
}

@keyframes alignerPulse {
    0%, 100% {
        box-shadow: inset 0 0 0 2px rgba(255, 215, 0, 0.6);
    }
    50% {
        box-shadow: inset 0 0 0 2px rgba(255, 215, 0, 1);
    }
}

@keyframes pulseHighlight {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.8);
    }
}

/* Placed Plants */
.placed-plant {
    position: absolute;
    width: 144px;
    height: auto;
    pointer-events: all;
    cursor: pointer;
    z-index: 200;
    transform: translateY(-50%); /* Center on tile */
    transition: transform 0.1s ease;
    /* GPU acceleration */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.placed-plant:hover {
    transform: translateY(-50%) scale3d(1.05, 1.05, 1);
    filter: brightness(1.1);
}

/* Disable hover scale for grow guard but keep brightness */
.placed-plant:has(img[src*="growguard"]):hover {
    transform: translateY(-50%) scale3d(1, 1, 1);
    filter: brightness(1.1);
}

/* Disable hover effect when in placement mode */
.placed-plant.placement-mode-active {
    pointer-events: none !important;
    cursor: default !important;
}

.placed-plant.placement-mode-active:hover {
    transform: translateY(-50%) scale3d(1, 1, 1) !important;
    filter: brightness(1) !important;
}

.placed-plant img {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Plant Preview (Ghost Image) */
.plant-preview {
    position: absolute;
    /* Width set dynamically by JavaScript to match tile size */
    height: auto;
    pointer-events: none;
    z-index: 150;
    transform: translateY(-50%); /* Center vertically on tile */
    opacity: 0.5;
    filter: brightness(1.2);
}

.plant-preview-image {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

/* Plant Info Panel */
.plant-info-panel {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 400px;
    background: #0f1419;
    border: 3px solid #00ff41;
    padding: 15px;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    animation: slideInRight 0.3s ease-out;
    pointer-events: all;
}

.plant-info-header {
    font-size: 11px;
    color: #FFD700;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    padding-right: 20px; /* Space for close button */
    letter-spacing: 1px;
}

.plant-info-description {
    font-size: 7px;
    color: #999;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.3;
    font-style: italic;
    padding: 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plant-info-reward {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1f28;
    padding: 10px 12px;
    border: 2px solid #00ff41;
}

.reward-label {
    font-size: 8px;
    color: #4a9d5f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reward-value {
    font-size: 10px;
    color: #00ff41;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
}

/* Plant Hydration System */
.plant-hydration {
    margin-top: 12px;
    background: #1a1f28;
    padding: 10px 12px;
    border: 2px solid #4CAF50;
}

.hydration-label {
    font-size: 8px;
    color: #66bb6a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.hydration-bar-container {
    width: 100%;
    height: 18px;
    background: #0a0f14;
    border: 2px solid #2a3f48;
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
}

.hydration-bar {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
    box-shadow: 0 0 10px currentColor;
    position: relative;
}

.hydration-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

.hydration-bar.no-animation::after {
    animation: none;
}

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

.hydration-status {
    font-size: 7px;
    color: #4CAF50;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hydration-status .not-generating {
    font-size: 6px;
    font-style: italic;
    opacity: 0.5;
    text-transform: none;
    letter-spacing: 0.3px;
}

/* Water Plant Button */
.water-plant-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #1a4d7a 0%, #0d2a42 100%);
    border: 2px solid #00aaff;
    color: #00aaff;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Press Start 2P', monospace;
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.3);
}

.water-plant-btn .water-cost {
    font-size: 7px;
    font-style: italic;
    opacity: 0.6;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0.5px;
}

.water-plant-btn:hover {
    background: linear-gradient(135deg, #2a5d8a 0%, #1d3a52 100%);
    border-color: #00ddff;
    color: #00ddff;
    box-shadow: 0 0 25px rgba(0, 170, 255, 0.5);
    transform: translateY(-2px);
}

.water-plant-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.3);
}

.water-plant-btn:disabled {
    background: #1a1f28;
    border-color: #444;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.info-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #ff0000;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    line-height: 1;
    transition: all 0.1s ease;
    font-family: 'Press Start 2P', monospace;
}

.info-close-btn:hover {
    color: #ff4444;
    transform: scale(1.2);
}

/* Rotate Item Button */
.rotate-item-btn {
    position: absolute;
    background: #1a1f28;
    border: 2px solid #00ff41;
    cursor: pointer;
    padding: 4px;
    width: 40px;
    height: 40px;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 1000;
    filter: drop-shadow(0 0 8px rgba(0, 255, 65, 0.4));
    box-shadow: 
        0 0 10px rgba(0, 255, 65, 0.3),
        inset 0 0 5px rgba(0, 255, 65, 0.1);
}

.rotate-item-btn img {
    width: 100%;
    height: 100%;
    display: block;
}

.rotate-item-btn:hover {
    border-color: #00ff88;
    background: #2a2f38;
    filter: drop-shadow(0 0 15px rgba(0, 255, 65, 0.8));
    box-shadow: 
        0 0 20px rgba(0, 255, 65, 0.6),
        inset 0 0 10px rgba(0, 255, 65, 0.2);
    transform: scale(1.1) rotate(90deg);
}

.rotate-item-btn:active {
    transform: scale(0.95) rotate(180deg);
    filter: drop-shadow(0 0 12px rgba(0, 255, 65, 0.6));
}

/* Move Item Button */
.move-item-btn {
    position: absolute;
    background: #1a1f28;
    border: 2px solid #FFD700;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 1000;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.3),
        inset 0 0 5px rgba(255, 215, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.move-item-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.move-item-btn:hover {
    border-color: #FFF44F;
    background: #2a2f38;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.6),
        inset 0 0 10px rgba(255, 215, 0, 0.2);
    transform: scale(1.1);
}

.move-item-btn:active {
    transform: scale(0.95);
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.6));
}

/* Radio Controls */
.radio-controls {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #2a2f38;
}

.radio-power-btn {
    width: 100%;
    padding: 12px;
    background: #0f1419;
    border: 2px solid #00ff41;
    color: #00ff41;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.radio-power-btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.radio-player {
    animation: slideIn 0.3s ease-out;
}

.track-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.track-btn {
    flex: 1;
    padding: 10px;
    background: #0f1419;
    border: 2px solid #4a9d5f;
    color: #4a9d5f;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.track-btn:hover {
    background: rgba(74, 157, 95, 0.1);
    border-color: #00ff41;
    color: #00ff41;
}

.track-btn.active {
    background: rgba(0, 255, 65, 0.2);
    border-color: #00ff41;
    color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.volume-control label {
    font-size: 9px;
    color: #4a9d5f;
    white-space: nowrap;
}

.volume-control input[type="range"] {
    flex: 1;
    height: 4px;
    background: #2a2f38;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #00ff41;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #00ff41;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.volume-control span {
    font-size: 7px;
    color: #00ff41;
    min-width: 30px;
    text-align: right;
}

.now-playing {
    padding: 8px;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid #2a2f38;
    border-radius: 4px;
    font-size: 7px;
    color: #4a9d5f;
    text-align: center;
}

.now-playing span {
    color: #00ff41;
    font-weight: bold;
}

/* Joint Controls */
.joint-controls {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #2a2f38;
}

.joint-spark-btn {
    width: 100%;
    padding: 12px;
    background: #0f1419;
    border: 2px solid #00ff41;
    color: #00ff41;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.joint-spark-btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.joint-spark-btn.lit {
    background: rgba(0, 255, 65, 0.1);
    border-color: #00ff41;
    color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.growguard-talk-btn {
    width: 100%;
    padding: 12px;
    background: #0f1419;
    border: 2px solid #00ff41;
    color: #00ff41;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.growguard-talk-btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.growguard-controls {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #2a2f38;
}

.joint-upgrade-btn {
    width: 100%;
    padding: 12px;
    background: #0f1419;
    border: 2px solid #ffaa00;
    color: #ffaa00;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.joint-upgrade-btn:hover {
    background: rgba(255, 170, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

/* Sold Out State */
.joint-upgrade-btn.sold-out {
    background: #1a1a1a;
    border: 2px solid #666666;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: auto; /* Ensure clicks work for notification */
}

.joint-upgrade-btn.sold-out:hover {
    background: #252525;
    box-shadow: none;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 107, 53, 0.8);
    }
}

/* Smoke Particle Animation */
.smoke-particle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(140, 140, 140, 0.6) 0%, rgba(100, 100, 100, 0.4) 30%, rgba(80, 80, 80, 0.2) 60%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 200;
    animation: smoke-rise 6s ease-out forwards;
    filter: blur(3px);
}

@keyframes smoke-rise {
    0% {
        transform: translate(0, 0) scale(0.5) rotate(0deg);
        opacity: 0.8;
    }
    30% {
        transform: translate(-8px, -100px) scale(1.2) rotate(-10deg);
        opacity: 0.6;
    }
    60% {
        transform: translate(12px, -200px) scale(1.8) rotate(15deg);
        opacity: 0.3;
    }
    100% {
        transform: translate(-5px, -300px) scale(2.5) rotate(-5deg);
        opacity: 0;
    }
}

/* Joint smoking animation */
.joint-smoking {
    animation: joint-glow 4s ease-in-out infinite;
}

@keyframes joint-glow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3) drop-shadow(0 0 5px rgba(255, 107, 53, 0.5));
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Plant overlay system */
.plant-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    filter: drop-shadow(0 5px 15px rgba(0, 255, 65, 0.3));
}

.plant-overlay.active {
    opacity: 1;
    animation: plantGlow 3s ease-in-out infinite;
}

@keyframes plantGlow {
    0%, 100% { 
        filter: drop-shadow(0 5px 15px rgba(0, 255, 65, 0.3));
    }
    50% { 
        filter: drop-shadow(0 5px 20px rgba(0, 255, 65, 0.6));
    }
}

/* Particle container for BUD effects */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* Animated background elements */
.room-container::before {
    content: '';
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 40px;
    animation: none;
}

@keyframes sun {
    0%, 100% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.plant-pot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.plant {
    position: relative;
    width: 200px;
    height: 300px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: -50px;
    z-index: 3;
}

.plant-sprite {
    width: 150px;
    height: 150px;
    transition: all 0.5s ease;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

/* Soil and Pot styling */
.soil {
    width: 250px;
    height: 40px;
    background: #2a3240;
    border: 3px solid #00ff41;
    position: relative;
    z-index: 2;
}

.pot {
    width: 280px;
    height: 120px;
    background: #1a1f28;
    border: 3px solid #00ff41;
    clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
    position: relative;
    z-index: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Growth Progress */
.growth-progress {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    background: #0f1419;
    padding: 15px;
    border: 3px solid #00ff41;
    z-index: 10;
}

.progress-label {
    font-size: 9px;
    color: #4a9d5f;
    margin-bottom: 8px;
    text-align: center;
    text-transform: uppercase;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #1a1f28;
    border: 2px solid #00ff41;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #00ff41;
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.progress-text {
    font-size: 9px;
    color: #00ff41;
    text-align: center;
    margin-top: 5px;
}

/* Control Panel */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.care-actions, .plant-stats, .generation-info, .bud-generation-stats {
    background: #0f1419;
    border: 3px solid #00ff41;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.care-actions h3, .plant-stats h3, .generation-info h3, .bud-generation-stats h3 {
    font-size: 12px;
    color: #00ff41;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* BUD Generation Stats */
.bud-generation-stats {
    background: #0f1419;
    border: 3px solid #00ff41;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

/* Total BUD Display in Generation Stats */
.total-bud-display {
    text-align: center;
    padding: 20px 10px;
    margin-bottom: 15px;
    background: #1a1f28;
    border: 3px solid #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.total-bud-display .bud-counter {
    font-size: 24px;
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    margin-bottom: 5px;
}

.total-bud-display .bud-value {
    font-size: 12px;
    color: #4a9d5f;
}

.gen-stat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gen-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #1a1f28;
    border: 2px solid #00ff41;
}

.gen-stat-item.harvest-ready {
    padding: 0;
    border: none;
    background: transparent;
}

.gen-stat-label {
    font-size: 9px;
    color: #4a9d5f;
    text-transform: uppercase;
}

.gen-stat-value {
    font-size: 10px;
    color: #00ff41;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
    font-weight: bold;
}

/* Inventory Section */
.inventory-section {
    background: #0f1419;
    border: 3px solid #00ff41;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
    margin-top: 20px;
    position: relative;
}

.inventory-section h3 {
    font-size: 10px;
    color: #00ff41;
    text-transform: uppercase;
    margin-bottom: 15px;
    text-align: center;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.inventory-slot {
    background: #1a1f28;
    border: 2px solid #00ff41;
    padding: 10px;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
}

.inventory-slot.empty {
    border-color: #2a3038;
    background: #0f1419;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.inventory-slot.empty:hover {
    border-color: #FFD700;
    opacity: 0.7;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.inventory-item {
    background: #1a1f28;
    border: 2px solid #00ff41;
    padding: 8px;
    cursor: pointer;
    transition: all 0.1s ease;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    position: relative;
    overflow: hidden;
}

.inventory-item:hover {
    background: #2a3038;
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.inventory-item.selected {
    background: #2a3038;
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.inventory-item-image {
    width: 80%;
    height: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    flex-shrink: 0;
}

.inventory-item-name {
    font-size: 6px;
    color: #00ff41;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.2;
}

.inventory-item-reward {
    font-size: 5px;
    color: #4a9d5f;
    text-align: center;
    margin-top: 1px;
    line-height: 1.1;
}

/* Item Count Badge */
.item-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #FFD700;
    color: #0f1419;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 2px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* Equip Panel */
.equip-panel {
    background: #1a1f28;
    border: 3px solid #FFD700;
    padding: 15px;
    text-align: center;
    margin-top: 15px;
    position: relative;
}

/* Floating equip panel when inventory has many items */
.inventory-grid:has(.inventory-item:nth-child(5)) ~ .equip-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 10px;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

/* Show close button when panel is floating */
.inventory-grid:has(.inventory-item:nth-child(5)) ~ .equip-panel .equip-close-btn {
    display: block;
}

.equip-close-btn {
    display: none; /* Hidden by default */
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #FFD700;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    transition: color 0.2s;
}

.equip-close-btn:hover {
    color: #ff0000;
}

.equip-item-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.equip-item-preview {
    width: 60px;
    height: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.equip-item-name {
    font-size: 9px;
    color: #FFD700;
    text-transform: uppercase;
}

.equip-item-description {
    font-size: 7px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    line-height: 1.3;
}

.equip-btn {
    width: 100%;
    border-color: #FFD700;
    color: #FFD700;
}

.equip-btn.equipped {
    border-color: #ff0000;
    color: #ff0000;
}

.equip-btn:hover {
    background: rgba(255, 215, 0, 0.1);
}

.equip-btn.equipped:hover {
    background: rgba(255, 0, 0, 0.1);
}

/* Shop Items (in leaderboard section) */
.shop-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

/* Scrollbar styling for shop */
.shop-items::-webkit-scrollbar {
    width: 8px;
}

.shop-items::-webkit-scrollbar-track {
    background: #0f1419;
    border: 1px solid #2a3038;
}

.shop-items::-webkit-scrollbar-thumb {
    background: #00ff41;
    border-radius: 4px;
}

.shop-items::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
}

.shop-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 10px;
    background: #0f1419;
    border: 2px solid #00ff41;
    padding: 10px;
    align-items: center;
    transition: all 0.2s ease;
}

.shop-item:hover {
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.shop-item-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.shop-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-item-name {
    font-size: 10px;
    color: #00ff41;
    font-weight: bold;
    text-transform: uppercase;
}

.shop-item-rate {
    font-size: 8px;
    color: #4a9d5f;
}

.shop-item-price {
    font-size: 9px;
    color: #FFD700;
    font-weight: bold;
}

.shop-buy-btn {
    background: #0f1419;
    border: 2px solid #FFD700;
    color: #FFD700;
    padding: 10px 20px;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.shop-buy-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #00ff41;
    color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.shop-buy-btn:active {
    transform: scale(0.95);
}

.shop-buy-btn.disabled {
    background: #1a1f28;
    border-color: #666;
    color: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.shop-buy-btn.disabled:hover {
    background: #1a1f28;
    border-color: #666;
    color: #666;
    box-shadow: none;
    transform: none;
}

.shop-item.sold-out {
    opacity: 0.6;
}

.shop-item.sold-out .shop-item-image {
    filter: grayscale(50%);
}

/* FIRESALE Effect */
.shop-item.firesale {
    position: relative;
    border-color: #ff4400 !important;
    box-shadow: 0 0 20px rgba(255, 68, 0, 0.6) !important;
    animation: firesalePulse 2s ease-in-out infinite;
}

@keyframes firesalePulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 68, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 120, 0, 0.9);
    }
}

.shop-item.firesale .shop-item-image {
    animation: fireGlow 2s ease-in-out infinite;
}

@keyframes fireGlow {
    0%, 100% {
        transform: scale(0.95);
        filter: 
            drop-shadow(0 0 10px rgba(255, 100, 0, 0.7))
            drop-shadow(0 0 20px rgba(255, 50, 0, 0.5))
            hue-rotate(0deg);
    }
    50% {
        transform: scale(1.1);
        filter: 
            drop-shadow(0 0 20px rgba(255, 150, 0, 1))
            drop-shadow(0 0 30px rgba(255, 100, 0, 0.8))
            hue-rotate(15deg);
    }
}

.firesale-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff4400 0%, #ff8800 100%);
    color: #fff;
    font-size: 7px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 8px rgba(255, 68, 0, 0.6);
    animation: badgePulse 1.5s ease-in-out infinite;
    z-index: 10;
    pointer-events: none;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1) rotate(-5deg);
    }
    50% {
        transform: scale(1.15) rotate(-5deg);
    }
}

/* Purchase Success Message */
.purchase-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0f1419;
    border: 3px solid #00ff41;
    padding: 20px 40px;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    color: #00ff41;
    z-index: 10000;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    animation: purchasePopIn 0.3s ease-out;
}

.purchase-success.fade-out {
    animation: purchasePopOut 0.5s ease-out forwards;
}

@keyframes purchasePopIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes purchasePopOut {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.action-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    padding: 15px 10px;
    border: 3px solid #00ff41;
    background: #1a1f28;
    color: #00ff41;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
}

.action-btn:hover:not(:disabled) {
    background: #00ff41;
    color: #1a1f28;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

.action-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #4a9d5f;
    color: #4a9d5f;
}

/* Harvest button cooldown state */
.action-btn.on-cooldown {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #666;
    color: #666;
    background: #0f1419;
}

.action-btn.on-cooldown:hover {
    background: #0f1419;
    color: #666;
    box-shadow: none;
}

.water-btn {
    border-color: #00ff41;
    color: #00ff41;
}

.nutrient-btn {
    border-color: #00ff41;
    color: #00ff41;
}

.light-btn {
    border-color: #00ff41;
    color: #00ff41;
}

.harvest-btn {
    border-color: #00ff41;
    color: #00ff41;
    grid-column: 1 / -1;
    width: 100%;
    font-size: 10px;
    padding: 16px;
}

.cooldown {
    display: none;
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 7px;
    color: #00ff41;
}

.action-btn.on-cooldown .cooldown {
    display: block;
}

/* Plant Stats */
.stat {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.stat-label {
    font-size: 9px;
    color: #4a9d5f;
    text-transform: uppercase;
}

.stat-bar {
    height: 16px;
    background: #1a1f28;
    border: 2px solid #00ff41;
    position: relative;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    width: 50%;
    transition: width 0.5s ease;
}

.health-fill {
    background: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.hydration-fill {
    background: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.nutrition-fill {
    background: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.light-fill {
    background: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.stat-value {
    font-size: 9px;
    color: #00ff41;
    min-width: 40px;
}

/* Generation Info */
.gen-rate, .next-harvest {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px;
    background: #1a1f28;
    border: 2px solid #00ff41;
}

.gen-label, .harvest-label {
    font-size: 8px;
    color: #4a9d5f;
    text-transform: uppercase;
}

.gen-value, .harvest-time {
    font-size: 9px;
    color: #00ff41;
}

/* Token Info Section */
.token-info {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.token-stats, .leaderboard {
    background: #0f1419;
    border: 3px solid #00ff41;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
    min-height: 350px;
}

.token-stats {
    min-height: 380px;
}

/* Tab Headers */
.tab-headers {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    background: #1a1f28;
    border: 2px solid #00ff41;
    color: #00ff41;
    padding: 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.tab-btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.tab-btn.active {
    background: #00ff41;
    color: #0f1419;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Contract Address */
.contract-address-container {
    margin-top: 15px;
}

.contract-label {
    font-size: 8px;
    color: #4a9d5f;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.contract-address-box {
    display: flex;
    gap: 5px;
    background: #1a1f28;
    border: 2px solid #00ff41;
    padding: 8px;
}

.contract-address {
    flex: 1;
    font-size: 9px;
    color: #00ff41;
    font-family: 'Press Start 2P', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-contract-btn {
    background: #00ff41;
    color: #0f1419;
    border: none;
    padding: 4px 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-contract-btn:hover {
    background: #00cc33;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Social Buttons */
.social-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.social-btn {
    background: #1a1f28;
    border: 2px solid #00ff41;
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    transform: translateY(-2px);
}

.social-btn img {
    width: 36px;
    height: 36px;
    display: block;
}

.token-stats h3, .leaderboard h3 {
    font-size: 12px;
    color: #00ff41;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.token-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.token-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: #1a1f28;
    border: 2px solid #00ff41;
}

.token-label {
    font-size: 9px;
    color: #4a9d5f;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.token-value {
    font-size: 11px;
    color: #00ff41;
    font-weight: bold;
}

/* Calculator Form */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 0;
}

/* Profile Details */
.profile-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-row {
    display: flex;
    gap: 15px;
    width: 100%;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: #1a1f28;
    border: 2px solid #00ff41;
}

.profile-half {
    flex: 1;
}

.profile-full {
    width: 100%;
}

.profile-referral-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-referral-section .profile-label {
    font-size: 9px;
    color: #4a9d5f;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-left: 5px;
}

.profile-label {
    font-size: 9px;
    color: #4a9d5f;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-value {
    font-size: 11px;
    color: #00ff41;
    font-weight: bold;
    word-break: break-all; /* For long wallet addresses */
}

/* Profile Referral Code with Copy Button */
.profile-referral-code {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #1a1f28;
    border: 3px solid #FFD700;
    margin-top: 10px;
    box-sizing: border-box;
    height: 56px;
}

.profile-referral-code .profile-value {
    font-size: 14px;
    color: #FFD700;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    letter-spacing: 1px;
}

.profile-copy-btn {
    background: #1a1f28;
    border: 2px solid #FFD700;
    color: #FFD700;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.3s ease;
    min-width: 60px;
    flex-shrink: 0;
}

.profile-copy-btn:hover {
    background: #FFD700;
    color: #1a1f28;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Profile Total Referral Rewards Box */
.profile-rewards-box {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background: #1a1f28;
    border: 3px solid #FFD700;
    margin-top: 10px;
    height: 56px;
    box-sizing: border-box;
}

.profile-rewards-box .profile-value {
    font-size: 14px;
    color: #FFD700;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    letter-spacing: 1px;
}

.profile-copy-btn.copied {
    background: #FFD700;
    color: #1a1f28;
}

/* Sign Out Button */
.profile-signout-btn {
    width: 100%;
    padding: 12px 20px;
    margin-top: 15px;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: #ffffff;
    border: 2px solid #ff0000;
    border-radius: 4px;
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.profile-signout-btn:hover {
    background: linear-gradient(135deg, #ff6666 0%, #ff0000 100%);
    border-color: #ff4444;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.profile-signout-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

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

.calc-label {
    font-size: 10px;
    color: #4a9d5f;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calc-input {
    background: #1a1f28;
    border: 2px solid #00ff41;
    color: #00ff41;
    padding: 15px;
    font-family: 'Press Start 2P', monospace;
    font-size: 11px;
    width: 100%;
    box-sizing: border-box;
}

.calc-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.calc-input::placeholder {
    color: #2a3038;
}

.calc-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #1a1f28;
    border: 3px solid #FFD700;
    margin-top: 15px;
}

.result-label {
    font-size: 10px;
    color: #FFD700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-value {
    font-size: 13px;
    color: #FFD700;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Leaderboard */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leader-entry {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 10px;
    background: #1a1f28;
    border: 2px solid #00ff41;
    align-items: center;
}

.leader-entry:first-child {
    border-color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.rank {
    font-size: 11px;
    color: #00ff41;
}

.name {
    font-size: 9px;
    color: #4a9d5f;
}

.bud-amount {
    font-size: 9px;
    color: #00ff41;
    text-align: right;
}

/* Notifications */
.notifications {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    padding: 15px 20px;
    background: #0f1419;
    border: 3px solid #00ff41;
    font-size: 9px;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    color: #00ff41;
}

.notification.success { border-color: #00ff41; color: #00ff41; }
.notification.warning { border-color: #4a9d5f; color: #4a9d5f; }
.notification.error { border-color: #00ff41; color: #00ff41; }
.notification.info { border-color: #4a9d5f; color: #4a9d5f; }

@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

/* Particle Effects */
.bud-particle {
    position: absolute;
    font-size: 20px;
    pointer-events: none;
    animation: floatUp 2s ease-out forwards;
    z-index: 100;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0.5);
        opacity: 0;
    }
}

/* Earning Animations */
.earning-glow {
    animation: earningGlow 1s ease-in-out;
}

@keyframes earningGlow {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 0px #FFD700);
    }
    50% {
        filter: brightness(1.3) drop-shadow(0 0 15px #FFD700);
    }
}

.earning-particle {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
    animation: earnSpring 1.5s ease-out forwards;
    transform-origin: center;
    filter: drop-shadow(0 0 5px rgba(0, 255, 65, 0.6));
}

@keyframes earnSpring {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    20% {
        transform: translateY(-30px) scale(1.2);
        opacity: 1;
    }
    40% {
        transform: translateY(-20px) scale(1);
    }
    60% {
        transform: translateY(-40px) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(-80px) scale(0.3);
        opacity: 0;
    }
}

/* Water Droplet Indicator */
.water-droplet {
    position: absolute;
    width: 30px;
    height: 30px;
    pointer-events: none;
    animation: waterBreathe 2.5s ease-in-out infinite;
    transform-origin: center;
    filter: drop-shadow(0 0 8px rgba(0, 170, 255, 0.7));
    /* GPU acceleration */
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@keyframes waterBreathe {
    0% {
        transform: scale3d(0.8, 0.8, 1);
        opacity: 0.6;
        filter: drop-shadow(0 0 5px rgba(0, 170, 255, 0.5));
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
        opacity: 1;
        filter: drop-shadow(0 0 12px rgba(0, 170, 255, 0.9));
    }
    100% {
        transform: scale3d(0.8, 0.8, 1);
        opacity: 0.6;
        filter: drop-shadow(0 0 5px rgba(0, 170, 255, 0.5));
    }
}

/* Radio Playing Animation */
@keyframes radioPlaying {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 8px rgba(0, 191, 255, 0.4));
    }
    50% {
        filter: brightness(1.15) drop-shadow(0 0 18px rgba(0, 191, 255, 0.8)) drop-shadow(0 0 25px rgba(0, 191, 255, 0.4));
    }
}

@keyframes radioPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 191, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(0, 191, 255, 0.8), 0 0 25px rgba(0, 191, 255, 0.4);
    }
}

/* Class to apply to radio when playing */
.radio-playing {
    animation: radioPlaying 2s ease-in-out infinite;
}

/* Responsive Design */
/* Fix equip panel layout shift for medium screens (1200-1370px) */
@media (min-width: 1201px) and (max-width: 1370px) {
    .inventory-section {
        position: relative;
    }
    
    .equip-panel {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin-top: 10px;
        margin-bottom: 0;
        z-index: 100;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    }
    
    .equip-close-btn {
        display: block !important; /* Show close button only in this range */
    }
}

@media (max-width: 1200px) {
    .game-main {
        grid-template-columns: 1fr;
    }
    
    .token-info {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    
    /* Swap order: Shop (leaderboard) above Token Stats */
    .token-info .leaderboard {
        order: 1;
    }
    
    .token-info .token-stats {
        order: 2;
    }
}

@media (max-width: 768px) {
    .game-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .game-title {
        font-size: 20px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .token-details {
        grid-template-columns: 1fr;
    }
    
    /* Grid system handles responsive alignment */
    .game-main {
        grid-template-columns: 1fr;
        /* Mobile layout: BUD stats, room, then inventory */
        display: flex;
        flex-direction: column;
    }
    
    /* Split control panel on mobile */
    .control-panel {
        padding: 0;
        display: contents; /* This breaks the control panel container on mobile */
    }
    
    .bud-generation-stats {
        /* BUD stats at top */
        order: 1;
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .room-container {
        min-height: auto;
        padding: 20px;
        overflow: visible;
        display: flex;
        justify-content: center;
        align-items: center;
        /* Room in middle */
        order: 2;
    }
    
    .inventory-section {
        /* Inventory at bottom */
        order: 3;
        padding: 15px;
        margin-top: 10px;
    }
    
    .room-view {
        /* No transform scaling - grid handles alignment per breakpoint */
        min-height: 600px;
        width: 100%;
        max-width: 100%;
    }
    
    /* Adjust inventory for mobile */
    .inventory-grid {
        grid-template-columns: repeat(4, 70px);
        gap: 8px;
        justify-content: center;
    }
    
    .inventory-slot {
        width: 70px;
        height: 70px;
        padding: 3px;
    }
    
    .inventory-item {
        padding: 3px !important;
        gap: 2px !important;
    }
    
    .inventory-item-image {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .inventory-item-name {
        font-size: 5px !important;
    }
    
    .bud-generation-stats h3,
    .inventory-section h3 {
        font-size: 12px;
    }
    
    /* Make BUD Generation title even more prominent */
    .bud-generation-stats h3 {
        font-size: 14px;
    }
    
    /* Make BUD stats more compact on mobile */
    .bud-generation-stats {
        padding: 10px !important;
    }
    
    .total-bud-display {
        margin: 10px 0 !important;
    }
    
    .bud-counter {
        font-size: 16px !important;
    }
    
    .gen-stat-list {
        gap: 5px !important;
    }
    
    /* Mobile tab improvements */
    .tab-headers {
        gap: 2px;
        margin-bottom: 10px;
    }
    
    .tab-btn {
        padding: 8px 4px;
        font-size: 5px;
        line-height: 1.2;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 32px;
    }
    
    /* Even smaller text for very narrow screens */
    @media (max-width: 360px) {
        .tab-btn {
            font-size: 4px;
            padding: 6px 2px;
        }
    }
    
    /* Mobile referral code display - smaller floating box */
    .referral-code-display {
        top: 10px;
        left: 10px;
        padding: 6px 8px;
        gap: 2px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .referral-label {
        font-size: 5px;
    }
    
    .referral-code {
        font-size: 8px;
        letter-spacing: 1px;
    }
    
    .copy-code-btn {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    /* Mobile welcome message - shorter height */
    .welcome-container {
        height: 450px;
        padding: 20px;
        max-width: 95%;
    }
    
    .welcome-title {
        font-size: 16px;
        margin: 0 0 10px 0;
    }
    
    /* Plant Hydration & Water Button - Tablet 768px */
    .plant-hydration {
        margin-top: 10px;
        padding: 8px 10px;
    }
    
    .hydration-label {
        font-size: 6px;
        margin-bottom: 5px;
    }
    
    .hydration-bar-container {
        height: 14px;
        margin-bottom: 5px;
    }
    
    .hydration-status {
        font-size: 5px;
    }
    
    .hydration-status .not-generating {
        font-size: 5px;
    }
    
    .water-plant-btn {
        padding: 8px 16px;
        font-size: 7px;
        margin-top: 10px;
    }
    
    .water-plant-btn .water-cost {
        font-size: 5px;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .room-container {
        padding: 10px;
    }
    
    .room-view {
        /* No transform scaling - grid handles alignment per breakpoint */
        min-height: 400px;
    }
    
    /* Scale logo down for mobile */
    .game-title-logo {
        height: 70px;
    }
    
    /* Show full room on mobile without cropping */
    .room-background {
        object-fit: contain;
        width: 100%;
        height: auto;
    }
    
    /* Scale logo for mobile */
    .game-title-logo {
        height: 100px;
        margin-top: -25px;
        margin-bottom: -20px;
    }
    
    /* Make Buy $BUD button smaller on mobile */
    .buy-button {
        padding: 12px 20px;
        font-size: 10px;
    }
    
    /* Mobile profile layout - stack vertically */
    .profile-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .profile-half {
        width: 100%;
    }
    .buy-button {
        top: 10px;
        right: 10px;
        padding: 6px 0;
        width: 90px;
        font-size: 7px;
        letter-spacing: 0.5px;
    }
    
    .buy-water-button {
        top: 45px;
        right: 10px;
        padding: 6px 0;
        width: 90px;
        font-size: 7px;
        letter-spacing: 0.5px;
    }
    
    /* Make item info section smaller on mobile */
    .equip-item-details {
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .equip-item-preview {
        width: 40px;
    }
    
    .equip-item-name {
        font-size: 7px;
    }
    
    .equip-btn {
        font-size: 7px;
        padding: 8px;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(4, 65px);
        gap: 6px;
        justify-content: center;
    }
    
    .inventory-slot {
        width: 65px;
        height: 65px;
        padding: 1px;
    }
    
    .inventory-item {
        padding: 1px !important;
        gap: 0px !important;
        border-width: 1px !important;
        position: relative !important;
    }
    
    .inventory-item-image {
        width: 70% !important;
        max-width: 70% !important;
        height: auto !important;
    }
    
    .inventory-item-name {
        position: absolute !important;
        bottom: 12px !important;
        left: 0 !important;
        right: 0 !important;
        font-size: 4px !important;
        line-height: 1 !important;
        padding: 1px !important;
        background: transparent !important;
        margin: 0 !important;
        text-shadow: 0 0 2px rgba(0, 0, 0, 0.8) !important;
    }
    
    .inventory-item-reward {
        position: absolute !important;
        bottom: 6px !important;
        left: 0 !important;
        right: 0 !important;
        font-size: 4px !important;
        line-height: 1 !important;
        padding: 1px !important;
        background: transparent !important;
        margin: 0 !important;
        text-shadow: 0 0 2px rgba(0, 0, 0, 0.8) !important;
    }
    
    .game-title {
        font-size: 16px;
    }
    
    .control-panel {
        padding: 10px;
    }
    
    .bud-generation-stats h3,
    .inventory-section h3 {
        font-size: 8px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Purchase Confirmation Modal */
.purchase-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

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

.purchase-modal {
    background: #1a1f28;
    border: 4px solid #00ff41;
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5), inset 0 0 20px rgba(0, 255, 65, 0.1);
    animation: slideIn 0.3s ease-out;
    position: relative;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.purchase-modal h2 {
    font-size: 16px;
    color: #00ff41;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
}

.purchase-modal-content {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.item-preview {
    flex-shrink: 0;
}

.item-preview img {
    width: 100px;
    height: 100px;
    border: 2px solid #00ff41;
    border-radius: 4px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    object-fit: contain;
    display: block;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.item-details {
    flex: 1;
}

.item-details h3 {
    font-size: 12px;
    color: #00ff41;
    margin-bottom: 10px;
}

.item-description {
    font-size: 8px;
    color: #7fff7f;
    line-height: 1.5;
    margin-bottom: 10px;
}

.item-price {
    font-size: 10px;
    color: #ffff00;
    margin-bottom: 5px;
}

.item-price span {
    color: #ffff00;
    font-size: 10px;
    display: inline;
    visibility: visible;
    opacity: 1;
}

.current-balance {
    font-size: 8px;
    color: #00bfff;
}

.current-balance span {
    color: #00bfff;
    font-size: 8px;
    display: inline;
    visibility: visible;
    opacity: 1;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.modal-buttons .button-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.modal-buttons button {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    padding: 10px 20px;
    border: 2px solid;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

/* External Payment Button */
.external-payment-btn {
    width: 100%;
    max-width: 400px;
    background: #4a2d5f !important;
    border-color: #9b59b6 !important;
    color: #ecf0f1 !important;
    font-size: 8px !important;
    padding: 10px 15px !important;
    white-space: nowrap !important;
}

.external-payment-btn:hover {
    background: #6c3483 !important;
    border-color: #bb74e0 !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(155, 89, 182, 0.5) !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .purchase-modal {
        padding: 20px;
        max-width: 400px;
        width: 90%;
    }
    
    .purchase-modal h2 {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .purchase-modal-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .item-preview {
        margin-bottom: 10px;
    }
    
    .item-preview img {
        width: 80px;
        height: 80px;
    }
    
    .item-details h3 {
        font-size: 10px;
    }
    
    .item-description {
        font-size: 8px;
    }
    
    .item-price {
        font-size: 9px;
    }
    
    .current-balance {
        font-size: 7px;
    }
    
    .modal-buttons {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .modal-buttons button {
        width: 100%;
        font-size: 8px;
        padding: 8px;
    }
    
    .external-payment-btn {
        font-size: 7px !important;
        padding: 6px !important;
    }

    /* Plant Info Panel - Mobile 480px */
    .plant-info-panel {
        width: 200px !important;
        padding: 8px !important;
        top: 10px !important;
        right: 10px !important;
        border-width: 2px !important;
    }
    
    .plant-info-header {
        font-size: 7px !important;
        margin-bottom: 5px !important;
        padding-right: 15px !important;
    }
    
    .plant-info-description {
        font-size: 6px !important;
        margin-bottom: 6px !important;
        white-space: normal !important;
    }
    
    .plant-info-reward {
        padding: 6px 8px !important;
        border-width: 1px !important;
    }
    
    .reward-label {
        font-size: 6px !important;
    }
    
    .reward-value {
        font-size: 7px !important;
    }
    
    .info-close-btn {
        font-size: 12px !important;
        width: 15px !important;
        height: 15px !important;
        top: 5px !important;
        right: 5px !important;
    }
    
    /* Radio Controls - Mobile 480px */
    .radio-controls {
        margin-top: 8px !important;
        padding-top: 8px !important;
    }
    
    .radio-power-btn {
        padding: 5px !important;
        font-size: 5px !important;
        margin-bottom: 5px !important;
    }
    
    .track-buttons {
        gap: 4px !important;
        margin-bottom: 6px !important;
    }
    
    .track-btn {
        padding: 4px !important;
        font-size: 4px !important;
    }
    
    .volume-control {
        gap: 4px !important;
        margin-bottom: 6px !important;
    }
    
    .volume-control label {
        font-size: 4px !important;
    }
    
    .volume-control input[type="range"] {
        height: 3px !important;
    }
    
    .volume-control input[type="range"]::-webkit-slider-thumb {
        width: 8px !important;
        height: 8px !important;
    }
    
    .volume-control input[type="range"]::-moz-range-thumb {
        width: 8px !important;
        height: 8px !important;
    }
    
    .volume-control span {
        font-size: 4px !important;
        min-width: 20px !important;
    }
    
    .now-playing {
        padding: 4px !important;
        font-size: 4px !important;
    }
    
    /* Plant Hydration & Water Button - Mobile 480px */
    .plant-hydration {
        margin-top: 8px !important;
        padding: 6px 8px !important;
    }
    
    .hydration-label {
        font-size: 5px !important;
        margin-bottom: 4px !important;
    }
    
    .hydration-bar-container {
        height: 12px !important;
        margin-bottom: 4px !important;
    }
    
    .hydration-status {
        font-size: 4px !important;
    }
    
    .hydration-status .not-generating {
        font-size: 4px !important;
    }
    
    .water-plant-btn {
        padding: 5px !important;
        font-size: 5px !important;
        margin-top: 8px !important;
    }
    
    .water-plant-btn .water-cost {
        font-size: 4px !important;
    }
}

/* Tablet and larger mobile (keep existing styles) */
@media (max-width: 600px) and (min-width: 401px) {
    .purchase-modal {
        padding: 15px;
    }
    
    .purchase-modal h2 {
        font-size: 12px;
    }
    
    .purchase-modal-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .item-preview img {
        width: 80px;
        height: 80px;
    }
    
    .item-details h3 {
        font-size: 10px;
    }
    
    .item-description {
        font-size: 7px;
    }
    
    .item-price {
        font-size: 9px;
    }
    
    .current-balance {
        font-size: 7px;
    }
    
    .modal-buttons button {
        font-size: 8px;
        padding: 8px 15px;
    }
}

/* Error Modal Styling */
.error-modal {
    border-color: #ff4444 !important;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.5), inset 0 0 20px rgba(255, 68, 68, 0.1) !important;
}

.error-modal .confirm-btn:hover {
    background: #ff4444 !important;
    color: #1a1f28 !important;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.6) !important;
}

.error-modal-content {
    padding: 10px 0;
}

/* Room Chat Button (above Customize button) */
.room-chat-btn {
    position: absolute;
    bottom: 75px; /* Position above the customize button */
    left: 20px;
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    padding: 12px 15px;
    border: 3px solid #fff;
    background: #fff;
    color: #000;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s;
    text-transform: uppercase;
    pointer-events: all;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.room-chat-btn:hover {
    background: #e0e0e0;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.room-chat-btn:active {
    transform: translateY(0) scale(0.95);
}

/* Global Chat Container */
.chat-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 400px;
    height: 500px;
    background: rgba(0, 20, 0, 0.98);
    border: 3px solid #00ff41;
    border-radius: 8px;
    z-index: 9999;
    display: none;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.6);
    font-family: 'Press Start 2P', cursive;
}

.chat-container.active {
    display: flex;
}

.chat-header {
    padding: 15px;
    background: rgba(0, 255, 65, 0.1);
    border-bottom: 2px solid #00ff41;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-size: 10px;
    color: #00ff41;
    flex: 1;
}

.chat-info {
    font-size: 6px;
    color: #00ff41;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.chat-status {
    color: #00ff41;
    font-size: 6px;
}

.chat-close-btn {
    background: transparent;
    border: 2px solid #ff0000;
    color: #ff0000;
    font-size: 18px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 10px;
    transition: all 0.2s ease;
    font-family: Arial, sans-serif;
}

.chat-close-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #00ff41;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.5);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #00cc33;
}

.chat-message {
    margin-bottom: 10px;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    border-left: 3px solid #666;
}

.chat-message.my-message {
    background: rgba(0, 255, 65, 0.2);
    border-left-color: #00ff41;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 6px;
}

.message-username {
    color: #aaaaaa;
    font-weight: bold;
}

.chat-message.my-message .message-username {
    color: #00ff41;
}

.message-time {
    color: #888;
}

.message-text {
    font-size: 7px;
    color: #fff;
    word-wrap: break-word;
    line-height: 1.6;
}

.chat-message.my-message .message-text {
    color: #fff;
}

.chat-input-container {
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px solid #00ff41;
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff41;
    border-radius: 4px;
    padding: 10px;
    color: #00ff41;
    font-family: 'Press Start 2P', cursive;
    font-size: 7px;
}

.chat-input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-send-btn {
    background: #1a1f28;
    border: 2px solid #00ff41;
    color: #00ff41;
    padding: 10px 16px;
    font-size: 7px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.chat-send-btn:hover:not(:disabled) {
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error-message-chat {
    background: rgba(255, 68, 68, 0.9);
    border-left: 3px solid #ff0000;
    color: #fff;
    padding: 8px;
    margin: 8px 0;
    font-size: 6px;
    border-radius: 4px;
    font-family: 'Press Start 2P', cursive;
}

/* Room Customize Button (bottom left corner) */
.room-customize-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    padding: 12px 15px;
    border: 3px solid #00ff41;
    background: #1a1f28;
    color: #00ff41;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s;
    text-transform: uppercase;
    pointer-events: all;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.room-customize-btn:hover {
    background: #00ff41;
    color: #1a1f28;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

.room-customize-btn:active {
    transform: translateY(0) scale(0.95);
}

/* Customization Modal */
.customize-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.customize-modal-content {
    background: #1a1f28;
    border: 3px solid #00ff41;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.3);
    position: relative;
}

.customize-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-family: 'Press Start 2P', cursive;
    background: #1a1f28;
    border: 2px solid #00ff41;
    color: #00ff41;
    font-size: 16px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.customize-close-btn:hover {
    background: #00ff41;
    color: #1a1f28;
    transform: scale(1.1);
}

.customize-title {
    font-family: 'Press Start 2P', cursive;
    color: #00ff41;
    font-size: 16px;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.customize-category {
    margin-bottom: 30px;
}

.customize-category h3 {
    font-family: 'Press Start 2P', cursive;
    color: #00ff41;
    font-size: 12px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.background-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.background-option {
    position: relative;
    border: 3px solid #2a2f38;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(0, 0, 0, 0.5);
}

.background-option:hover {
    border-color: #00ff41;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.background-option.active {
    border-color: #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

.background-option img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.background-option-name {
    font-family: 'Press Start 2P', cursive;
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #00ff41;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.background-option.active .background-option-name {
    background: rgba(0, 255, 65, 0.2);
    color: #00ff41;
}

.background-option.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #00ff41;
    color: #1a1f28;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

/* Custom scrollbar for modal */
.customize-modal-content::-webkit-scrollbar {
    width: 10px;
}

.customize-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

.customize-modal-content::-webkit-scrollbar-thumb {
    background: #00ff41;
}

.customize-modal-content::-webkit-scrollbar-thumb:hover {
    background: #00cc33;
}

/* Joint Upgrade Popups */
.joint-upgrade-popup,
.wallet-collection-popup,
.payment-popup,
.upgrade-success-popup,
.upgrade-error-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-family: 'Press Start 2P', monospace;
}

.upgrade-popup-content,
.wallet-popup-content,
.payment-popup-content,
.success-popup-content,
.error-popup-content {
    background: #0f1419;
    border: 3px solid #00ff41;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.upgrade-close-btn,
.wallet-close-btn,
.payment-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #ff0000;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    line-height: 1;
    transition: all 0.1s ease;
    font-family: 'Press Start 2P', monospace;
}

.upgrade-close-btn:hover,
.wallet-close-btn:hover,
.payment-close-btn:hover {
    color: #ff4444;
    transform: scale(1.2);
}

.upgrade-header h3,
.wallet-header h3,
.payment-header h3,
.success-header h3,
.error-header h3 {
    color: #00ff41;
    font-size: 14px;
    text-align: center;
    margin: 0 0 20px 0;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
}

/* Upgrade Visual */
.upgrade-explanation {
    margin-bottom: 25px;
}

.upgrade-visual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 15px;
}

.upgrade-from,
.upgrade-to {
    text-align: center;
    flex: 1;
}

.upgrade-item-img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    border: 2px solid #2a2f38;
    border-radius: 4px;
    background: #1a1f28;
    padding: 5px;
}

.upgrade-item-name {
    color: #00ff41;
    font-size: 10px;
    margin-bottom: 5px;
}

.upgrade-item-rate {
    color: #ffaa00;
    font-size: 8px;
}

.upgrade-arrow {
    color: #00ff41;
    font-size: 20px;
    font-weight: bold;
}

.upgrade-description {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid #2a2f38;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.upgrade-description p {
    color: #b0b0b0;
    font-size: 9px;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.upgrade-description p:last-child {
    margin-bottom: 0;
}

.upgrade-cost {
    text-align: center;
    margin-bottom: 20px;
}

.cost-label {
    color: #4a9d5f;
    font-size: 9px;
    margin-bottom: 5px;
}

.cost-value {
    color: #ffaa00;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 170, 0, 0.3);
}

/* Wallet Collection */
.wallet-explanation {
    margin-bottom: 20px;
}

.wallet-explanation p {
    color: #b0b0b0;
    font-size: 9px;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.wallet-input-section {
    margin-bottom: 20px;
}

.wallet-input-section label {
    display: block;
    font-size: 8px;
    color: #00ff41;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wallet-address-input {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 3px solid #00ff41;
    color: #00ff41;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
    border-radius: 0; /* Remove rounded corners for pixel art style */
}

.wallet-address-input:focus {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

.wallet-address-input::placeholder {
    color: rgba(136, 204, 153, 0.5);
    font-size: 8px;
}

.wallet-address-input.error {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

.wallet-validation-message {
    margin-top: 10px;
    font-size: 8px;
    padding: 8px 12px;
    border: 2px solid transparent;
    font-family: 'Press Start 2P', cursive;
    text-align: center;
}

.wallet-validation-message.error {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.wallet-validation-message.success {
    color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
    border-color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

/* Payment Instructions */
.payment-instructions {
    margin-bottom: 25px;
}

.payment-instructions p {
    color: #b0b0b0;
    font-size: 9px;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.destination-wallet,
.token-contract,
.payment-amount {
    margin-bottom: 15px;
}

.destination-wallet label,
.token-contract label,
.payment-amount label {
    display: block;
    color: #00ff41;
    font-size: 9px;
    margin-bottom: 8px;
}

.wallet-address-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallet-address-display span {
    background: #1a1f28;
    border: 2px solid #2a2f38;
    border-radius: 4px;
    padding: 8px;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 9px;
    flex: 1;
    word-break: break-all;
}

/* Wallet address styling for payment popup */
.wallet-label,
.amount-label {
    color: #00ff41;
    font-size: 9px;
    margin-bottom: 8px;
    font-family: 'Press Start 2P', cursive;
}

.wallet-address,
.user-wallet {
    background: #1a1f28;
    border: 2px solid #00ff41;
    border-radius: 4px;
    padding: 8px;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: bold;
    word-break: break-all;
    margin-bottom: 10px;
    line-height: 1.4;
}

.copy-address-btn {
    background: #0f1419;
    border: 2px solid #00ff41;
    color: #00ff41;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-address-btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
}

.amount-display {
    background: #1a1f28;
    border: 2px solid #ffaa00;
    border-radius: 4px;
    padding: 10px;
    color: #ffaa00;
    font-size: 12px;
    text-align: center;
    font-weight: bold;
}

.payment-warning {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid #ffaa00;
    border-radius: 4px;
    padding: 10px;
    margin-top: 15px;
}

.payment-warning p {
    color: #ffaa00;
    font-size: 8px;
    margin: 0 0 8px 0;
}

.user-wallet-display {
    background: #1a1f28;
    border: 1px solid #2a2f38;
    border-radius: 4px;
    padding: 8px;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 8px;
    word-break: break-all;
}

.transaction-signature-input {
    margin-top: 10px;
}

.transaction-signature-input input {
    width: 100%;
    padding: 10px;
    background: #1a1f28;
    border: 2px solid #00ff41;
    border-radius: 4px;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 9px;
    box-sizing: border-box;
}

.transaction-signature-input input::placeholder {
    color: #666;
}

.transaction-signature-input input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.payment-status {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid #2a2f38;
    border-radius: 4px;
}

.status-message {
    color: #00ff41;
    font-size: 9px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.status-message.waiting {
    color: #ff9500; /* Orange color for waiting state */
}

.status-message.error {
    color: #ff4444; /* Red color for error state */
}

.status-indicator {
    font-size: 20px;
}

/* Action Buttons */
.upgrade-actions,
.wallet-actions,
.payment-actions,
.success-actions,
.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* All Confirm/Action Buttons - Unified Green Styling (matches shop confirm buttons) */
.upgrade-now-btn,
.wallet-submit-btn,
.check-payment-btn,
.success-ok-btn,
.confirm-btn {
    background: #2a2f38;
    color: #00ff41;
    border: 2px solid #00ff41;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.upgrade-now-btn:hover,
.wallet-submit-btn:hover,
.check-payment-btn:hover,
.success-ok-btn:hover,
.confirm-btn:hover {
    background: #00ff41;
    color: #1a1f28;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
}

/* All Cancel Buttons - Unified Red Styling (matches shop cancel buttons) */
.cancel-btn,
.upgrade-cancel-btn,
.wallet-cancel-btn,
.payment-cancel-btn,
.error-cancel-btn,
.error-ok-btn {
    background: #2a2f38;
    color: #ff4444;
    border: 2px solid #ff4444;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cancel-btn:hover,
.upgrade-cancel-btn:hover,
.wallet-cancel-btn:hover,
.payment-cancel-btn:hover,
.error-cancel-btn:hover,
.error-ok-btn:hover {
    background: #ff4444;
    color: #1a1f28;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
}

.check-payment-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success/Error Popups */
.success-popup-content {
    border-color: #00ff41;
}

.error-popup-content {
    border-color: #ff4444;
}

.success-header h3 {
    color: #00ff41;
}

.error-header h3 {
    color: #ff4444;
}

.success-message,
.error-message {
    margin-bottom: 25px;
}

.success-message p,
.error-message p {
    color: #b0b0b0;
    font-size: 9px;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.success-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid #2a2f38;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.success-item-img {
    width: 50px;
    height: 50px;
    border: 2px solid #2a2f38;
    border-radius: 4px;
    background: #1a1f28;
    padding: 5px;
}

.success-item-details {
    flex: 1;
}

.success-item-name {
    color: #00ff41;
    font-size: 10px;
    margin-bottom: 5px;
}

.success-item-rate {
    color: #ffaa00;
    font-size: 8px;
}

/* Global Notification System */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(26, 31, 40, 0.95);
    border: 2px solid #ff4444;
    color: #ff4444;
    padding: 15px 20px;
    font-size: 10px;
    max-width: 300px;
    z-index: 10001;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
    animation: notificationSlideIn 0.3s ease-out;
    border-radius: 4px;
}

.error-notification.auto-dismiss {
    animation: notificationSlideIn 0.3s ease-out, notificationSlideOut 0.3s ease-in 2.7s;
}

/* Orange notification variant */
.error-notification.orange {
    border-color: #ff8800;
    color: #ff8800;
    box-shadow: 0 0 20px rgba(255, 136, 0, 0.5);
}

/* Green notification variant */
.error-notification.green {
    border-color: #00ff41;
    color: #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

/* Blue notification variant */
.error-notification.blue {
    border-color: #4488ff;
    color: #4488ff;
    box-shadow: 0 0 20px rgba(68, 136, 255, 0.5);
}

.error-notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-notification .error-icon {
    font-size: 16px;
    margin: 0;
    flex-shrink: 0;
}

.error-notification .error-icon:empty {
    display: none;
}

.error-notification .error-text {
    flex: 1;
    line-height: 1.5;
}

.custom-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeIn 0.3s ease-in;
}

.custom-dialog-content {
    background: rgba(26, 31, 40, 0.95);
    border: 3px solid #00ff41;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    border-radius: 4px;
    color: #00ff41;
    font-size: 10px;
    line-height: 1.5;
}

.custom-dialog-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.custom-dialog button {
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid #00ff41;
    color: #00ff41;
    padding: 10px 20px;
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.custom-dialog button:hover {
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    transform: scale(1.05);
}

.custom-dialog button.cancel {
    background: #2a2f38;
    color: #ff4444;
    border-color: #ff4444;
}

.custom-dialog button.cancel:hover {
    background: #ff4444;
    color: #1a1f28;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Casino Tab Styles */
.casino-container {
    padding: 10px;
    color: #00ff41;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    position: relative;
    min-height: 200px;
    background-image: url('../assets/sprites/casino.png');
    background-size: 400px auto;
    background-position: center center;
    background-repeat: no-repeat;
}

.casino-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 20, 25, 0.6);
    pointer-events: none;
    z-index: 0;
}

.casino-container > * {
    position: relative;
    z-index: 1;
}

.cali-flip-title {
    font-size: 24px;
    font-weight: bold;
    color: #00ff41;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 4px;
    margin-bottom: 1px;
}

.casino-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1px;
}

.casino-image {
    max-width: 200px;
    max-height: 150px;
    width: auto;
    height: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    opacity: 0.4;
}

.casino-actions {
    margin-top: 170px;
}

.coming-soon-btn {
    background: #1a1f28;
    border: 2px solid #666;
    color: #666;
    padding: 10px 20px;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    cursor: not-allowed;
    opacity: 0.5;
    text-transform: uppercase;
}

/* Remove old casino styles that are no longer needed */
.casino-header,
.casino-games,
.casino-game,
.game-header,
.game-controls,
.bet-amount,
.bet-input,
.flip-buttons,
.number-buttons,
.flip-btn,
.number-btn,
.game-result,
.result-win,
.result-lose {
    display: none;
}

/* Welcome Tutorial Popup */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 20, 25, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.welcome-container {
    background: #0f1419;
    border: 3px solid #00ff41;
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    height: 800px;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
}

/* Green scrollbars for welcome container and tutorial content */
.welcome-container::-webkit-scrollbar,
.tutorial-content::-webkit-scrollbar,
.tutorial-content.upgrade-style::-webkit-scrollbar {
    width: 12px;
}

.welcome-container::-webkit-scrollbar-track,
.tutorial-content::-webkit-scrollbar-track,
.tutorial-content.upgrade-style::-webkit-scrollbar-track {
    background: #0f1419;
    border: 1px solid #00ff41;
    border-radius: 0;
}

.welcome-container::-webkit-scrollbar-thumb,
.tutorial-content::-webkit-scrollbar-thumb,
.tutorial-content.upgrade-style::-webkit-scrollbar-thumb {
    background: #00ff41;
    border: 1px solid #0f1419;
    border-radius: 0;
    box-shadow: inset 0 0 3px rgba(0, 255, 65, 0.3);
}

.welcome-container::-webkit-scrollbar-thumb:hover,
.tutorial-content::-webkit-scrollbar-thumb:hover,
.tutorial-content.upgrade-style::-webkit-scrollbar-thumb:hover {
    background: #4aff6b;
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

/* Firefox scrollbar support */
.welcome-container,
.tutorial-content,
.tutorial-content.upgrade-style {
    scrollbar-width: thin;
    scrollbar-color: #00ff41 #0f1419;
}

.welcome-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 28px;
    color: #00ff41;
    margin: 0 0 30px 0;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Mobile responsive sizing for welcome title */
@media (max-width: 480px) {
    .welcome-title {
        font-size: 20px !important;
        margin: 0 0 20px 0 !important;
    }
}

.tutorial-content {
    margin-bottom: 30px;
}

.tutorial-step {
    display: flex;
    align-items: center;
    text-align: left;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 8px;
}

.step-icon {
    font-size: 32px;
    margin-right: 20px;
    min-width: 50px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon-img {
    width: 60px;
    height: 60px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Page 2 Upgrade-style Tutorial Styling */
.tutorial-content.upgrade-style {
    background: #1a2025;
    border: 2px solid #00ff41;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    max-height: 600px;
    overflow-y: auto;
}

.tutorial-content.upgrade-style h2 {
    color: #00ff41;
    text-align: center;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 16px;
    border-bottom: 1px solid #00ff41;
    padding-bottom: 8px;
}

.tutorial-content.upgrade-style .tutorial-step {
    background: #0f1419;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 180px;
}

.tutorial-content.upgrade-style .tutorial-step:hover {
    border-color: #00ff41;
    background: #1a2025;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.tutorial-content.upgrade-style .step-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

/* UNIFIED PAGE 2 TUTORIAL IMAGE SYSTEM */
/* Base styling for all page 2 tutorial images */
.tutorial-content.upgrade-style .step-icon-img {
    display: block !important;
    margin: 0 auto !important;
    text-align: center !important;
    object-fit: contain !important;
    aspect-ratio: 1/1 !important;
    border-radius: 0 !important;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Desktop sizes */
.tutorial-content.upgrade-style .step-icon-img[src*="free-joint"] {
    width: 120px !important;
    height: 120px !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.tutorial-content.upgrade-style .step-icon-img[src*="joint-inventory"] {
    width: 320px !important;
    height: 320px !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.tutorial-content.upgrade-style .step-icon-img[alt="Interact"] {
    width: 200px !important;
    height: 200px !important;
    border: 3px solid #ff8c00 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Responsive scaling for medium screens */
@media (max-width: 519px) {
    .tutorial-content.upgrade-style .step-icon-img[src*="free-joint"] {
        width: 100px !important;
        height: 100px !important;
    }
    
    .tutorial-content.upgrade-style .step-icon-img[src*="joint-inventory"] {
        width: 240px !important;
        height: 240px !important;
    }
    
    .tutorial-content.upgrade-style .step-icon-img[alt="Interact"] {
        width: 160px !important;
        height: 160px !important;
    }
}

/* Responsive scaling for small screens */
@media (max-width: 433px) {
    .tutorial-content.upgrade-style .step-icon-img[src*="free-joint"] {
        width: 80px !important;
        height: 80px !important;
    }
    
    .tutorial-content.upgrade-style .step-icon-img[src*="joint-inventory"] {
        width: 200px !important;
        height: 200px !important;
    }
    
    .tutorial-content.upgrade-style .step-icon-img[alt="Interact"] {
        width: 170px !important;
        height: 170px !important;
    }
}

/* Ensure all step icon containers center properly */
.tutorial-content.upgrade-style .step-icon {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    margin: 0 auto 25px auto;
    width: 100%;
    min-height: 140px;
}

/* Ensure the step icon container centers the large image */
.tutorial-content.upgrade-style .tutorial-step:has(.step-icon-img[src*="joint-inventory"]) .step-icon {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 100px !important;
    text-align: center !important;
}

/* Make Upgrade to Sprout button larger in tutorial */
.tutorial-content.upgrade-style .step-icon .joint-upgrade-btn {
    width: 200px !important;
    height: 60px !important;
    font-size: 14px !important;
    padding: 15px 20px !important;
    margin: 0 auto !important;
    display: block !important;
    text-align: center !important;
}

/* Center the step-icon container for the upgrade button */
.tutorial-content.upgrade-style .tutorial-step:has(.joint-upgrade-btn) .step-icon {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 120px !important;
    text-align: center !important;
}

/* Make Upgrade button smaller on mobile */
@media (max-width: 433px) {
    .tutorial-content.upgrade-style .step-icon .joint-upgrade-btn {
        width: 140px !important;
        height: 45px !important;
        font-size: 11px !important;
        padding: 10px 14px !important;
        margin: 0 auto !important;
        text-align: center !important;
    }
}

.tutorial-content.upgrade-style .step-text {
    width: 100%;
    text-align: center;
}

.tutorial-content.upgrade-style .step-text h3 {
    color: #00ff41;
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.tutorial-content.upgrade-style .step-text p {
    color: #ffffff;
    font-size: 11px;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    padding: 0 10px;
}

/* Smaller text for 400px screens */
@media (max-width: 400px) {
    .tutorial-content.upgrade-style .step-text h3 {
        font-size: 10px;
    }
    
    .tutorial-content.upgrade-style .step-text p {
        font-size: 8px;
        line-height: 1.4;
        max-width: 250px;
    }
}

/* Urgent text styling for fast selling warning */
.urgent-text {
    color: #ff4444 !important;
    text-shadow: 0 0 5px #ff4444, 0 0 10px #ff4444, 0 0 15px #ff4444;
    animation: pulse-glow 1.5s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from {
        text-shadow: 0 0 5px #ff4444, 0 0 10px #ff4444, 0 0 15px #ff4444;
    }
    to {
        text-shadow: 0 0 10px #ff4444, 0 0 20px #ff4444, 0 0 30px #ff4444;
    }
}

.step-text h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: #00ff41;
    margin: 0 0 8px 0;
}

.step-text p {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: #999;
    margin: 0;
    line-height: 1.4;
}

/* Mobile responsive text sizing for page 1 welcome tutorial */
@media (max-width: 480px) {
    .step-text h3 {
        font-size: 11px !important;
    }
    
    .step-text p {
        font-size: 8px !important;
        line-height: 1.3 !important;
    }
}

.welcome-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.welcome-btn {
    background: #0f1419;
    border: 2px solid #00ff41;
    color: #00ff41;
    padding: 15px 30px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    border-radius: 6px;
    flex: 0 1 auto;
}

.upgrade-now-btn {
    background: #0f1419;
    border: 2px solid #ff8c00;
    color: #ff8c00;
}

.welcome-btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    transform: translateY(-2px);
}

.upgrade-now-btn:hover {
    background: rgba(255, 140, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.3);
    transform: translateY(-2px);
}

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

/* Mobile responsive for welcome buttons */
@media (max-width: 480px) {
    .welcome-buttons-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .welcome-btn {
        width: 100%;
        max-width: 200px;
        padding: 12px 20px;
        font-size: 10px;
    }
    
    /* Make welcome container much shorter on small phones */
    .welcome-container {
        height: 400px !important;
        padding: 15px !important;
        max-width: 95% !important;
    }
    
    .welcome-title {
        font-size: 14px !important;
        margin: 0 0 8px 0 !important;
    }
    
    /* Make page 2 tutorial step container shorter on mobile */
    .tutorial-content.upgrade-style {
        max-height: 200px !important;
        padding: 10px !important;
    }
    
    .tutorial-content.upgrade-style .tutorial-step {
        padding: 15px !important;
        margin: 10px 0 !important;
        min-height: 120px !important;
    }
    
    /* Green scrollbars for tutorial content on mobile */
    .tutorial-content::-webkit-scrollbar,
    .tutorial-content.upgrade-style::-webkit-scrollbar {
        width: 12px;
    }
    
    .tutorial-content::-webkit-scrollbar-track,
    .tutorial-content.upgrade-style::-webkit-scrollbar-track {
        background: #0f1419;
        border: 1px solid #00ff41;
    }
    
    .tutorial-content::-webkit-scrollbar-thumb,
    .tutorial-content.upgrade-style::-webkit-scrollbar-thumb {
        background: #00ff41;
        border: 1px solid #0f1419;
    }
    
    .tutorial-content::-webkit-scrollbar-thumb:hover,
    .tutorial-content.upgrade-style::-webkit-scrollbar-thumb:hover {
        background: #4aff6b;
    }
}

/* Help Button */
.help-button {
    position: fixed;
    left: 20px;
    top: 80px;
    width: 40px;
    height: 40px;
    background: #0f1419;
    border: 2px solid #00ff41;
    color: #00ff41;
    border-radius: 50%;
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1000;
}

.help-button:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    transform: scale(1.1);
}

/* ====================================================================
   HARVEST MODAL STYLES
   ==================================================================== */

.harvest-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.harvest-modal {
    background: #0f1419;
    border: 4px solid #00ff41;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5), inset 0 0 20px rgba(0, 255, 65, 0.1);
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.harvest-header {
    border-bottom: 3px solid #00ff41;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.harvest-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 18px;
    color: #00ff41;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
    line-height: 1.6;
}

.harvest-content {
    font-family: 'Press Start 2P', cursive;
}

.harvest-step {
    animation: fadeIn 0.3s ease;
    background: transparent;
}

.harvest-description {
    font-size: 11px;
    color: #00ff41;
    margin-bottom: 20px;
    line-height: 1.8;
}

.harvest-input {
    width: 100%;
    background: #1a1f28;
    border: 2px solid #00ff41;
    color: #00ff41;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    padding: 15px;
    margin-bottom: 20px;
    outline: none;
    transition: all 0.2s ease;
}

.harvest-input:focus {
    border-color: #4aff6b;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.harvest-input::placeholder {
    color: rgba(0, 255, 65, 0.4);
}

.harvest-info {
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid #00ff41;
    padding: 20px;
    margin-bottom: 25px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.harvest-available {
    font-size: 12px;
    color: #00ff41;
    text-align: center;
    width: 100%;
}

.harvest-available span {
    color: #4aff6b;
    text-shadow: 0 0 8px rgba(74, 255, 107, 0.8);
}

.harvest-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.harvest-modal .harvest-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 15px 30px;
    border: 3px solid #00ff41;
    background: #0f1419;
    color: #00ff41;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
    flex: 1;
    max-width: 200px;
}

.harvest-modal .harvest-btn:hover:not(:disabled) {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    transform: translateY(-2px);
}

.harvest-modal .harvest-btn:active:not(:disabled) {
    transform: translateY(0);
}

.harvest-modal .harvest-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.harvest-modal .harvest-btn-cancel {
    border-color: #ff4136;
    color: #ff4136;
}

.harvest-modal .harvest-btn-cancel:hover:not(:disabled) {
    background: rgba(255, 65, 54, 0.1);
    box-shadow: 0 0 20px rgba(255, 65, 54, 0.4);
}

.harvest-modal .harvest-btn-confirm {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
}

.harvest-modal .harvest-btn-close {
    width: 100%;
    max-width: none;
}

/* Loading State */
.harvest-loading {
    text-align: center;
    padding: 40px 20px;
    background: transparent;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 255, 65, 0.2);
    border-top-color: #00ff41;
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s linear infinite;
    background: transparent;
    box-shadow: none;
}

.loading-text {
    font-size: 12px;
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
    animation: pulse 1.5s ease-in-out infinite;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    display: inline-block;
}

/* Success State */
.harvest-success {
    text-align: center;
}

.success-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease;
}

.success-title {
    font-size: 16px;
    color: #00ff41;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.8);
}

.harvest-details {
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid #00ff41;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 10px;
    gap: 15px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: rgba(0, 255, 65, 0.7);
    white-space: nowrap;
}

.detail-value {
    color: #4aff6b;
    text-shadow: 0 0 8px rgba(74, 255, 107, 0.8);
    text-align: right;
    word-break: break-all;
}

.transaction-row {
    padding-top: 15px;
    border-top: 1px solid rgba(0, 255, 65, 0.2);
    margin-top: 10px;
}

.transaction-hash {
    font-size: 8px;
    max-width: 300px;
}

.success-message {
    font-size: 11px;
    color: #00ff41;
    margin-bottom: 25px;
}

/* Error State */
.harvest-error {
    text-align: center;
}

.error-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.error-title {
    font-size: 16px;
    color: #ff4136;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255, 65, 54, 0.8);
}

.error-message {
    font-size: 10px;
    color: rgba(0, 255, 65, 0.8);
    line-height: 1.8;
    margin-bottom: 30px;
    background: rgba(255, 65, 54, 0.05);
    border: 2px solid #ff4136;
    padding: 15px;
}

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

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .harvest-modal {
        padding: 20px;
        width: 95%;
    }

    .harvest-title {
        font-size: 14px;
    }

    .harvest-description {
        font-size: 9px;
    }

    .harvest-input {
        font-size: 9px;
        padding: 12px;
    }

    .harvest-modal .harvest-btn {
        font-size: 10px;
        padding: 12px 20px;
    }

    .detail-row {
        font-size: 8px;
    }

    .transaction-hash {
        font-size: 7px;
    }

    /* Chat Button Mobile */
    .room-chat-btn {
        bottom: 60px;
        left: 10px;
        font-size: 7px;
        padding: 10px 12px;
    }

    /* Protection Status Mobile */
    .protection-status {
        top: 10px;
        font-size: 8px;
        padding: 6px 8px;
    }

    .room-customize-btn {
        bottom: 15px;
        left: 10px;
        font-size: 7px;
        padding: 10px 12px;
    }

    .room-leaderboard-btn {
        bottom: 15px;
        right: 10px;
        font-size: 7px;
        padding: 10px 12px;
    }

    /* Chat Container Mobile */
    .chat-container {
        width: calc(100% - 20px);
        height: 400px;
        left: 10px;
        bottom: 10px;
    }

    .chat-title {
        font-size: 8px;
    }

    .chat-info {
        font-size: 5px;
    }

    .message-header {
        font-size: 5px;
    }

    .message-text {
        font-size: 6px;
    }

    .chat-input {
        font-size: 6px;
        padding: 8px;
    }

    .chat-send-btn {
        font-size: 6px;
        padding: 8px 12px;
    }
}

/* =============================================================================
   LEADERBOARD STYLES
   ============================================================================= */

.room-daily-reward-btn {
    position: absolute;
    bottom: 70px;
    right: 20px;
    background: linear-gradient(135deg, #0d4d1a 0%, #0f5d20 50%, #116d24 100%);
    border: 2px solid #00ff41;
    color: #ffffff;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 100;
    overflow: hidden;
}

.room-daily-reward-btn > * {
    position: relative;
    z-index: 2;
}

.room-daily-reward-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 70%
    );
    animation: reward-shine 4s infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes reward-shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.room-daily-reward-btn:hover {
    background: linear-gradient(135deg, #116d24 0%, #0f5d20 50%, #0d4d1a 100%);
    transform: scale(1.03) translateY(-1px);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.room-daily-reward-btn.claimed {
    background: linear-gradient(135deg, #333 0%, #444 50%, #555 100%);
    border-color: #666;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
    text-shadow: none;
}

.room-daily-reward-btn.claimed::before {
    display: none;
}

.room-daily-reward-btn.claimed:hover {
    background: linear-gradient(135deg, #333 0%, #444 50%, #555 100%);
    transform: none;
    box-shadow: none;
}

.room-leaderboard-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #1a1f28;
    border: 3px solid #FFD700;
    color: #FFD700;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    z-index: 100;
}

.room-leaderboard-btn:hover {
    background: #FFD700;
    color: #1a1f28;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

/* =============================================================================
   DAILY REWARD MODAL STYLES
   ============================================================================= */

.daily-reward-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

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

.daily-reward-modal {
    background: linear-gradient(135deg, #1a1f28 0%, #0d1117 100%);
    border: 4px solid #00ff41;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    box-shadow: 
        0 0 60px rgba(0, 255, 65, 0.6),
        0 20px 80px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-border-gleam {
    position: absolute;
    top: -4px;
    left: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.daily-reward-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(0, 255, 65, 0.3);
    position: relative;
}

.daily-reward-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ff41, transparent);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
}

.daily-reward-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    color: #ffffff;
    text-shadow: 
        0 0 20px rgba(0, 255, 65, 0.8),
        0 0 40px rgba(0, 255, 65, 0.4);
    margin: 0;
    letter-spacing: 2px;
    flex: 1;
    text-align: center;
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { 
        text-shadow: 
            0 0 20px rgba(0, 255, 65, 0.8),
            0 0 40px rgba(0, 255, 65, 0.4);
    }
    50% { 
        text-shadow: 
            0 0 30px rgba(0, 255, 65, 1),
            0 0 60px rgba(0, 255, 65, 0.6);
    }
}

.daily-reward-close-btn {
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid #00ff41;
    color: #00ff41;
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.daily-reward-close-btn:hover {
    background: rgba(0, 255, 65, 0.3);
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
}

.daily-reward-content {
    text-align: center;
    padding: 20px 0;
}

/* Reward Pack Container */
.reward-pack-container {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.reward-pack {
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 25px rgba(0, 255, 65, 0.5));
    position: relative;
    display: inline-block;
    perspective: 1500px;
    width: 280px;
    height: 280px;
}

.reward-pack:hover {
    filter: drop-shadow(0 0 35px rgba(0, 255, 65, 0.7));
}

.reward-pack.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    filter: grayscale(1) drop-shadow(0 0 10px rgba(100, 100, 100, 0.3));
}

.reward-pack.disabled:hover {
    transform: none;
}

.reward-pack.disabled .reward-pack-inner {
    animation: none;
}

.reward-pack:not(.disabled):not(.opening):not(.opened):not(.ready):hover .reward-pack-inner {
    animation: none !important;
    transform: rotateY(0deg) rotateX(-10deg);
}

.reward-pack.ready .reward-pack-inner {
    animation: none;
    /* Don't override transform - let it freeze at current rotation */
}

.reward-pack.opening .reward-pack-inner,
.reward-pack.opened .reward-pack-inner {
    animation: none;
    transform: rotateY(0deg) rotateX(-10deg);
}

/* Pack Inner Container (the flipping part) */
.reward-pack-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    animation: pack-flip 12s linear infinite;
}

/* Pack Faces (front and back) */
.reward-pack-face {
    width: 280px;
    height: 280px;
    image-rendering: pixelated;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.reward-pack-front {
    z-index: 2;
    transform: rotateY(0deg);
}

.reward-pack-back {
    z-index: 1;
    transform: rotateY(180deg);
}

@keyframes pack-flip {
    0% { 
        transform: rotateY(0deg) rotateX(-10deg); 
    }
    100% { 
        transform: rotateY(360deg) rotateX(-10deg); 
    }
}

/* Opening Animation States */
.reward-pack.opening .reward-pack-image {
    animation: pack-shake 0.1s ease-in-out 3;
}

.reward-pack.opened .reward-pack-image {
    animation: pack-open 0.5s ease-out forwards;
}

@keyframes pack-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

@keyframes pack-open {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(0.8) rotate(0deg);
        opacity: 0;
    }
}

/* Fallback Styling (if image not loaded) */
.reward-pack-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 280px;
    height: 280px;
    background: rgba(0, 255, 65, 0.05);
    border: 3px solid #00ff41;
}

.fallback-icon {
    font-size: 100px;
    margin-bottom: 15px;
}

.fallback-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Click Prompt */
.reward-pack-prompt {
    animation: prompt-pulse 2s ease-in-out infinite;
}

.reward-pack-prompt p {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    margin: 0;
}

@keyframes prompt-pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.6;
        transform: translateY(-5px);
    }
}

/* Hide prompt when disabled or opening */
.reward-pack.disabled ~ .reward-pack-prompt,
.reward-pack.opening ~ .reward-pack-prompt,
.reward-pack.opened ~ .reward-pack-prompt {
    display: none;
}

.reward-result {
    margin: 30px 0;
    padding: 30px;
    background: rgba(0, 255, 65, 0.1);
    border: 3px solid #00ff41;
    animation: reward-reveal 0.5s ease-out;
}

@keyframes reward-reveal {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.reward-result-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.reward-result-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    line-height: 1.6;
}

.reward-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(0, 255, 65, 0.3);
}

.reward-info-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    color: #888;
    margin: 5px 0;
    line-height: 1.5;
}

.reward-timer {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 107, 53, 0.1);
    border: 2px solid #ff6b35;
}

.reward-timer-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: #ff6b35;
    margin: 0;
    line-height: 1.5;
}

#rewardTimerCountdown {
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.leaderboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.leaderboard-modal {
    background: #1a1f28;
    border: 4px solid #FFD700;
    padding: 30px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #FFD700;
}

.leaderboard-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 18px;
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
    margin: 0;
    letter-spacing: 2px;
    flex: 1;
    text-align: center;
}

/* Leaderboard Tabs */
.leaderboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.leaderboard-tab {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #00ff41;
    color: #00ff41;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.leaderboard-tab:hover {
    background: rgba(0, 255, 65, 0.1);
    transform: translateY(-2px);
}

.leaderboard-tab.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* Casino tab specific styling */
#casinoLeaderboardTab {
    border-color: #9d4edd;
    color: #ffffff;
}

#casinoLeaderboardTab:hover {
    background: rgba(157, 78, 221, 0.1);
}

#casinoLeaderboardTab.active {
    background: rgba(157, 78, 221, 0.2);
    border-color: #9d4edd;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.4);
}

.leaderboard-close-btn {
    background: transparent;
    border: 2px solid #FFD700;
    color: #FFD700;
    font-family: 'Press Start 2P', monospace;
    font-size: 16px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaderboard-close-btn:hover {
    background: #FFD700;
    color: #1a1f28;
    transform: scale(1.1);
}

.leaderboard-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.leaderboard-table-header {
    display: grid;
    grid-template-columns: 80px 1fr 180px;
    gap: 15px;
    padding: 15px 10px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #FFD700;
    margin-bottom: 15px;
}

.leaderboard-table-header > div {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: #FFD700;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.leaderboard-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.leaderboard-list::-webkit-scrollbar {
    width: 8px;
}

.leaderboard-list::-webkit-scrollbar-track {
    background: #0a0d14;
    border-radius: 4px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 4px;
}

.leaderboard-list::-webkit-scrollbar-thumb:hover {
    background: #ffd700cc;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 80px 1fr 180px;
    gap: 15px;
    padding: 15px 10px;
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid #00ff41;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    align-items: center;
}

.leaderboard-item:hover {
    background: rgba(0, 255, 65, 0.15);
    transform: translateX(5px);
}

.leaderboard-item.top-1 {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.leaderboard-item.top-2 {
    background: rgba(192, 192, 192, 0.15);
    border-color: #C0C0C0;
}

.leaderboard-item.top-3 {
    background: rgba(205, 127, 50, 0.15);
    border-color: #CD7F32;
}

.leaderboard-rank {
    font-family: 'Press Start 2P', monospace;
    font-size: 16px;
    color: #FFD700;
    text-align: center;
    font-weight: bold;
}

.leaderboard-item.top-1 .leaderboard-rank {
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    font-size: 20px;
}

.leaderboard-item.top-2 .leaderboard-rank {
    color: #C0C0C0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.6);
}

.leaderboard-item.top-3 .leaderboard-rank {
    color: #CD7F32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.6);
}

.leaderboard-name {
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    color: #00ff41;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-bud {
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    color: #FFD700;
    text-align: right;
    font-weight: bold;
}

.leaderboard-loading {
    text-align: center;
    padding: 40px;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    color: #FFD700;
    animation: pulse 1.5s ease-in-out infinite;
}

.leaderboard-error {
    text-align: center;
    padding: 40px;
    font-family: 'Press Start 2P', monospace;
    font-size: 11px;
    color: #ff4444;
}

/* Casino Leaderboard Styles */
.casino-leaderboard-table-header {
    display: grid;
    grid-template-columns: 60px 1fr 110px 110px 110px 60px;
    gap: 10px;
    padding: 12px 8px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #FFD700;
    margin-bottom: 15px;
}

.casino-leaderboard-table-header > div {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: #FFD700;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.casino-leaderboard-item {
    display: grid;
    grid-template-columns: 60px 1fr 110px 110px 110px 60px;
    gap: 10px;
    padding: 12px 8px;
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid #00ff41;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    align-items: center;
}

.casino-leaderboard-item:hover {
    background: rgba(0, 255, 65, 0.15);
    transform: translateX(5px);
}

.casino-leaderboard-item.top-1 {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.casino-leaderboard-item.top-2 {
    background: rgba(192, 192, 192, 0.15);
    border-color: #C0C0C0;
}

.casino-leaderboard-item.top-3 {
    background: rgba(205, 127, 50, 0.15);
    border-color: #CD7F32;
}

.casino-rank {
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    color: #FFD700;
    text-align: center;
    font-weight: bold;
}

.casino-leaderboard-item.top-1 .casino-rank {
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    font-size: 16px;
}

.casino-leaderboard-item.top-2 .casino-rank {
    color: #C0C0C0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.6);
}

.casino-leaderboard-item.top-3 .casino-rank {
    color: #CD7F32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.6);
}

.casino-name {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: #00ff41;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.casino-wagered, .casino-pnl, .casino-biggest, .casino-water {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    text-align: center;
    font-weight: bold;
}

.casino-wagered {
    color: #FFD700;
}

.casino-pnl {
    font-weight: bold;
}

.casino-pnl.positive {
    color: #00ff41;
}

.casino-pnl.negative {
    color: #ff4444;
}

.casino-biggest {
    color: #00ff41;
}

.casino-water {
    color: #00BFFF;
    font-size: 14px;
}

/* Casino leaderboard scroll container */
#casinoLeaderboardContent {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 400px;
}

#casinoLeaderboardContent .leaderboard-list {
    overflow-x: visible;
    overflow-y: visible;
}

#casinoLeaderboardContent::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#casinoLeaderboardContent::-webkit-scrollbar-track {
    background: #0a0d14;
    border-radius: 4px;
}

#casinoLeaderboardContent::-webkit-scrollbar-thumb {
    background: #9d4edd;
    border-radius: 4px;
}

#casinoLeaderboardContent::-webkit-scrollbar-thumb:hover {
    background: #b877e8;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .room-daily-reward-btn {
        bottom: 60px;
        right: 10px;
        font-size: 7px;
        padding: 10px 12px;
    }
    
    .daily-reward-modal {
        padding: 20px;
        max-width: 90%;
    }
    
    .daily-reward-title {
        font-size: 10px;
    }
    
    .reward-pack {
        width: 220px;
        height: 220px;
    }
    
    .reward-pack-face {
        width: 220px;
        height: 220px;
    }
    
    .reward-pack-fallback {
        width: 220px;
        height: 220px;
    }
    
    .fallback-icon {
        font-size: 80px;
    }
    
    .reward-pack-prompt p {
        font-size: 8px;
    }
    
    .reward-result-icon {
        font-size: 40px;
    }
    
    .reward-result-text {
        font-size: 10px;
    }
    
    .leaderboard-title {
        font-size: 12px;
    }
    
    .leaderboard-table-header {
        grid-template-columns: 50px 1fr 100px;
        gap: 8px;
        padding: 12px 8px;
    }
    
    .leaderboard-table-header > div {
        font-size: 8px;
    }
    
    .leaderboard-item {
        grid-template-columns: 50px 1fr 100px;
        gap: 8px;
        padding: 12px 8px;
    }
    
    .leaderboard-rank {
        font-size: 12px;
    }
    
    .leaderboard-item.top-1 .leaderboard-rank {
        font-size: 14px;
    }
    
    .leaderboard-name {
        font-size: 9px;
        min-width: 0;
    }
    
    .leaderboard-bud {
        font-size: 9px;
    }
    
    /* Casino leaderboard mobile responsive */
    .casino-leaderboard-table-header {
        grid-template-columns: 40px 1fr 70px 70px 70px 40px;
        gap: 5px;
        padding: 10px 6px;
    }
    
    .casino-leaderboard-table-header > div {
        font-size: 7px;
    }
    
    .casino-leaderboard-item {
        grid-template-columns: 40px 1fr 70px 70px 70px 40px;
        gap: 5px;
        padding: 10px 6px;
    }
    
    .casino-rank {
        font-size: 10px;
    }
    
    .casino-leaderboard-item.top-1 .casino-rank {
        font-size: 12px;
    }
    
    .casino-name {
        font-size: 7px;
    }
    
    .casino-wagered, .casino-pnl, .casino-biggest {
        font-size: 7px;
    }
    
    .casino-water {
        font-size: 12px;
    }
    
    .leaderboard-tab {
        font-size: 8px;
        padding: 10px 12px;
    }
    
    .room-leaderboard-btn {
        font-size: 7px;
        padding: 10px 12px;
        bottom: 15px;
        right: 10px;
    }
    
    /* Align Customize button with Leaderboard button */
    .room-customize-btn {
        font-size: 7px;
        padding: 10px 12px;
        bottom: 15px;
        left: 10px;
    }
}

/* Extra small mobile - enable horizontal scroll for casino leaderboard */
@media (max-width: 504px) {
    .casino-leaderboard-table-header,
    .casino-leaderboard-item {
        min-width: 480px;
    }
}

/* =============================================================================
   CASINO / COINFLIP GAME STYLES
   ============================================================================= */

.coinflip-game {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    padding: 20px;
}

/* =============================================================================
   CASINO ENTER BUTTON & MODAL
   ============================================================================= */

.casino-enter-btn {
    margin-top: 170px;
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    padding: 18px 25px;
    border: 3px solid #c77dff;
    background: #1a1f28;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 20px rgba(199, 125, 255, 0.4);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.casino-enter-btn:hover {
    background: #c77dff;
    color: #1a1f28;
    border-color: #c77dff;
    box-shadow: 0 0 30px rgba(199, 125, 255, 0.8);
}

.casino-enter-btn:active {
    transform: scale(0.95);
    background: #9d4edd;
    border-color: #9d4edd;
}

/* ==================== */
/* Shop Modal Overlay   */
/* ==================== */

.shop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.shop-modal {
    background: #1a1f28;
    border: 3px solid #00ff41;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
}

.shop-modal-header {
    padding: 20px;
    border-bottom: 2px solid rgba(0, 255, 65, 0.2);
    position: relative;
    flex-shrink: 0;
}

.shop-modal-title {
    font-family: 'Press Start 2P', cursive;
    color: #00ff41;
    font-size: 18px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.shop-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    font-family: 'Press Start 2P', cursive;
    background: #1a1f28;
    border: 2px solid #00ff41;
    color: #00ff41;
    font-size: 14px;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-close-btn:hover {
    background: #00ff41;
    color: #1a1f28;
    transform: scale(1.1);
}

.shop-modal-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.shop-modal-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Reuse existing shop-item styles in modal */
.shop-modal-items .shop-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 10px;
    background: #0f1419;
    border: 2px solid #00ff41;
    padding: 10px;
    align-items: center;
    transition: all 0.2s ease;
}

.shop-modal-items .shop-item:hover {
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Mobile adjustments for shop modal */
@media (max-width: 768px) {
    .shop-modal {
        max-width: 95%;
        max-height: 85vh;
    }
    
    .shop-modal-title {
        font-size: 14px;
    }
    
    .shop-modal-content {
        padding: 15px;
    }
    
    .shop-modal-items .shop-item {
        grid-template-columns: 50px 1fr auto;
        gap: 8px;
        padding: 8px;
    }
    
    .shop-modal-items .shop-item-image {
        width: 50px;
        height: 50px;
    }
    
    .shop-modal-items .shop-item-name {
        font-size: 9px;
    }
    
    .shop-modal-items .shop-buy-btn {
        padding: 8px 12px;
        font-size: 8px;
    }
}

/* ==================== */
/* Bank Vault Modal     */
/* ==================== */

.bank-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.bank-modal {
    background: #1a1f28;
    border: 3px solid #FFD700;
    max-width: 550px;
    width: 90%;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
    position: relative;
}

.bank-modal-header {
    padding: 20px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
    position: relative;
}

.bank-modal-title {
    font-family: 'Press Start 2P', cursive;
    color: #FFD700;
    font-size: 18px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.bank-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    font-family: 'Press Start 2P', cursive;
    background: #1a1f28;
    border: 2px solid #FFD700;
    color: #FFD700;
    font-size: 14px;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bank-close-btn:hover {
    background: #FFD700;
    color: #1a1f28;
    transform: scale(1.1);
}

.bank-modal-content {
    padding: 25px;
    text-align: center;
}

.bank-vault-icon {
    margin-bottom: 20px;
}

.bank-vault-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.4));
}

.bank-staking-section {
    background: rgba(255, 215, 0, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.3);
    padding: 20px;
}

.bank-staking-title {
    font-family: 'Press Start 2P', cursive;
    color: #FFD700;
    font-size: 14px;
    margin: 0 0 15px 0;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.bank-staking-description {
    font-family: 'Press Start 2P', cursive;
    color: #888;
    font-size: 8px;
    line-height: 1.8;
    margin: 0 0 20px 0;
}

.bank-staking-stats {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    margin-bottom: 20px;
}

.bank-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bank-stat-label {
    font-family: 'Press Start 2P', cursive;
    color: #666;
    font-size: 7px;
}

.bank-stat-value {
    font-family: 'Press Start 2P', cursive;
    color: #FFD700;
    font-size: 10px;
}

.bank-stake-btn {
    width: 100%;
    padding: 15px 30px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    border: 2px solid #FFD700;
    background: #1a1f28;
    color: #FFD700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.bank-stake-btn:hover:not(.disabled) {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.bank-stake-btn.disabled {
    border-color: #444;
    color: #444;
    cursor: not-allowed;
    background: #1a1f28;
}

/* Mobile adjustments for bank modal */
@media (max-width: 768px) {
    .bank-modal {
        max-width: 95%;
    }
    
    .bank-modal-title {
        font-size: 14px;
    }
    
    .bank-staking-title {
        font-size: 12px;
    }
    
    .bank-staking-description {
        font-size: 7px;
    }
    
    .bank-staking-stats {
        flex-wrap: wrap;
    }
    
    .bank-stake-btn {
        font-size: 10px;
        padding: 12px 20px;
    }
}

.casino-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.casino-modal {
    background: #1a1f28;
    border: 3px solid #9d4edd;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 0 40px rgba(157, 78, 221, 0.3);
    position: relative;
}

.casino-modal-header {
    padding: 20px;
    border-bottom: 2px solid rgba(0, 255, 65, 0.2);
    position: relative;
}

.casino-modal-title {
    font-family: 'Press Start 2P', cursive;
    color: #00ff41;
    font-size: 18px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.casino-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    font-family: 'Press Start 2P', cursive;
    background: #1a1f28;
    border: 2px solid #00ff41;
    color: #00ff41;
    font-size: 14px;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.casino-close-btn:hover {
    background: #00ff41;
    color: #1a1f28;
    transform: scale(1.1);
}

.casino-modal-content {
    padding: 20px;
    position: relative;
    background-image: url('../assets/sprites/casino.png');
    background-size: 480px auto;
    background-position: center 60%;
    background-repeat: no-repeat;
}

.casino-modal-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 20, 25, 0.6);
    pointer-events: none;
    z-index: 0;
}

.casino-modal-content > * {
    position: relative;
    z-index: 1;
}

.casino-balance {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid #00ff41;
    font-family: 'Press Start 2P', monospace;
    margin-bottom: 20px;
}

.casino-balance-label {
    font-size: 10px;
    color: #00ff41;
    letter-spacing: 1px;
}

.casino-balance-value {
    font-size: 16px;
    color: #00ff41;
    font-weight: bold;
}

/* Stake Amount Display (Purple) */
.casino-stake {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background: rgba(157, 78, 221, 0.15);
    border: 2px solid #9d4edd;
    font-family: 'Press Start 2P', monospace;
    margin-bottom: 20px;
}

.casino-stake-label {
    font-size: 10px;
    color: #9d4edd;
    letter-spacing: 1px;
}

.casino-stake-value {
    font-size: 16px;
    color: #ffffff;
    font-weight: bold;
}

.bet-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 450px;
}

.bet-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: #00ff41;
    text-align: center;
    letter-spacing: 2px;
}

.bet-input {
    width: 100%;
    padding: 15px;
    background: rgba(157, 78, 221, 0.2);
    border: 3px solid #9d4edd;
    color: #ffffff;
    font-family: 'Press Start 2P', monospace;
    font-size: 16px;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.4);
    margin-top: 10px;
    border-radius: 5px;
    display: block !important;
}

/* Remove number input arrows */
.bet-input::-webkit-outer-spin-button,
.bet-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bet-input[type=number] {
    -moz-appearance: textfield;
}

.bet-input:focus {
    background: rgba(157, 78, 221, 0.3);
    box-shadow: 0 0 25px rgba(157, 78, 221, 0.6);
}

.bet-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.bet-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.bet-preset-btn {
    padding: 10px;
    background: rgba(157, 78, 221, 0.2);
    border: 2px solid #9d4edd;
    color: #ffffff;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.2);
}

.bet-preset-btn:hover:not(:disabled) {
    background: rgba(157, 78, 221, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.4);
}

.bet-preset-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.bet-preset-btn.selected {
    background: rgba(157, 78, 221, 0.5);
    border-width: 3px;
    box-shadow: 0 0 25px rgba(157, 78, 221, 0.7);
    transform: scale(1.05);
}

.bet-preset-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.coin-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.coin {
    width: 120px;
    height: 120px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.coin.flipping {
    animation: coinFlip 1.5s ease-in-out;
}

@keyframes coinFlip {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(1800deg); }
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 48px;
    font-weight: bold;
    border: 4px solid #FFD700;
    background: linear-gradient(145deg, #2a2f38, #1a1f28);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    backface-visibility: hidden;
}

.coin-heads {
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.coin-tails {
    color: #C0C0C0;
    text-shadow: 0 0 20px rgba(192, 192, 192, 0.6);
    transform: rotateY(180deg);
}

.coin-result {
    font-family: 'Press Start 2P', monospace;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 12px 20px;
    border-radius: 5px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coin-result.heads {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.coin-result.tails {
    color: #C0C0C0;
    background: rgba(192, 192, 192, 0.1);
    border: 2px solid #C0C0C0;
    text-shadow: 0 0 20px rgba(192, 192, 192, 0.6);
}

.choice-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 500px;
}

.choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 15px;
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid #00ff41;
    cursor: pointer;
    font-family: 'Press Start 2P', monospace;
    transition: all 0.2s ease;
}

.choice-btn:hover:not(:disabled) {
    background: rgba(0, 255, 65, 0.15);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.choice-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.choice-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.choice-text {
    font-size: 12px;
    color: #00ff41;
    letter-spacing: 2px;
}

/* Gold Heads Button */
.heads-btn {
    background: rgba(255, 215, 0, 0.1);
    border-color: #FFD700;
}

.heads-btn:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.heads-btn .choice-text {
    color: #FFD700;
}

.heads-btn.selected {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.5), rgba(255, 215, 0, 0.3)) !important;
    border-width: 4px !important;
    border-color: #FFD700 !important;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.9), inset 0 0 30px rgba(255, 215, 0, 0.3) !important;
    transform: scale(1.08) !important;
}

.heads-btn.selected .choice-text {
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 1);
    font-size: 13px;
}

/* Silver Tails Button */
.tails-btn {
    background: rgba(192, 192, 192, 0.1);
    border-color: #C0C0C0;
}

.tails-btn:hover:not(:disabled) {
    background: rgba(192, 192, 192, 0.2);
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.4);
}

.tails-btn .choice-text {
    color: #C0C0C0;
}

.tails-btn.selected {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.5), rgba(192, 192, 192, 0.3)) !important;
    border-width: 4px !important;
    border-color: #E0E0E0 !important;
    box-shadow: 0 0 40px rgba(192, 192, 192, 0.9), inset 0 0 30px rgba(192, 192, 192, 0.3) !important;
    transform: scale(1.08) !important;
}

.tails-btn.selected .choice-text {
    text-shadow: 0 2px 8px rgba(192, 192, 192, 0.8) !important;
}

.game-message {
    padding: 15px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 500px;
    width: 100%;
    margin-top: 20px;
}

.game-message.info {
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid rgba(0, 255, 65, 0.3);
    color: #00ff41;
}

.game-message.win {
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid #00ff41;
    color: #00ff41;
    animation: pulse 0.5s ease-in-out;
}

.game-message.loss {
    background: rgba(255, 68, 68, 0.05);
    border: 2px solid #ff4444;
    color: #ff4444;
}

.game-message.error {
    background: rgba(255, 68, 68, 0.05);
    border: 2px solid #ff4444;
    color: #ff4444;
}

/* Gamble Button */
.gamble-btn {
    width: 100%;
    max-width: 500px;
    padding: 20px 30px;
    background: linear-gradient(135deg, #7d2bad, #9d4edd);
    border: 3px solid #9d4edd;
    color: #ffffff;
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.8);
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.5);
}

.gamble-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #9d4edd, #b877e8);
    border-color: #b877e8;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(157, 78, 221, 0.8), 0 0 50px rgba(157, 78, 221, 0.4);
}

.gamble-btn:active:not(:disabled) {
    transform: scale(0.98);
    background: linear-gradient(135deg, #6d1d9d, #8d3ecd);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.gamble-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(50%);
}

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

/* Casino Result Popup */
.casino-result-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    border: 3px solid;
    border-radius: 20px;
    padding: 40px 60px;
    z-index: 10001;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.casino-result-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.casino-result-popup.win {
    border-color: #FFD700;
    background: linear-gradient(135deg, #4d3300, #332200) !important;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.8), inset 0 0 100px rgba(255, 215, 0, 0.3);
}

.casino-result-popup.loss {
    border-color: #ff4444;
    background: linear-gradient(135deg, #4d0000, #330000) !important;
    box-shadow: 0 0 50px rgba(255, 68, 68, 0.6), inset 0 0 100px rgba(255, 68, 68, 0.2);
}

.casino-result-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: resultPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    justify-content: center;
    align-items: center;
}

.casino-result-icon img {
    animation: resultPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.casino-result-popup.win .casino-result-icon img {
    filter: drop-shadow(0 0 20px rgba(127, 255, 127, 0.8));
}

.casino-result-popup.loss .casino-result-icon img {
    filter: drop-shadow(0 0 20px rgba(255, 68, 68, 0.6));
    animation: burnAndDissolve 3s ease-in-out forwards;
}

.casino-result-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 32px;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.casino-result-popup.win .casino-result-title {
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: glowPulse 1.5s infinite;
}

.casino-result-popup.loss .casino-result-title {
    color: #ff4444;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
}

.casino-result-amount {
    font-family: 'Press Start 2P', monospace;
    font-size: 24px;
    color: #7fff7f;
    margin-top: 15px;
}

.casino-result-popup.loss .casino-result-amount {
    color: #ff6b6b;
}

@keyframes resultPop {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes glowPulse {
    0%, 100% { 
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
    50% { 
        text-shadow: 0 0 40px rgba(255, 215, 0, 1), 0 0 60px rgba(255, 215, 0, 0.6);
    }
}

@keyframes burnAndDissolve {
    0% {
        opacity: 1;
        filter: drop-shadow(0 0 20px rgba(255, 68, 68, 0.6)) brightness(1) contrast(1);
        transform: scale(1) rotate(0deg);
    }
    20% {
        filter: drop-shadow(0 0 30px rgba(255, 100, 0, 0.8)) brightness(1.3) contrast(1.2);
    }
    40% {
        filter: drop-shadow(0 0 40px rgba(255, 140, 0, 1)) brightness(1.5) contrast(1.4) hue-rotate(20deg);
        transform: scale(1.05) rotate(5deg);
    }
    60% {
        opacity: 0.7;
        filter: drop-shadow(0 0 30px rgba(255, 68, 68, 0.5)) brightness(0.8) contrast(1.2) blur(2px);
        transform: scale(0.95) rotate(-3deg);
    }
    80% {
        opacity: 0.3;
        filter: drop-shadow(0 0 15px rgba(100, 30, 30, 0.3)) brightness(0.4) contrast(0.8) blur(4px);
        transform: scale(0.85) rotate(2deg);
    }
    100% {
        opacity: 0;
        filter: drop-shadow(0 0 5px rgba(50, 20, 20, 0.1)) brightness(0.2) contrast(0.5) blur(8px);
        transform: scale(0.7) translateY(20px) rotate(-5deg);
    }
}

/* Confetti for wins */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #FFD700;
    position: fixed;
    top: -10px;
    z-index: 10000;
    animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .coinflip-game {
        padding: 15px;
        gap: 15px;
    }
    
    .casino-balance {
        padding: 12px 20px;
    }
    
    .casino-balance-label {
        font-size: 8px;
    }
    
    .casino-balance-value {
        font-size: 14px;
    }
    
    .bet-input {
        font-size: 14px;
        padding: 12px;
    }
    
    #betAmount::placeholder,
    .bet-input::placeholder {
        font-size: 10px !important;
        line-height: 1.2;
    }
    
    .bet-preset-btn {
        padding: 10px;
        font-size: 9px;
    }
    
    .coin {
        width: 120px;
        height: 120px;
    }
    
    .coin-face {
        font-size: 48px;
    }
    
    .coin-result {
        font-size: 18px;
        padding: 12px 25px;
    }
    
    .choice-buttons {
        gap: 15px;
    }
    
    .choice-btn {
        padding: 20px;
    }
    
    .choice-icon {
        font-size: 36px;
    }
    
    .choice-text {
        font-size: 12px;
    }
    
    .game-message {
        font-size: 10px;
        padding: 15px 20px;
    }
    
    .casino-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-item {
        padding: 12px;
    }
}

/* Contract address text size for small screens */
@media (max-width: 590px) {
    .contract-address {
        font-size: 7px;
    }
    
    .contract-label {
        font-size: 7px;
    }
    
    .copy-contract-btn {
        font-size: 6px;
        padding: 3px 6px;
    }
}

/* Extra small mobile devices (400px and below) */
@media (max-width: 400px) {
    #betAmount::placeholder,
    .bet-input::placeholder {
        font-size: 9px !important;
    }
    
    .bet-input {
        font-size: 12px !important;
        padding: 10px !important;
    }
}

/* Mobile height optimization for auth page (717px devices) */
@media (max-height: 717px) {
    .auth-logo {
        max-width: 220px;
        margin-top: -20px;
        margin-bottom: -10px;
    }
    
    .auth-overlay {
        padding-top: 30px;
    }
}
