/* Modern Professional UI for Enhanced 3D Visualization - Hacker Green Theme */
body {
    background: linear-gradient(135deg, #0a0f0a 0%, #001a0a 50%, #0a0f0a 100%);
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #00ff41;
    overflow-x: hidden; /* Only prevent horizontal scrolling */
    overflow-y: auto; /* Allow vertical scrolling */
}

canvas {
    display: block;
}

/* Ensure the specific trade canvas fills its container */
#trade-canvas {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

#info {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 26, 10, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 12px;
    padding: 12px 24px;
    color: #00ff41;
    text-align: center;
    z-index: 100;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 32px rgba(0, 255, 65, 0.1);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

/* Modern menu and button styles */
#menu {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 101;
    background: rgba(0, 26, 10, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(0, 255, 65, 0.2);
    box-shadow: 0 8px 32px rgba(0, 255, 65, 0.1);
}

button {
    background: linear-gradient(135deg, #00cc33 0%, #00ff41 100%);
    color: #0a0f0a;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    margin: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.2);
}

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

button:hover::before {
    left: 100%;
}

button:hover {
    background: linear-gradient(135deg, #33ff66 0%, #00cc33 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 65, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 255, 65, 0.2);
}

/* Modern Tooltip Styles */
#tooltip, .tooltip {
    display: none;
    position: absolute;
    width: 280px;
    padding: 20px;
    background: rgba(0, 26, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 16px;
    text-align: left;
    color: #00ff41;
    font-size: 14px;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 20px 40px rgba(0, 255, 65, 0.1), 0 0 20px rgba(0, 255, 65, 0.2);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    font-family: inherit;
    line-height: 1.6;
    animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#tooltip .icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(0, 255, 65, 0.2);
}

#tooltip .icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

#tooltip .icon span {
    color: #00ff41 !important;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#tooltip .details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#tooltip .details span {
    display: block;
    font-size: 13px;
    line-height: 1.4;
}

#tooltip .details span:first-child {
    font-weight: 700;
    font-size: 16px;
    color: #00ff41;
    margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

#tooltip .details span:nth-child(2) {
    color: #33ff66;
    font-weight: 600;
}

#tooltip .details span:nth-child(3) {
    color: #00cc33;
    font-weight: 600;
}

#tooltip .details span:nth-child(4) {
    color: #00ccff;
    font-size: 12px;
    opacity: 0.8;
}

/* Buy/Sell Tooltip Type Styling */
#tooltip.buy-tooltip {
    border-left: 4px solid #00ff41;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, rgba(0, 26, 10, 0.95) 100%);
}

#tooltip.sell-tooltip {
    border-left: 4px solid #ff1a1a;
    background: linear-gradient(135deg, rgba(255, 26, 26, 0.1) 0%, rgba(0, 26, 10, 0.95) 100%);
}

#tooltip.buy-tooltip .details span:first-child {
    color: #00ff41;
}

#tooltip.sell-tooltip .details span:first-child {
    color: #ff1a1a;
}

#tooltip.buy-tooltip .icon {
    background: rgba(0, 255, 65, 0.2);
    border-color: rgba(0, 255, 65, 0.3);
}

#tooltip.sell-tooltip .icon {
    background: rgba(255, 26, 26, 0.2);
    border-color: rgba(255, 26, 26, 0.3);
}