* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Disable all text selection and drag behaviors globally */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Disable image dragging globally */
img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Re-enable pointer events only for interactive elements */
a, button, .inv-slot, .social-icon, .about-button, .back-button, .team-link,
.contract-click-area, .chest-wrapper {
    pointer-events: auto;
}

/* Custom animated cursor */
.custom-cursor {
    position: fixed;
    width: 48px;
    height: 48px;
    pointer-events: none;
    z-index: 99999;
    /* Offset so fingertip aligns with mouse position - move cursor image up and right */
    transform: translate(-30%, -70%) rotate(-35deg);
    animation: cursorFloat 2s ease-in-out infinite;
    transition: transform 0.15s ease-out;
}

.custom-cursor.clicking {
    animation: none;
    transform: translate(-30%, -70%) rotate(-35deg) translate(-3px, -3px);
}

.custom-cursor img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes cursorFloat {
    0%, 100% {
        transform: translate(-30%, -70%) rotate(-35deg) translateY(0px);
    }
    50% {
        transform: translate(-30%, -70%) rotate(-35deg) translateY(-4px);
    }
}

body {
    min-height: 300vh;
    overflow-x: hidden;
    overflow-y: auto;
    background: #0a0a0a;
}

.abyss {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        #0d1a1a 0%,
        #0c1818 10%,
        #0a1515 20%,
        #091414 30%,
        #081212 40%,
        #071010 50%,
        #050d10 60%,
        #040a0c 70%,
        #030808 80%,
        #020606 90%,
        #020505 100%
    );
    animation: abyssShift 12s ease-in-out infinite;
}

.abyss::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}

@keyframes abyssShift {
    0%, 100% {
        background: linear-gradient(
            180deg,
            #0d1a1a 0%,
            #0c1818 10%,
            #0a1515 20%,
            #091414 30%,
            #081212 40%,
            #071010 50%,
            #050d10 60%,
            #040a0c 70%,
            #030808 80%,
            #020606 90%,
            #020505 100%
        );
    }
    33% {
        background: linear-gradient(
            180deg,
            #0a1a1d 0%,
            #091719 10%,
            #081518 20%,
            #071316 30%,
            #061214 40%,
            #050f12 50%,
            #040d0f 60%,
            #030a0c 70%,
            #02080a 80%,
            #010607 90%,
            #010405 100%
        );
    }
    66% {
        background: linear-gradient(
            180deg,
            #0d1a17 0%,
            #0b1714 10%,
            #0a1512 20%,
            #091310 30%,
            #08120f 40%,
            #060f0c 50%,
            #050d0a 60%,
            #040a08 70%,
            #030807 80%,
            #020605 90%,
            #020504 100%
        );
    }
}

/* Dark radial gradient - dark in center, lighter at edges */
.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at 50% 50%,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.6) 30%,
        rgba(0, 0, 0, 0.3) 60%,
        transparent 100%
    );
    pointer-events: none;
}

/* Bubbles container */
.bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -20px;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(180, 220, 240, 0.4) 0%,
        rgba(120, 180, 200, 0.25) 40%,
        rgba(80, 140, 170, 0.1) 100%
    );
    border: 1px solid rgba(150, 200, 220, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(100, 180, 200, 0.2);
    animation: rise linear infinite;
    opacity: 0;
}

.bubble:nth-child(1) {
    left: 10%;
    width: 8px;
    height: 8px;
    animation-duration: 18s;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    left: 25%;
    width: 5px;
    height: 5px;
    animation-duration: 22s;
    animation-delay: 3s;
}

.bubble:nth-child(3) {
    left: 45%;
    width: 6px;
    height: 6px;
    animation-duration: 20s;
    animation-delay: 6s;
}

.bubble:nth-child(4) {
    left: 60%;
    width: 4px;
    height: 4px;
    animation-duration: 25s;
    animation-delay: 2s;
}

.bubble:nth-child(5) {
    left: 75%;
    width: 7px;
    height: 7px;
    animation-duration: 19s;
    animation-delay: 8s;
}

.bubble:nth-child(6) {
    left: 88%;
    width: 5px;
    height: 5px;
    animation-duration: 23s;
    animation-delay: 5s;
}

.bubble:nth-child(7) {
    left: 35%;
    width: 3px;
    height: 3px;
    animation-duration: 26s;
    animation-delay: 10s;
}

.bubble:nth-child(8) {
    left: 55%;
    width: 6px;
    height: 6px;
    animation-duration: 21s;
    animation-delay: 12s;
}

@keyframes rise {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    50% {
        transform: translateY(-50vh) translateX(10px) scale(1.1);
        opacity: 0.8;
    }
    95% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-110vh) translateX(-5px) scale(0.9);
        opacity: 0;
    }
}

/* Subtle chromatic / water distortion layer */
.chromatic-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at 20% 80%,
            rgba(0, 60, 80, 0.06) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse at 80% 20%,
            rgba(40, 0, 60, 0.04) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse at 50% 50%,
            rgba(0, 40, 50, 0.05) 0%,
            transparent 60%
        );
    animation: chromaticPulse 8s ease-in-out infinite;
}

@keyframes chromaticPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }
}

/* Mouse-spawned bubbles */
.mouse-bubble {
    position: fixed;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(180, 220, 240, var(--opacity, 0.5)) 0%,
        rgba(120, 180, 200, calc(var(--opacity, 0.5) * 0.6)) 40%,
        rgba(80, 140, 170, calc(var(--opacity, 0.5) * 0.2)) 100%
    );
    border: 1px solid rgba(150, 200, 220, var(--opacity, 0.4));
    border-radius: 50%;
    box-shadow: 0 0 var(--glow, 6px) rgba(100, 180, 200, calc(var(--opacity, 0.5) * 0.6));
    pointer-events: none;
    z-index: 9999;
    animation: mouseRise 2s ease-out forwards;
    --drift: 0px;
    --opacity: 0.5;
    --glow: 6px;
    --rise: 120px;
}

@keyframes mouseRise {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(calc(var(--rise, 120px) * -1)) translateX(var(--drift)) scale(0.5);
    }
}

/* Chest container */
.chest-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
}

.chest-wrapper {
    position: relative;
    transform: scale(var(--chest-scale, 0.8));
    transition: transform 0.1s ease-out;
    pointer-events: auto;
    cursor: none;
}

.chest-float-container {
    position: relative;
    animation: chestFloat 3s ease-in-out infinite;
}

/* Shake effect when chest is closed - like an animal inside */
.chest-float-container.rumble {
    animation: chestFloat 3s ease-in-out infinite, chestShake var(--shake-duration, 0.4s) ease-in-out;
}

@keyframes chestShake {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    5% {
        transform: translateY(-8px) rotate(var(--shake-rotation, 4deg));
    }
    15% {
        transform: translateY(-5px) rotate(calc(var(--shake-rotation, 4deg) * -1.2));
    }
    25% {
        transform: translateY(-7px) rotate(var(--shake-rotation, 4deg));
    }
    35% {
        transform: translateY(-4px) rotate(calc(var(--shake-rotation, 4deg) * -0.9));
    }
    50% {
        transform: translateY(-6px) rotate(calc(var(--shake-rotation, 4deg) * 0.7));
    }
    65% {
        transform: translateY(-3px) rotate(calc(var(--shake-rotation, 4deg) * -0.5));
    }
    80% {
        transform: translateY(-1px) rotate(calc(var(--shake-rotation, 4deg) * 0.3));
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Inner glow from opened chest */
.chest-inner-glow {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 60px;
    background: radial-gradient(
        ellipse at 50% 80%,
        rgba(255, 215, 100, var(--glow-intensity, 0)) 0%,
        rgba(255, 180, 50, calc(var(--glow-intensity, 0) * 0.6)) 30%,
        rgba(255, 150, 30, calc(var(--glow-intensity, 0) * 0.3)) 60%,
        transparent 100%
    );
    filter: blur(8px);
    pointer-events: none;
    z-index: -1;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.1);
    }
}

/* Chest opening bubbles - same opacity as cursor bubbles */
.chest-bubble {
    position: fixed;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(180, 220, 240, 0.9) 0%,
        rgba(120, 180, 200, 0.7) 40%,
        rgba(80, 140, 170, 0.4) 100%
    );
    border: 1px solid rgba(150, 200, 220, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(100, 180, 200, 0.7);
    pointer-events: none;
    animation: chestBubbleRise 1.5s ease-out forwards;
}

@keyframes chestBubbleRise {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) translateX(var(--drift, 0px)) scale(0.3);
    }
}

@keyframes chestFloat {
    0% {
        transform: translateY(0px) rotate(-1deg);
    }
    25% {
        transform: translateY(-4px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(1deg);
    }
    75% {
        transform: translateY(-4px) rotate(0deg);
    }
    100% {
        transform: translateY(0px) rotate(-1deg);
    }
}

.chest-img {
    width: 200px;
    height: auto;
    display: block;
}

.chest-shimmer-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    pointer-events: none;
}

/* Exclamation mark image */
.exclamation-container {
    position: absolute;
    top: -10px;
    right: -20px;
    transform: scale(var(--excl-scale, 1));
    pointer-events: none;
    z-index: 1;
    opacity: var(--excl-opacity, 1);
    transition: transform 0.1s ease-out, opacity 0.15s ease-out;
}

/* Quest ping effect when idle */
.exclamation-container.ping {
    animation: questPing 0.6s ease-out;
}

/* Exclamation bounce/fade out when equipment spawns */
.exclamation-container.equipment-spawn-out {
    animation: exclamationSpawnOut 400ms ease-in forwards;
}

@keyframes exclamationSpawnOut {
    0% {
        transform: scale(var(--excl-scale, 1));
        opacity: var(--excl-opacity, 1);
    }
    30% {
        transform: scale(calc(var(--excl-scale, 1) * 1.3)) translateY(-10px);
        opacity: 1;
    }
    100% {
        transform: scale(0) translateY(30px);
        opacity: 0;
    }
}

@keyframes questPing {
    0% {
        transform: scale(var(--excl-scale, 1));
    }
    30% {
        transform: scale(calc(var(--excl-scale, 1) * 1.5));
    }
    50% {
        transform: scale(calc(var(--excl-scale, 1) * 1.3));
    }
    70% {
        transform: scale(calc(var(--excl-scale, 1) * 1.4));
    }
    100% {
        transform: scale(var(--excl-scale, 1));
    }
}

.exclamation-container.ping .exclamation-img {
    animation: exclamationShake 0.75s ease-in-out infinite, electricGlow 2s ease-in-out infinite, pingGlow 0.6s ease-out;
}

@keyframes pingGlow {
    0% {
        filter:
            brightness(1.2)
            sepia(1)
            saturate(5)
            hue-rotate(10deg)
            drop-shadow(0 0 4px #ffeb3b)
            drop-shadow(0 0 8px #fdd835)
            drop-shadow(0 0 12px rgba(255, 235, 59, 0.5));
    }
    50% {
        filter:
            brightness(1.8)
            sepia(1)
            saturate(6)
            hue-rotate(10deg)
            drop-shadow(0 0 15px #ffeb3b)
            drop-shadow(0 0 25px #fdd835)
            drop-shadow(0 0 40px rgba(255, 235, 59, 0.8));
    }
    100% {
        filter:
            brightness(1.2)
            sepia(1)
            saturate(5)
            hue-rotate(10deg)
            drop-shadow(0 0 4px #ffeb3b)
            drop-shadow(0 0 8px #fdd835)
            drop-shadow(0 0 12px rgba(255, 235, 59, 0.5));
    }
}

.exclamation-img {
    width: 40px;
    height: auto;
    filter:
        brightness(1.2)
        sepia(1)
        saturate(5)
        hue-rotate(10deg)
        drop-shadow(0 0 4px #ffeb3b)
        drop-shadow(0 0 8px #fdd835)
        drop-shadow(0 0 12px rgba(255, 235, 59, 0.5));
    animation: exclamationShake 0.75s ease-in-out infinite, electricGlow 2s ease-in-out infinite;
    transform: rotate(12deg);
}

@keyframes exclamationShake {
    0%, 100% {
        transform: rotate(12deg) translate(0, 0);
    }
    25% {
        transform: rotate(12deg) translate(var(--excl-shake, 1px), calc(var(--excl-shake, 1px) * -1));
    }
    50% {
        transform: rotate(12deg) translate(calc(var(--excl-shake, 1px) * -1), 0);
    }
    75% {
        transform: rotate(12deg) translate(var(--excl-shake, 1px), var(--excl-shake, 1px));
    }
}

@keyframes electricGlow {
    0%, 100% {
        filter:
            brightness(1.2)
            sepia(1)
            saturate(5)
            hue-rotate(10deg)
            drop-shadow(0 0 4px #ffeb3b)
            drop-shadow(0 0 8px #fdd835)
            drop-shadow(0 0 12px rgba(255, 235, 59, 0.5));
    }
    50% {
        filter:
            brightness(1.3)
            sepia(1)
            saturate(5)
            hue-rotate(10deg)
            drop-shadow(0 0 6px #ffeb3b)
            drop-shadow(0 0 10px #fdd835)
            drop-shadow(0 0 16px rgba(255, 235, 59, 0.6));
    }
}

/* Scroll hint below chest */
.scroll-hint {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-hint-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.scroll-text {
    font-family: 'MedievalSharp', cursive;
    font-size: 16px;
    color: rgba(150, 180, 200, 0.6);
    letter-spacing: 1px;
    animation: textPulse 2s ease-in-out infinite;
    white-space: nowrap;
}

.scroll-arrow {
    font-size: 14px;
    color: rgba(150, 180, 200, 0.5);
    animation: arrowBounce 1.5s ease-in-out infinite;
}

.scroll-arrow.left {
    animation-delay: 0s;
}

.scroll-arrow.right {
    animation-delay: 0.2s;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(6px);
        opacity: 0.9;
    }
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.9;
    }
}

/* Equipment Panel - spawns from chest opening */
.equipment-panel {
    position: fixed;
    z-index: 15;
    pointer-events: none;
    opacity: 0;
    /* Size controlled by JS via CSS variables */
    width: var(--equipment-width, 10px);
    height: var(--equipment-height, 10px);
    /* Position at chest opening, will be set by JS */
    top: var(--equipment-top, 50%);
    left: var(--equipment-left, 50%);
    /* Center horizontally based on width */
    transform: translateX(-50%);
}

.equipment-panel.visible {
    opacity: 1;
    pointer-events: auto;
}

.equipment-panel.closing {
    pointer-events: none;
}

/* Bounce open animation: fly up from chest → fly to player → bounce settle */
.equipment-panel.bounce-open {
    animation: equipmentBounceOpen 600ms ease-out forwards;
    pointer-events: none;
}

@keyframes equipmentBounceOpen {
    0% {
        /* Start small at chest opening */
        width: 20px;
        height: 16px;
        top: var(--start-top);
        left: var(--equipment-left);
        transform: translateX(-50%) scale(0.5);
        opacity: 1;
    }
    30% {
        /* Fly up vertically from chest */
        width: 80px;
        height: 64px;
        top: calc(var(--start-top) - 100px);
        left: var(--equipment-left);
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
    70% {
        /* Fly towards player (center), slight overshoot */
        width: var(--target-width);
        height: var(--target-height);
        top: var(--target-top);
        left: var(--center-left);
        transform: translateX(-50%) scale(1.05);
        opacity: 1;
    }
    85% {
        /* Bounce back slightly */
        transform: translateX(-50%) scale(0.98);
    }
    100% {
        /* Final settled */
        width: var(--target-width);
        height: var(--target-height);
        top: var(--target-top);
        left: var(--center-left);
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

/* Paper plane animation - flies back into chest with rotation */
.equipment-panel.paper-plane {
    animation: equipmentPaperPlane 400ms ease-in forwards;
    pointer-events: none;
}

@keyframes equipmentPaperPlane {
    0% {
        opacity: 1;
        transform: translateX(-50%) rotate(0deg) scale(1);
    }
    30% {
        /* Tilt and start moving */
        transform: translateX(-50%) rotate(-15deg) scale(0.8);
        opacity: 1;
    }
    60% {
        /* Flying towards chest with more rotation */
        width: 80px;
        height: 60px;
        top: calc(var(--chest-y) + 50px);
        left: var(--chest-x);
        transform: translateX(-50%) rotate(-25deg) scale(0.4);
        opacity: 0.8;
    }
    100% {
        /* Into the chest */
        width: 10px;
        height: 10px;
        top: var(--chest-y);
        left: var(--chest-x);
        transform: translateX(-50%) rotate(-35deg) scale(0);
        opacity: 0;
    }
}

/* Custom font for contract address */
@font-face {
    font-family: 'SpecialGothicExpanded';
    src: url('SpecialGothicExpandedOne-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.equipment-inner {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    /* Smooth dark interior - solid base with subtle variation */
    background: #0d0f12;
    /* Thick metal frame border */
    border: 6px solid #3a3d42;
    border-radius: 12px;
    /* Metallic bevel effect on border */
    border-top-color: #5a5f68;
    border-left-color: #4a4f55;
    border-right-color: #2a2d32;
    border-bottom-color: #1a1d22;
    /* Outer glow like the reference */
    box-shadow:
        /* Outer dark shadow */
        0 0 20px rgba(0, 0, 0, 0.8),
        0 4px 30px rgba(0, 0, 0, 0.6),
        /* Inner shadow for depth */
        inset 0 0 80px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* Metal frame outer ridge with silver shimmer */
.equipment-inner::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 4px solid transparent;
    border-radius: 16px;
    pointer-events: none;
    z-index: -1;
    /* Silver metallic gradient background */
    background:
        linear-gradient(
            135deg,
            #2a2d32 0%,
            #4a4d55 10%,
            #6a6d75 20%,
            #8a8d95 30%,
            #5a5d65 40%,
            #3a3d45 50%,
            #5a5d65 60%,
            #7a7d85 70%,
            #4a4d55 80%,
            #2a2d32 90%,
            #3a3d45 100%
        );
    background-size: 200% 200%;
    animation: silverShimmer 6s ease-in-out infinite;
    /* Metallic sheen */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 0, 0, 0.6),
        0 0 2px rgba(150, 155, 165, 0.3);
}

@keyframes silverShimmer {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

/* Texture overlay using equipment_texture.png */
.equipment-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background-image: url('equipment_texture.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    mix-blend-mode: color-dodge;
    opacity: 0.8;
    border-radius: 6px;
    filter: blur(1px);
}

.equipment-content {
    width: 100%;
    height: auto;
    padding: 16px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    /* Don't block events on content below (black area) */
    pointer-events: none;
}

.equipment-content > * {
    pointer-events: auto;
}

/* Title container for BLACK PLANKTON */
.title-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 6px 16px;
    gap: 0;
    /* Prevent clicking and text selection */
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.title-line {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: clamp(40px, 10vw, 90px);
    color: #ffffff;
    line-height: 1.1;
    /* Flexbox for true justify alignment */
    display: flex;
    justify-content: space-between;
    width: 100%;
    /* Initial state - hidden off left */
    opacity: 0;
    transform: translateX(-100%) skewX(25deg);
    /* Prevent text cursor */
    cursor: default;
}

/* Individual letter spans for shadow animation */
.title-line span {
    display: inline-block;
    text-shadow:
        6px 6px 8px rgba(0, 0, 0, 0.7),
        0 0 20px rgba(0, 0, 0, 0.3);
    animation: sunShadow 8s ease-in-out infinite alternate;
}

/* Stagger the animation slightly for each letter */
.title-line span:nth-child(1) { animation-delay: 0s; }
.title-line span:nth-child(2) { animation-delay: 0.1s; }
.title-line span:nth-child(3) { animation-delay: 0.2s; }
.title-line span:nth-child(4) { animation-delay: 0.3s; }
.title-line span:nth-child(5) { animation-delay: 0.4s; }
.title-line span:nth-child(6) { animation-delay: 0.5s; }
.title-line span:nth-child(7) { animation-delay: 0.6s; }
.title-line span:nth-child(8) { animation-delay: 0.7s; }

/* Sun timelapse shadow animation - shadow moves from -45deg to 45deg */
@keyframes sunShadow {
    0% {
        text-shadow:
            -6px 6px 8px rgba(0, 0, 0, 0.7),
            0 0 20px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow:
            0px 8px 8px rgba(0, 0, 0, 0.7),
            0 0 20px rgba(0, 0, 0, 0.3);
    }
    100% {
        text-shadow:
            6px 6px 8px rgba(0, 0, 0, 0.7),
            0 0 20px rgba(0, 0, 0, 0.3);
    }
}

/* Eye dot in the O letter of PLANKTON */
.eye-letter {
    position: relative;
}

.eye-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.12em;
    height: 0.12em;
    background: #ffffff;
    border-radius: 50%;
    box-shadow:
        0 0 4px rgba(255, 255, 255, 0.8),
        0 0 8px rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* Skkkrt animation - driving in fast then braking (from left) */
@keyframes skkkrtInLeft {
    0% {
        opacity: 0;
        transform: translateX(-100%) skewX(25deg);
    }
    20% {
        opacity: 1;
        transform: translateX(-30%) skewX(20deg);
    }
    40% {
        transform: translateX(5%) skewX(-15deg);
    }
    55% {
        transform: translateX(-2%) skewX(8deg);
    }
    70% {
        transform: translateX(1%) skewX(-4deg);
    }
    85% {
        transform: translateX(-0.5%) skewX(2deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) skewX(0deg);
    }
}

/* Skkkrt animation - driving in fast then braking (from right) */
@keyframes skkkrtInRight {
    0% {
        opacity: 0;
        transform: translateX(100%) skewX(-25deg);
    }
    20% {
        opacity: 1;
        transform: translateX(30%) skewX(-20deg);
    }
    40% {
        transform: translateX(-5%) skewX(15deg);
    }
    55% {
        transform: translateX(2%) skewX(-8deg);
    }
    70% {
        transform: translateX(-1%) skewX(4deg);
    }
    85% {
        transform: translateX(0.5%) skewX(-2deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) skewX(0deg);
    }
}

/* Animated states */
.black-line.animate-in {
    animation: skkkrtInLeft 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.1s;
}

.plankton-line {
    /* Initial state - hidden off right */
    transform: translateX(100%) skewX(-25deg);
}

.plankton-line.animate-in {
    animation: skkkrtInRight 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.3s;
}

/* Contract Address at bottom of equipment panel - positioned relative to equipment-panel */
.contract-address-container {
    position: absolute;
    bottom: 6px;
    left: 6px;
    right: 6px;
    height: 50px;
    z-index: 100;
    overflow: visible;
    border-radius: 0 0 6px 6px;
    pointer-events: auto !important;
}

/* Background panel that animates up */
.contract-bg-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #000000;
    border-top: 1px solid rgba(150, 145, 135, 0.5);
    border-radius: 0 0 6px 6px;
    transition: height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.contract-bg-panel.expanded {
    /* Expand to just below PLANKTON title - height set by JS */
    height: var(--bg-panel-expanded-height, 350px);
    pointer-events: auto;
}

/* Text display layer */
.contract-address-text {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 11.5px;
    color: rgba(180, 175, 165, 0.85);
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    align-items: center;
    z-index: 1;
    pointer-events: none;
    transition: color 0.2s ease-out;
}

/* Invisible click area - covers entire container and extends below */
.contract-click-area {
    position: absolute;
    top: 0;
    bottom: -20px;
    left: 0;
    right: 0;
    z-index: 9999;
    cursor: none !important;
    pointer-events: auto !important;
}

/* Clipping container for scroll text */
.contract-address-text .scroll-clip {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Scrolling text wrapper */
.contract-address-text .scroll-wrapper {
    display: flex;
    animation: scrollText 15s linear infinite;
    white-space: nowrap;
}

.contract-address-text .scroll-wrapper.paused {
    animation-play-state: paused;
}

/* Each text copy for seamless loop */
.contract-address-text .scroll-text-item {
    padding: 0 40px;
    white-space: nowrap;
}

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

/* Hover effect - applied via JS class on container */
.contract-address-container.hovering .contract-address-text {
    color: rgba(220, 210, 190, 1);
}

.contract-address-container.hovering .contract-address-text .scroll-text-item {
    text-shadow:
        0 0 10px rgba(255, 230, 180, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Glow effect when clicked - applied to text via JS class on container */
.contract-address-container.glowing .contract-address-text {
    color: rgba(255, 240, 200, 1);
}

.contract-address-container.glowing .contract-address-text .scroll-text-item {
    text-shadow:
        0 0 8px rgba(255, 230, 180, 0.6),
        0 0 16px rgba(255, 220, 150, 0.4),
        0 0 24px rgba(255, 200, 100, 0.2);
}

/* Glitch animation - applied to text element */
.contract-address-container.glitching .contract-address-text {
    animation: textGlitch 0.3s ease-in-out;
}

@keyframes textGlitch {
    0% {
        transform: translateX(0);
        filter: none;
    }
    10% {
        transform: translateX(-2px) skewX(-5deg);
        filter: hue-rotate(90deg);
    }
    20% {
        transform: translateX(2px) skewX(5deg);
        filter: hue-rotate(-90deg) saturate(2);
    }
    30% {
        transform: translateX(-1px);
        filter: brightness(1.5);
        text-shadow:
            -2px 0 rgba(255, 0, 0, 0.5),
            2px 0 rgba(0, 255, 255, 0.5);
    }
    40% {
        transform: translateX(1px) skewX(-2deg);
        filter: contrast(1.5);
    }
    50% {
        transform: translateX(0);
        filter: none;
    }
    60% {
        transform: translateX(2px);
        filter: hue-rotate(45deg);
        text-shadow:
            2px 0 rgba(255, 0, 255, 0.5),
            -2px 0 rgba(0, 255, 0, 0.5);
    }
    70% {
        transform: translateX(-2px) skewX(3deg);
        filter: brightness(0.8);
    }
    80% {
        transform: translateX(1px);
        filter: saturate(0.5);
    }
    90% {
        transform: translateX(-1px);
        filter: hue-rotate(-45deg);
    }
    100% {
        transform: translateX(0);
        filter: none;
    }
}

/* Copied state - shows "Copied!" instead of scrolling address */
.contract-address-container.copied .scroll-clip {
    display: none;
}

.contract-address-text .copied-text {
    display: none;
    width: 100%;
    text-align: center;
    color: rgba(150, 255, 150, 0.9);
    padding: 0 20px;
}

.contract-address-container.copied .copied-text {
    display: block;
}

/* Ensure all children have no cursor */
.contract-address-container,
.contract-address-container * {
    cursor: none !important;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    /* Hide custom cursor on mobile (touch devices) */
    .custom-cursor {
        display: none !important;
    }

    * {
        cursor: auto;
    }

    /* Title adjustments for mobile */
    .title-container {
        padding: 4px 10px;
    }

    .title-line {
        font-size: clamp(28px, 9vw, 50px);
        line-height: 1.05;
    }

    /* Equipment content padding */
    .equipment-content {
        padding: 10px;
    }

    /* Contract address container - account for 4px border on mobile */
    .contract-address-container {
        bottom: 4px;
        left: 4px;
        right: 4px;
    }

    .contract-address-text {
        font-size: 11px;
        height: 45px;
    }

    .contract-click-area {
        height: 45px;
    }

    .contract-bg-panel {
        height: 45px;
    }

    .contract-address-container {
        height: 45px;
    }

    .contract-bg-panel.expanded {
        height: var(--bg-panel-expanded-height, 280px);
    }

    /* Scroll text adjustments */
    .contract-address-text .scroll-text-item {
        padding: 0 20px;
    }

    /* Equipment inner border */
    .equipment-inner {
        border-width: 4px;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .title-line {
        font-size: clamp(22px, 8vw, 40px);
    }

    .title-container {
        padding: 2px 8px;
    }

    .contract-address-text {
        font-size: 10px;
    }

    .contract-bg-panel.expanded {
        height: var(--bg-panel-expanded-height, 220px);
    }
}

/* ================================================
   SOCIAL ICONS ROW
   ================================================ */

/* Main container - positioned below equipment panel using fixed positioning */
.social-carousel {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    /* Position will be set by JS based on equipment panel position */
    top: var(--social-top, 100%);
    width: var(--equipment-width, 400px);
    padding: 0 60px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

.social-carousel.visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Row container - spread icons across full width */
.carousel-orbit {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Individual social icon - larger clickable area (+15% for better touch targets) */
.social-icon {
    width: 77px;
    height: 77px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    position: relative;
    z-index: 20;
    pointer-events: auto !important;
    background: none;
    border: none;
    padding: 14px;
    /* Initial state - hidden for fade in */
    opacity: 0;
    transition: opacity 0.5s ease-out;
    /* Extend clickable area below */
    margin-bottom: -10px;
    padding-bottom: 24px;
    /* Prevent selection highlighting */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Visible state - fade in */
.social-icon.visible {
    opacity: 1;
}

.social-icon img {
    width: 37px;
    height: 37px;
    object-fit: contain;
    display: block;
    /* Match equipment border / contract address color */
    filter: brightness(0.7) sepia(0.2) saturate(0.8);
    transition: filter 0.2s ease-out, transform 0.2s ease-out;
    /* Prevent dragging/selection */
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Glitch hover effect for icons */
.social-icon:hover img,
.social-icon.hovering img {
    filter: brightness(1) sepia(0.1) saturate(1);
}

.social-icon.glitching img {
    animation: iconGlitch 0.3s ease-in-out;
}

@keyframes iconGlitch {
    0% { transform: translateX(0); filter: brightness(0.7) sepia(0.2) saturate(0.8); }
    10% { transform: translateX(-2px) skewX(-5deg); filter: hue-rotate(90deg) brightness(1.2); }
    20% { transform: translateX(2px) skewX(5deg); filter: hue-rotate(-90deg) saturate(2); }
    30% { transform: translateX(-1px); filter: brightness(1.5); }
    40% { transform: translateX(1px) skewX(-2deg); filter: contrast(1.5); }
    50% { transform: translateX(0); filter: brightness(0.7) sepia(0.2) saturate(0.8); }
    60% { transform: translateX(2px); filter: hue-rotate(45deg); }
    70% { transform: translateX(-2px) skewX(3deg); filter: brightness(0.8); }
    80% { transform: translateX(1px); filter: saturate(0.5); }
    90% { transform: translateX(-1px); filter: hue-rotate(-45deg); }
    100% { transform: translateX(0); filter: brightness(0.7) sepia(0.2) saturate(0.8); }
}

/* Buy button styling (+15% padding for better touch targets) */
.buy-button {
    background: transparent;
    border: 2px solid rgba(180, 175, 165, 0.6);
    border-radius: 8px;
    padding: 9px 46px;
    width: auto;
    height: auto;
    min-width: 161px;
    cursor: none;
    /* Prevent text selection cursor */
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

/* Invisible extension for much larger click area */
.buy-button::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -25px;
    right: -25px;
    bottom: -35px;
    background: transparent;
}

.buy-button-text {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 14px;
    color: rgba(180, 175, 165, 0.85);
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: color 0.2s ease-out, text-shadow 0.2s ease-out;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.buy-button:hover,
.buy-button.hovering {
    border-color: rgba(220, 210, 190, 0.8);
}

.buy-button:hover .buy-button-text,
.buy-button.hovering .buy-button-text {
    color: rgba(220, 210, 190, 1);
    text-shadow: 0 0 10px rgba(255, 230, 180, 0.3), 0 1px 2px rgba(0, 0, 0, 0.8);
}

.buy-button.glitching {
    animation: buttonGlitch 0.3s ease-in-out;
}

.buy-button.glitching .buy-button-text {
    animation: textGlitch 0.3s ease-in-out;
}

@keyframes buttonGlitch {
    0% { transform: translateX(0); border-color: rgba(180, 175, 165, 0.6); }
    10% { transform: translateX(-2px); border-color: rgba(255, 100, 100, 0.8); }
    20% { transform: translateX(2px); border-color: rgba(100, 255, 255, 0.8); }
    30% { transform: translateX(-1px); border-color: rgba(255, 255, 100, 0.8); }
    50% { transform: translateX(0); border-color: rgba(180, 175, 165, 0.6); }
    60% { transform: translateX(2px); border-color: rgba(255, 100, 255, 0.8); }
    70% { transform: translateX(-2px); border-color: rgba(100, 255, 100, 0.8); }
    100% { transform: translateX(0); border-color: rgba(180, 175, 165, 0.6); }
}

/* ================================================
   BLACK AREA CONTENT
   ================================================ */

.black-area-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 50px; /* Above contract address bar */
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.black-area-content.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Plankton video container */
.plankton-video-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.plankton-video {
    max-width: 88%;
    max-height: 88%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* Hide video background artifacts against pure black */
    filter: brightness(0.98) contrast(1.05);
    mix-blend-mode: lighten;
}

/* Right side content */
.right-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    pointer-events: auto;
}

/* Inventory grid - 2 rows x 4 columns */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 4px;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.inv-slot {
    width: 89px;
    height: 89px;
    background-image: url('inv_slot.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: none;
    transition: filter 0.2s ease-out;
    /* Ensure slot has proper stacking context for shimmer canvas */
    isolation: isolate;
    /* Explicitly enable pointer events */
    pointer-events: auto !important;
}

.inv-slot:not(.empty):hover,
.inv-slot:not(.empty).active {
    filter: brightness(1.1);
}

/* Default slot image - overridden by .item-image for inventory items */
.inv-slot img:not(.item-image) {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

/* About button */
.about-button {
    position: relative;
    background: none;
    border: none;
    padding: 0;
    cursor: none;
    display: block;
    transition: transform 0.2s ease-out;
}

.about-button-bg {
    width: auto;
    height: auto;
    max-width: 238px;
    display: block;
}

.about-button:hover {
    transform: scale(1.02);
}

.about-button.glitching {
    animation: aboutButtonGlitch 0.3s ease-in-out;
}

@keyframes aboutButtonGlitch {
    0% { transform: translateX(0) scale(1); filter: none; }
    10% { transform: translateX(-3px) scale(1.01); filter: hue-rotate(30deg); }
    20% { transform: translateX(3px) scale(0.99); filter: hue-rotate(-30deg) saturate(1.5); }
    30% { transform: translateX(-2px); filter: brightness(1.2); }
    40% { transform: translateX(2px); filter: contrast(1.2); }
    50% { transform: translateX(0) scale(1); filter: none; }
    60% { transform: translateX(2px); filter: hue-rotate(20deg); }
    70% { transform: translateX(-2px); filter: brightness(0.9); }
    80% { transform: translateX(1px); filter: saturate(0.8); }
    100% { transform: translateX(0) scale(1); filter: none; }
}

/* ================================================
   SOCIAL ICONS RESPONSIVE STYLES
   ================================================ */

@media (max-width: 768px) {
    .social-icon {
        width: 55px;
        height: 55px;
        padding: 7px;
    }

    .social-icon img {
        width: 32px;
        height: 32px;
    }

    .social-carousel {
        padding: 0 40px;
    }

    .buy-button {
        padding: 7px 37px;
        min-width: 138px;
    }

    .buy-button-text {
        font-size: 12px;
    }

    /* Black area content */
    .black-area-content {
        padding: 10px;
        flex-direction: column;
        justify-content: flex-start;
    }

    .plankton-video-container {
        position: absolute;
        top: 50%;
        left: 50%;
        /* Move 5% more upwards (-110% -> -115%) */
        transform: translate(-50%, -115%);
        width: auto;
        height: auto;
        max-height: none;
    }

    .plankton-video {
        max-width: none;
        /* 5% smaller: 213px * 0.95 = 202px */
        max-height: 202px;
        width: auto;
    }

    .right-content {
        position: absolute;
        bottom: 5px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        height: auto;
        padding: 0;
        gap: 12px;
        align-items: center;
    }

    .inv-slot {
        width: 84px;
        height: 84px;
    }

    .inventory-grid {
        gap: 3px;
    }

    .about-button-bg {
        max-width: 208px;
    }
}

@media (max-width: 480px) {
    .social-icon {
        width: 48px;
        height: 48px;
        padding: 6px;
    }

    .social-icon img {
        width: 28px;
        height: 28px;
    }

    .social-carousel {
        padding: 0 20px;
    }

    .buy-button {
        padding: 6px 28px;
        min-width: 115px;
    }

    .buy-button-text {
        font-size: 11px;
    }

    .plankton-video {
        /* 5% smaller: 181px * 0.95 = 172px */
        max-height: 172px;
    }

    .inv-slot {
        width: 70px;
        height: 70px;
    }

    .inventory-grid {
        gap: 2px;
    }

    .about-button-bg {
        max-width: 176px;
    }

    .right-content {
        bottom: 2px;
        gap: 10px;
    }
}

/* ================================================
   INVENTORY SECTION LABELS
   ================================================ */

.inventory-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.inventory-label-top {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 11px;
    color: rgba(180, 175, 165, 0.6);
    text-align: center;
    width: 100%;
    animation: labelShimmerPulse 3s ease-in-out infinite;
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
}

.inventory-label-bottom {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 11px;
    color: rgba(180, 175, 165, 0.6);
    text-align: center;
    animation: labelShimmerPulse 3s ease-in-out infinite;
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
}

@keyframes labelShimmerPulse {
    0%, 100% {
        opacity: 0.5;
        text-shadow: 0 0 2px rgba(255, 255, 255, 0.1);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.25), 0 0 20px rgba(200, 200, 200, 0.15);
    }
}

/* ================================================
   INVENTORY ITEM STYLING
   ================================================ */

/* Item image in slot - sized to fit with drop shadow */
.inv-slot .item-image {
    width: 74% !important;
    height: 74% !important;
    max-width: 74% !important;
    max-height: 74% !important;
    object-fit: contain;
    /* Drop shadow: 120deg angle, reduced by 30% */
    filter: drop-shadow(6px 10px 8px rgba(0, 0, 0, 0.9))
            drop-shadow(3px 5px 6px rgba(0, 0, 0, 0.7)) !important;
    transition: transform 0.2s ease-out, filter 0.2s ease-out;
    position: relative;
    z-index: 1;
    display: block !important;
    /* Let events pass through to parent slot */
    pointer-events: none;
}

.inv-slot:hover .item-image,
.inv-slot.active .item-image {
    transform: scale(1.08);
}

.inv-slot.empty {
    opacity: 0.5;
}

/* Item shimmer canvas overlay */
.item-shimmer-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    /* Ensure canvas is visible above item */
    mix-blend-mode: screen;
}

/* ================================================
   ITEM TOOLTIP - MEDIEVAL PAPER AESTHETIC
   ================================================ */

.item-tooltip {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.item-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-paper {
    background: linear-gradient(135deg, #d4c4a8, #e8dcc8 20%, #c9b898 60%, #e0d4bc);
    border: 3px solid #8b7355;
    border-radius: 4px;
    padding: 16px 20px;
    min-width: 220px;
    max-width: 280px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(139, 115, 85, 0.2);
    position: relative;
}

/* Aged paper texture overlay */
.tooltip-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.08;
    pointer-events: none;
    border-radius: 2px;
}

.tooltip-name {
    font-family: 'MedievalSharp', cursive;
    font-size: 18px;
    color: #3d2914;
    margin-bottom: 6px;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
}

.tooltip-rarity {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 11px;
    color: #5c4a32;
    margin-bottom: 10px;
    position: relative;
}

.rarity-label {
    color: #5c4a32;
}

.rarity-value {
    font-weight: bold;
}

/* Rarity colors */
.rarity-value.common { color: #4a4a4a; }
.rarity-value.rare { color: #2563eb; }
.rarity-value.epic { color: #7c3aed; }
.rarity-value.legendary {
    color: #d97706;
}

/* Item Set styling */
.tooltip-item-set {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 11px;
    color: #5c4a32;
    margin-bottom: 6px;
    position: relative;
}

.item-set-label {
    color: #22c55e;
}

.item-set-name {
    color: #22c55e;
    font-weight: bold;
}

.item-set-progress {
    color: #5c4a32;
    margin-left: 4px;
}

.tooltip-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #8b7355 20%, #8b7355 80%, transparent);
    margin: 10px 0;
    position: relative;
}

.tooltip-pair {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 13px;
    color: #4a3c28;
    text-align: center;
    letter-spacing: 1px;
    margin-bottom: 8px;
    position: relative;
}

.tooltip-stats {
    margin-bottom: 10px;
    position: relative;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 11px;
    color: #5c4a32;
    margin-bottom: 4px;
}

.stat-row span:last-child {
    color: #3d2914;
    font-weight: bold;
}

.tooltip-description {
    font-family: 'MedievalSharp', cursive;
    font-size: 12px;
    font-weight: 500;
    color: #5c4a32;
    font-style: italic;
    line-height: 1.4;
    border-top: 1px dashed rgba(139, 115, 85, 0.4);
    padding-top: 8px;
    margin-top: 8px;
    position: relative;
    text-shadow: 0.3px 0 0 currentColor;
}

/* Lore hint section */
.tooltip-lore-hint {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 10px;
    color: rgba(92, 74, 50, 0.7);
    margin-top: 6px;
    font-style: italic;
}

/* ================================================
   INVENTORY & TOOLTIP RESPONSIVE STYLES
   ================================================ */

@media (max-width: 768px) {
    .inventory-label-top {
        font-size: 10px;
    }

    .inventory-label-bottom {
        font-size: 10px;
    }

    .tooltip-paper {
        padding: 12px 16px;
        min-width: 200px;
    }

    .tooltip-name {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .inventory-label-top {
        font-size: 9px;
    }

    .inventory-label-bottom {
        font-size: 9px;
    }

    .tooltip-paper {
        padding: 10px 14px;
        min-width: 180px;
    }

    .tooltip-name {
        font-size: 14px;
    }

    .tooltip-rarity,
    .stat-row {
        font-size: 10px;
    }
}

/* ================================================
   ABOUT PAGE STYLING
   ================================================ */

/* When about page is shown, titles fade out and black area expands to fill */
.title-container.about-mode {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
    position: absolute;
    z-index: -1;
}

.contract-bg-panel.about-mode {
    /* Expand to cover the ENTIRE equipment panel interior from top to bottom */
    /* Use only height expansion from bottom, don't change top positioning */
    bottom: 0 !important;
    height: 100% !important;
    border-top: none;
    border-radius: 6px;
    transition: height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-radius 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* About page content container - hidden by default */
.about-page-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 50px; /* Leave room for contract address */
    display: flex;
    flex-direction: row;
    padding: 20px 15px 20px 15px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease-out 0.3s, visibility 0.4s ease-out 0.3s;
    overflow: visible;
}

.about-page-content.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Fade out faster when hiding */
.about-page-content.hiding {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

/* Left side - trident image and back button */
.about-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 200px;
    min-width: 180px;
    padding: 30px 0 0 0;
    height: 100%;
}

.about-trident {
    /* 1.3x scale on PC */
    max-height: 65%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.8));
    transform: scale(1.3);
    transform-origin: center center;
    margin-top: 10px;
}

/* Back button - positioned at bottom of about-page-content, aligned with team icons */
.back-button {
    position: absolute;
    bottom: 25px;
    left: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #000000;
    border: 2px solid rgba(180, 175, 165, 0.6);
    border-radius: 8px;
    padding: 14px 36px;
    cursor: none;
    transition: border-color 0.2s ease-out, transform 0.2s ease-out;
    z-index: 200;
}

/* Invisible extension for larger click area - using ::after pseudo-element */
.back-button::after {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -30px;
    background: transparent;
}

/* Desktop/mobile visibility classes */
.back-button.mobile-only {
    display: none;
}

.back-button.desktop-only {
    display: flex;
}

.back-button:hover {
    border-color: rgba(220, 210, 190, 0.8);
    transform: scale(1.02);
}

.back-arrow {
    font-size: 18px;
    color: rgba(180, 175, 165, 0.85);
    transition: color 0.2s ease-out, transform 0.2s ease-out;
}

.back-button:hover .back-arrow {
    color: rgba(220, 210, 190, 1);
    transform: translateX(-3px);
}

.back-text {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 12px;
    font-weight: normal;
    color: rgba(180, 175, 165, 0.85);
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: color 0.2s ease-out;
}

.back-button:hover .back-text {
    color: rgba(220, 210, 190, 1);
    text-shadow: 0 0 10px rgba(255, 230, 180, 0.3), 0 1px 2px rgba(0, 0, 0, 0.8);
}

.back-button.glitching {
    animation: buttonGlitch 0.3s ease-in-out;
}

/* Right side - about text and team */
.about-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px 25px 20px 15px;
    overflow: visible;
    height: 100%;
    position: relative;
}

.about-text-container {
    flex: 0 0 auto;
}

.about-title {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.4;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.about-text {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 12px;
    color: rgba(180, 175, 165, 0.85);
    line-height: 1.7;
    letter-spacing: 0.3px;
}

.about-text p {
    margin-bottom: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Divider line */
.about-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
    margin: 12px 0 10px 0;
    flex-shrink: 0;
}

/* Team section - below divider, pushed to bottom with margin-top: auto */
.team-section {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 0;
    padding-top: 10px;
    padding-bottom: 20px; /* Extra clickable area at bottom */
    margin-top: auto; /* Push to bottom of flex container */
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease-out;
    cursor: none;
    padding: 5px;
    padding-bottom: 15px; /* Extra click area below */
    margin: -5px;
    margin-bottom: -15px;
}

.team-link:hover {
    transform: scale(1.08);
}

.team-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(180, 175, 165, 0.4);
    transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}

.team-link:hover .team-avatar {
    border-color: rgba(220, 210, 190, 0.8);
    box-shadow: 0 0 15px rgba(255, 230, 180, 0.3);
}

.team-name {
    font-family: 'SpecialGothicExpanded', monospace;
    font-size: 9px;
    color: rgba(180, 175, 165, 0.7);
    margin-top: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: color 0.2s ease-out;
}

.team-link:hover .team-name {
    color: rgba(220, 210, 190, 1);
}

/* ================================================
   ABOUT PAGE RESPONSIVE STYLES
   ================================================ */

@media (max-width: 768px) {
    .about-page-content {
        flex-direction: column;
        padding: 8px 10px 10px 10px;
        bottom: 50px;
        overflow: hidden;
    }

    .about-left {
        flex-direction: row;
        width: 100%;
        min-width: unset;
        height: auto;
        justify-content: flex-start;
        align-items: center;
        padding: 0 0 5px 0;
        gap: 0;
        flex-shrink: 0;
    }

    .about-trident {
        /* 2x horizontal on mobile, positioned in its own space right of back button */
        max-height: none;
        height: 45px;
        width: auto;
        max-width: 160px;
        transform: rotate(90deg) scale(4.5);
        transform-origin: center center;
        margin-top: 0;
        margin-left: 138px;
    }

    .back-button.desktop-only {
        display: none;
    }

    .back-button.mobile-only {
        display: flex;
        position: relative;
        bottom: auto;
        left: auto;
        padding: 10px 20px;
        padding-bottom: 10px;
        margin-bottom: 0;
        z-index: 100;
        background: #000000;
        flex-shrink: 0;
    }

    .back-arrow {
        font-size: 14px;
    }

    .back-text {
        font-size: 10px;
    }

    .about-right {
        padding: 18px 8px 8px 8px;
        overflow: hidden;
        height: auto;
        flex: 1;
    }

    .about-title {
        font-size: 12px;
        font-weight: normal;
        margin-bottom: 10px;
        text-align: center;
    }

    .about-text {
        font-size: 10px;
        font-weight: normal;
        line-height: 1.6;
    }

    .about-text p {
        margin-bottom: 10px;
    }

    .about-divider {
        margin: 12px 0;
        background: rgba(255, 255, 255, 0.3);
    }

    .team-section {
        position: relative;
        bottom: auto;
        right: auto;
        left: auto;
        justify-content: space-between;
        margin-top: auto;
        padding-bottom: 10px;
    }

    .team-avatar {
        width: 32px;
        height: 32px;
    }

    .team-name {
        font-size: 8px;
        margin-top: 3px;
    }

    .contract-bg-panel.about-mode {
        height: 100% !important;
    }
}

@media (max-width: 480px) {
    .about-page-content {
        padding: 6px 8px;
        overflow: hidden;
    }

    .about-left {
        padding: 0 0 3px 0;
        gap: 0;
    }

    .about-trident {
        height: 40px;
        max-width: 135px;
        transform: rotate(90deg) scale(4.5);
        margin-left: 115px;
    }

    .back-button.mobile-only {
        padding: 8px 14px;
    }

    .back-arrow {
        font-size: 12px;
    }

    .back-text {
        font-size: 9px;
    }

    .about-title {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .about-text {
        font-size: 9px;
        line-height: 1.5;
    }

    .about-text p {
        margin-bottom: 8px;
    }

    .about-divider {
        margin: 10px 0;
    }

    .team-section {
        position: relative;
        bottom: auto;
        right: auto;
        left: auto;
        justify-content: space-between;
        padding-bottom: 8px;
    }

    .team-avatar {
        width: 28px;
        height: 28px;
    }

    .team-name {
        font-size: 7px;
    }
}

