/* ═══════════════════════════════════════════════════════════════════════════
   CULTURE - NFT Character Viewer
   WoW/Diablo Inspired Fantasy RPG Interface
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   FONTS
   ═══════════════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Cinzel+Decorative:wght@400;700&family=MedievalSharp&family=Fira+Code:wght@400;500&display=swap');

/* ═══════════════════════════════════════════════════════════════════════════
   CSS VARIABLES
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
    /* Background Colors */
    --bg-deep: #0a0a12;
    --bg-primary: #0f0f1a;
    --bg-panel: #1a1a2e;
    --bg-panel-dark: #12121f;
    --bg-slot: #252536;
    --bg-slot-hover: #2d2d42;

    /* Stone/Panel Colors */
    --stone-dark: #2a2833;
    --stone-mid: #3d3a4a;
    --stone-light: #4a4658;
    --stone-highlight: #5a5670;

    /* Gold Palette */
    --gold-dark: #8b6914;
    --gold-primary: #c9a227;
    --gold-light: #f4d03f;
    --gold-pale: #ffeaa7;
    --gold-glow: rgba(201, 162, 39, 0.4);

    /* Text Colors */
    --text-parchment: #f5e6c8;
    --text-cream: #e8dcc8;
    --text-faded: #a08c5b;
    --text-dim: #6b6b7b;

    /* Accent Colors */
    --eth-purple: #8b5cf6;
    --eth-purple-dark: #6d28d9;
    --eth-purple-glow: rgba(139, 92, 246, 0.3);
    --success: #4ade80;
    --success-dark: #22c55e;
    --danger: #ef4444;
    --danger-dark: #dc2626;

    /* Tier Colors */
    --tier-1: #5c5c5c; /* Plankton - murky */
    --tier-2: #7a6b4a; /* Shrimp - dingy */
    --tier-3: #4a7a9a; /* Fish - ocean */
    --tier-4: #4a9a7a; /* Crab - reef */
    --tier-5: #7a4a9a; /* Octopus - deep */
    --tier-6: #2a5a9a; /* Shark - powerful */
    --tier-7: #c9a227; /* Whale - golden */

    /* Borders & Effects */
    --border-gold: 2px solid var(--gold-primary);
    --border-gold-thin: 1px solid var(--gold-dark);
    --border-stone: 2px solid var(--stone-mid);
    --shadow-gold: 0 0 20px var(--gold-glow);
    --shadow-panel: 0 10px 40px rgba(0, 0, 0, 0.6);
    --shadow-inset: inset 0 2px 8px rgba(0, 0, 0, 0.5);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        url('darkforest.jpg') center center / cover no-repeat fixed,
        var(--bg-deep);
    font-family: 'Cinzel', Georgia, serif;
    color: var(--text-parchment);
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.5;
}

/* Stone texture overlay for panels */
.stone-texture {
    background-image:
        radial-gradient(ellipse at 20% 30%, rgba(90, 86, 112, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(90, 86, 112, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
}

/* Gold ornate border mixin-like class */
.ornate-border {
    border: var(--border-gold);
    box-shadow:
        var(--shadow-gold),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BACKGROUNDS - Animated Mist
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes mistDrift {
    0%, 100% { transform: translateX(0) translateY(0); opacity: 0.3; }
    50% { transform: translateX(30px) translateY(-20px); opacity: 0.5; }
}

@keyframes mistDrift2 {
    0%, 100% { transform: translateX(0) translateY(0); opacity: 0.2; }
    50% { transform: translateX(-40px) translateY(10px); opacity: 0.4; }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

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

@keyframes barFill {
    0% { width: 0; }
    100% { width: var(--fill-width, 0%); }
}

@keyframes verdictSlam {
    0% { transform: scale(3) translateY(-50px); opacity: 0; }
    70% { transform: scale(1.1) translateY(5px); }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes screenShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ATMOSPHERIC EFFECTS - Dark Forest Ambiance
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes fogDrift {
    0% { transform: translateX(0) translateY(0); opacity: 0.15; }
    25% { transform: translateX(20px) translateY(-10px); opacity: 0.25; }
    50% { transform: translateX(10px) translateY(5px); opacity: 0.2; }
    75% { transform: translateX(-15px) translateY(-5px); opacity: 0.3; }
    100% { transform: translateX(0) translateY(0); opacity: 0.15; }
}

@keyframes fogDriftReverse {
    0% { transform: translateX(0) translateY(0); opacity: 0.2; }
    25% { transform: translateX(-25px) translateY(10px); opacity: 0.3; }
    50% { transform: translateX(-10px) translateY(-8px); opacity: 0.15; }
    75% { transform: translateX(20px) translateY(5px); opacity: 0.25; }
    100% { transform: translateX(0) translateY(0); opacity: 0.2; }
}

@keyframes torchFlicker {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    10% { opacity: 0.35; transform: scale(1.02); }
    20% { opacity: 0.25; transform: scale(0.98); }
    30% { opacity: 0.4; transform: scale(1.03); }
    40% { opacity: 0.28; transform: scale(0.99); }
    50% { opacity: 0.35; transform: scale(1.01); }
    60% { opacity: 0.32; transform: scale(1); }
    70% { opacity: 0.38; transform: scale(1.02); }
    80% { opacity: 0.26; transform: scale(0.98); }
    90% { opacity: 0.33; transform: scale(1.01); }
}

.atmosphere-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Fog elements */
.fog {
    position: absolute;
    background: radial-gradient(ellipse at center,
        rgba(20, 20, 35, 0.6) 0%,
        rgba(15, 15, 26, 0.3) 40%,
        transparent 70%);
    filter: blur(30px);
}

.fog-left {
    left: -100px;
    top: 0;
    width: 400px;
    height: 100%;
    animation: fogDrift 15s ease-in-out infinite;
}

.fog-right {
    right: -100px;
    top: 0;
    width: 400px;
    height: 100%;
    animation: fogDriftReverse 18s ease-in-out infinite;
}

.fog-bottom {
    left: 0;
    right: 0;
    bottom: -50px;
    height: 200px;
    background: linear-gradient(to top,
        rgba(10, 10, 18, 0.8) 0%,
        rgba(15, 15, 26, 0.4) 50%,
        transparent 100%);
    animation: fogDrift 20s ease-in-out infinite;
}

/* Torch glow effects */
.torch-glow {
    position: absolute;
    width: 300px;
    height: 400px;
    background: radial-gradient(ellipse at center,
        rgba(255, 147, 41, 0.15) 0%,
        rgba(255, 100, 20, 0.08) 30%,
        transparent 60%);
    filter: blur(20px);
    animation: torchFlicker 3s ease-in-out infinite;
}

.torch-glow-left {
    left: -50px;
    top: 50px;
    animation-delay: 0s;
}

.torch-glow-right {
    right: -50px;
    top: 100px;
    animation-delay: 1.5s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONNECT SCREEN - Mysterious Entry
   ═══════════════════════════════════════════════════════════════════════════ */
.connect-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background:
        url('darkforest.jpg') center center / cover no-repeat fixed,
        var(--bg-deep);
    overflow: hidden;
}

/* Mist layers */
.connect-screen::before,
.connect-screen::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    pointer-events: none;
}

.connect-screen::before {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
    animation: mistDrift 20s ease-in-out infinite;
}

.connect-screen::after {
    background:
        radial-gradient(ellipse at 60% 30%, rgba(201, 162, 39, 0.04) 0%, transparent 40%),
        radial-gradient(ellipse at 40% 70%, rgba(201, 162, 39, 0.03) 0%, transparent 35%);
    animation: mistDrift2 25s ease-in-out infinite;
}

/* Ornate outer frame */
.connect-screen-frame {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px solid var(--gold-dark);
    opacity: 0.3;
    pointer-events: none;
}

.connect-screen-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid var(--gold-dark);
}

.connect-container {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    max-width: 520px;
    position: relative;
    z-index: 1;
}

/* ETH Diamond Container */
.creature-silhouette {
    width: 180px;
    height: 220px;
    margin: 0 auto var(--space-sm);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

/* ETH Diamond glow background */
.creature-silhouette::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(ellipse at center, rgba(98, 126, 234, 0.4) 0%, rgba(98, 126, 234, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    animation: ethGlowPulse 3s ease-in-out infinite;
    z-index: 0;
}

@keyframes ethGlowPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* Rotating 3D ETH Diamond */
.eth-diamond-3d {
    width: 110px;
    height: 180px;
    transform-style: preserve-3d;
    animation: diamondRotate3d 8s ease-in-out infinite, float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 25px rgba(98, 126, 234, 0.7)) drop-shadow(0 0 50px rgba(98, 126, 234, 0.3));
    z-index: 1;
}

.eth-diamond-3d svg {
    width: 100%;
    height: 100%;
}

@keyframes diamondRotate3d {
    0% { transform: rotateY(0deg) rotateX(5deg); }
    25% { transform: rotateY(90deg) rotateX(0deg); }
    50% { transform: rotateY(180deg) rotateX(-5deg); }
    75% { transform: rotateY(270deg) rotateX(0deg); }
    100% { transform: rotateY(360deg) rotateX(5deg); }
}

/* Firefly floaters */
.fireflies-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 150;
    overflow: hidden;
}

.firefly {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    opacity: 0;
    animation: fireflyFloat 6s ease-in-out infinite;
}

.firefly.gold {
    background: var(--gold-primary);
    box-shadow: 0 0 8px var(--gold-primary), 0 0 15px var(--gold-primary);
}

.firefly.blue {
    background: #627EEA;
    box-shadow: 0 0 8px #627EEA, 0 0 15px #627EEA;
}

@keyframes fireflyFloat {
    0%, 100% {
        opacity: 0;
        transform: translate(0, 0);
    }
    25% { opacity: 0.8; }
    50% {
        opacity: 0.4;
        transform: translate(var(--dx), var(--dy));
    }
    75% { opacity: 0.9; }
}

/* Logo */
.connect-logo {
    margin-bottom: var(--space-lg);
}

.connect-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--gold-light);
    text-shadow:
        0 0 40px var(--gold-glow),
        0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: var(--space-sm);
    animation: shimmer 4s ease-in-out infinite;
}

/* Flaming CULTURE title image */
.connect-title-img {
    max-width: 600px;
    width: 95%;
    height: auto;
    margin-bottom: var(--space-md);
}

.connect-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    color: var(--gold-dark);
    font-size: 14px;
}

.connect-divider::before,
.connect-divider::after {
    content: '';
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}

.connect-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 400;
    font-style: italic;
    color: var(--text-faded);
    margin-bottom: var(--space-2xl);
    letter-spacing: 1px;
}

/* Fantasy Button */
.fantasy-btn {
    position: relative;
    background: linear-gradient(180deg, var(--stone-mid) 0%, var(--stone-dark) 100%);
    color: var(--gold-light);
    border: 2px solid var(--gold-primary);
    padding: 18px 48px;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.fantasy-btn::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px solid var(--gold-dark);
    opacity: 0.5;
    pointer-events: none;
}

.fantasy-btn:hover {
    background: linear-gradient(180deg, var(--stone-light) 0%, var(--stone-mid) 100%);
    border-color: var(--gold-light);
    box-shadow:
        0 6px 30px rgba(201, 162, 39, 0.3),
        0 0 20px var(--gold-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.fantasy-btn:active {
    transform: translateY(0);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Decorative corner accents on button */
.fantasy-btn .corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--gold-primary);
}

.fantasy-btn .corner-tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.fantasy-btn .corner-tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.fantasy-btn .corner-bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.fantasy-btn .corner-br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.connect-note {
    margin-top: var(--space-md);
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* Access Code Gate */
.access-code-section {
    margin-top: var(--space-lg);
}

.access-code-label {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-faded);
    margin-bottom: var(--space-md);
}

.access-code-input-group {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

.access-code-input {
    width: 200px;
    background: var(--bg-panel-dark);
    border: 1px solid var(--stone-mid);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: var(--text-parchment);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    outline: none;
    transition: all var(--transition-fast);
}

.access-code-input::placeholder {
    color: var(--text-dim);
    text-transform: none;
    letter-spacing: 1px;
}

.access-code-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px var(--gold-glow);
}

.access-code-btn {
    background: linear-gradient(180deg, var(--stone-mid) 0%, var(--stone-dark) 100%);
    border: 1px solid var(--gold-dark);
    color: var(--gold-primary);
    padding: 12px 24px;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.access-code-btn:hover {
    background: linear-gradient(180deg, var(--stone-light) 0%, var(--stone-mid) 100%);
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px var(--gold-glow);
}

.access-code-error {
    margin-top: var(--space-sm);
    font-family: 'Cinzel', serif;
    font-size: 12px;
    color: var(--danger);
    animation: shake 0.3s ease;
}

.access-code-hint {
    margin-top: var(--space-lg);
    font-family: 'Cinzel', serif;
    font-size: 11px;
    color: var(--text-dim);
}

.access-code-hint a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.access-code-hint a:hover {
    color: var(--gold-light);
    text-shadow: 0 0 10px var(--gold-glow);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Wallet section (shown after access code) */
.wallet-section {
    margin-top: var(--space-lg);
    animation: fadeSlideIn 0.5s ease;
}

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

/* Manual wallet check section */
.check-wallet-section {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(201, 162, 39, 0.2);
}

.check-wallet-divider {
    font-size: 12px;
    color: var(--text-faded);
    margin-bottom: var(--space-md);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.check-wallet-input-group {
    display: flex;
    gap: var(--space-sm);
}

.wallet-input {
    flex: 1;
    background: var(--bg-panel-dark);
    border: 1px solid var(--stone-mid);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: var(--text-parchment);
    outline: none;
    transition: all var(--transition-fast);
}

.wallet-input::placeholder {
    color: var(--text-dim);
}

.wallet-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 10px var(--gold-glow);
}

.check-wallet-btn {
    background: transparent;
    border: 1px solid var(--gold-dark);
    color: var(--gold-primary);
    padding: 12px 24px;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.check-wallet-btn:hover {
    background: rgba(201, 162, 39, 0.1);
    border-color: var(--gold-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANALYSIS SCREEN - Reputation Score Cascade
   ═══════════════════════════════════════════════════════════════════════════ */
.analysis-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background:
        url('darkforest.jpg') center center / cover no-repeat fixed,
        var(--bg-deep);
}

.analysis-container {
    text-align: center;
    padding: var(--space-2xl);
    max-width: 600px;
    width: 100%;
}

.analysis-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: var(--space-md);
    text-shadow: 0 0 20px var(--gold-glow);
}

.analysis-address {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: var(--text-faded);
    margin-bottom: var(--space-xl);
    word-break: break-all;
}

/* Loading roast text box */
.roast-display {
    background: var(--bg-panel-dark);
    border: 1px solid var(--stone-mid);
    border-left: 3px solid var(--gold-primary);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-md);
    text-align: left;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: var(--success);
    min-height: 24px;
}

.roast-display::before {
    content: '> ';
    color: var(--gold-primary);
}

/* Scanning text - blinks */
.scanning-text {
    color: var(--success);
}

.scanning-text.scanning {
    animation: scanningTextPulse 2.5s ease-in-out infinite;
}

@keyframes scanningTextPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.15;
    }
}

/* Roast text below box - green, no blinking */
.roast-text {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: var(--success);
    text-align: center;
    min-height: 24px;
    margin-bottom: var(--space-xl);
}

/* Degen Metrics Panel */
.metrics-panel {
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-dark) 100%);
    border: var(--border-gold);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    position: relative;
}

.metrics-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.metrics-title {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold-primary);
    margin-bottom: var(--space-md);
}

.metric-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
    opacity: 0;
    transform: translateX(-50px);
}

.metric-row.visible {
    animation: statSlideIn 0.5s ease forwards;
}

.metric-label {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    color: var(--text-cream);
    width: 140px;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-bar {
    flex: 1;
    height: 20px;
    background: var(--bg-slot);
    border: 1px solid var(--stone-mid);
    position: relative;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--eth-purple-dark), var(--eth-purple));
    width: 0;
    transition: width 1s ease;
}

.metric-fill.success { background: linear-gradient(90deg, var(--success-dark), var(--success)); }
.metric-fill.danger { background: linear-gradient(90deg, var(--danger-dark), var(--danger)); }
.metric-fill.gold { background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }

.metric-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'MedievalSharp', cursive;
    font-size: 14px;
    color: var(--text-parchment);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Verdict Display */
.verdict-container {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.5s ease;
}

.verdict-container.visible {
    opacity: 1;
    transform: scale(1);
}

.verdict-label {
    font-family: 'Cinzel Decorative', serif;
    font-size: 20px;
    color: var(--gold-primary);
    letter-spacing: 4px;
    margin-bottom: var(--space-sm);
}

.verdict-tier {
    font-family: 'Cinzel Decorative', serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--gold-light);
    text-shadow: 0 0 30px var(--gold-glow);
    margin-bottom: var(--space-md);
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--stone-mid);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Legacy classes for JS compatibility */
.analysis-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.analysis-step {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: var(--success);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN APP CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    padding: 0 var(--space-lg) var(--space-xl);
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Main content: CSS Grid for precise layout */
.main-content-row {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    gap: var(--space-lg) var(--space-xl);
    justify-content: center;
    position: relative;
    z-index: 200;
}

/* Top stats row: column 1, row 1 - spans full width of character card */
.top-stats-row {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: stretch;
    gap: var(--space-md);
}

/* Right stats row: column 2, row 1 - above Inventory (2 rows of 3) */
.right-stats-row {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr 1fr;
    gap: var(--space-sm);
    align-content: stretch;
}

.right-stats-row .stat-box {
    min-width: unset;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Character card: column 1, row 2 */
.character-card {
    grid-column: 1;
    grid-row: 2;
}

/* Inventory panel: column 2, row 2 - aligns with character card color border */
.inventory-panel {
    grid-column: 2;
    grid-row: 2;
    align-self: stretch;
    margin-top: -12px;    /* Align with ::before border top */
    margin-bottom: -12px; /* Align with ::before border bottom */
    min-height: 0;       /* Allow shrinking for overflow scroll */
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER - Ornate Fantasy Style
   ═══════════════════════════════════════════════════════════════════════════ */
.wallet-header {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    z-index: 200;
}

/* Full-width background that extends beyond container */
.wallet-header::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-dark) 100%);
    border-bottom: 2px solid var(--gold-dark);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* Gold accent line */
.wallet-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.wallet-address {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: var(--text-faded);
    background: var(--bg-panel-dark);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--stone-mid);
    border-radius: var(--radius-sm);
}

.wallet-networth {
    font-family: 'MedievalSharp', cursive;
    font-size: 22px;
    font-weight: 700;
    color: var(--gold-light);
    text-shadow: 0 0 10px var(--gold-glow);
}

.quick-check-group {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.quick-wallet-input {
    width: 260px;
    background: var(--bg-panel-dark);
    border: 1px solid var(--stone-mid);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: var(--text-parchment);
    outline: none;
    transition: all var(--transition-fast);
}

.quick-wallet-input::placeholder {
    color: var(--text-dim);
}

.quick-wallet-input:focus {
    border-color: var(--gold-primary);
}

.quick-check-btn,
.randomize-btn {
    background: transparent;
    border: 1px solid var(--gold-dark);
    color: var(--gold-primary);
    padding: var(--space-sm) var(--space-md);
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-check-btn:hover,
.randomize-btn:hover {
    background: rgba(201, 162, 39, 0.15);
    border-color: var(--gold-primary);
    box-shadow: 0 0 10px var(--gold-glow);
}

.randomize-btn {
    background: linear-gradient(180deg, var(--stone-mid) 0%, var(--stone-dark) 100%);
    border: 1px solid var(--gold-primary);
}

.disconnect-btn {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: var(--space-sm) var(--space-md);
    font-family: 'Cinzel', serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.disconnect-btn:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Header actions group */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-btn {
    background: transparent;
    border: 1px solid var(--stone-mid);
    color: var(--text-faded);
    padding: var(--space-sm) var(--space-md);
    font-family: 'Cinzel', serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.header-btn.about-btn {
    border-color: var(--gold-dark);
    color: var(--gold-primary);
}

.header-btn.about-btn:hover {
    background: rgba(201, 162, 39, 0.1);
    box-shadow: 0 0 10px var(--gold-glow);
}

.header-btn.x-btn {
    padding: var(--space-sm);
    border-color: var(--stone-mid);
}

.header-btn.x-btn:hover {
    border-color: var(--text-parchment);
    color: var(--text-parchment);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ABOUT MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-overlay.hidden {
    display: none;
}

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

.modal-content {
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-dark) 100%);
    border: 2px solid var(--gold-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 40px var(--gold-glow), 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-panel-dark);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}

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

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: transparent;
    border: none;
    color: var(--text-faded);
    font-size: 28px;
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-close:hover {
    color: var(--gold-primary);
    transform: scale(1.1);
}

.modal-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 24px;
    color: var(--gold-light);
    text-align: center;
    margin-bottom: var(--space-lg);
    text-shadow: 0 0 15px var(--gold-glow);
}

.modal-body {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-cream);
}

.modal-body p {
    margin-bottom: var(--space-md);
}

.modal-body h3 {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.modal-body ul {
    margin: var(--space-sm) 0 var(--space-md) var(--space-lg);
    padding: 0;
}

.modal-body li {
    margin-bottom: var(--space-xs);
}

.modal-body strong {
    color: var(--gold-light);
}

/* Yellow highlight for key info */
.modal-body .highlight {
    color: #ffd700;
    font-weight: 600;
}

/* Tier list styling */
.modal-body .tier-list {
    list-style: none;
    margin: var(--space-sm) 0 var(--space-md) 0;
    padding: 0;
}

.modal-body .tier-list li {
    margin-bottom: var(--space-xs);
    padding-left: var(--space-sm);
    position: relative;
}

.modal-body .tier-list li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--gold-dark);
}

/* Highlight box for emphasis */
.modal-body .highlight-box {
    text-align: center;
    margin: var(--space-md) 0;
}

.modal-footer-text {
    font-style: italic;
    color: var(--text-faded);
    font-size: 13px;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--stone-mid);
}

.modal-footer {
    margin-top: var(--space-lg);
    text-align: center;
}

.modal-social-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--gold-primary);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--gold-dark);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-social-link:hover {
    background: rgba(201, 162, 39, 0.1);
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px var(--gold-glow);
}

/* ═══════════════════════════════════════════════════════════════════════════
   D&D STATS PANEL - Classic Character Sheet
   ═══════════════════════════════════════════════════════════════════════════ */
.dnd-stats-panel {
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-dark) 100%);
    border: 2px solid var(--gold-dark);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    min-width: 280px;
    flex: 1; /* Stretch to fill remaining width in top-stats-row */
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dnd-stats-title {
    text-align: center;
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--gold-light);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.dnd-title-decoration {
    color: var(--gold-primary);
    font-size: 10px;
}

.dnd-stats-grid {
    display: flex;
    justify-content: space-between;
    gap: var(--space-xs);
}

.dnd-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm);
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
    border: 1px solid var(--stone-mid);
    border-radius: var(--radius-sm);
    flex: 1; /* Equal width for all stat boxes */
    min-width: 48px;
    transition: all var(--transition-fast);
    position: relative;
}

.dnd-stat:hover {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.2);
}

.dnd-stat-icon {
    font-size: 16px;
    margin-bottom: 2px;
    filter: grayscale(30%);
}

.dnd-stat-value {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-parchment);
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dnd-stat-name {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--gold-primary);
    margin-top: 2px;
}

.dnd-stat-label {
    font-family: 'Cinzel', serif;
    font-size: 8px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Stat-specific colors on hover */
.dnd-stat[data-stat="str"]:hover .dnd-stat-value { color: #ef4444; }
.dnd-stat[data-stat="int"]:hover .dnd-stat-value { color: #3b82f6; }
.dnd-stat[data-stat="wis"]:hover .dnd-stat-value { color: #a855f7; }
.dnd-stat[data-stat="dex"]:hover .dnd-stat-value { color: #22c55e; }
.dnd-stat[data-stat="cha"]:hover .dnd-stat-value { color: #f59e0b; }

/* High stat glow effect */
.dnd-stat.high-stat {
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px var(--gold-glow);
}

.dnd-stat.high-stat .dnd-stat-value {
    color: var(--gold-light);
    text-shadow: 0 0 10px var(--gold-glow);
}

/* Level display */
.dnd-total-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--stone-mid);
    text-align: center;
}

.dnd-level-label {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    letter-spacing: 4px;
    color: var(--text-faded);
}

.dnd-level-value {
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--gold-light);
    text-shadow: 0 0 20px var(--gold-glow);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHARACTER PANEL - Trading Card Layout
   ═══════════════════════════════════════════════════════════════════════════ */
.character-panel {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

/* Stat boxes - stacked vertically on the left */
.wallet-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    flex-shrink: 0;
}

/* Make the last stat box (Transactions) stretch to fill remaining height */
.wallet-stats .stat-box:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-box {
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-dark) 100%);
    border: 1px solid var(--stone-mid);
    padding: var(--space-md) var(--space-lg);
    text-align: center;
    min-width: 140px;
}

.stat-box.gas-burned {
    border-color: var(--danger);
    border-left: 3px solid var(--danger);
}

.stat-box.thirty-day-change {
    border-color: var(--eth-purple);
    border-left: 3px solid var(--eth-purple);
    min-width: 220px;
}

/* New stat boxes */
.stat-box.transactions-stat {
    border-color: var(--gold-primary);
    border-left: 3px solid var(--gold-primary);
}

.stat-box.wallet-age-stat {
    border-color: var(--success);
    border-left: 3px solid var(--success);
}

.stat-box.contracts-stat {
    border-color: #f59e0b; /* amber */
    border-left: 3px solid #f59e0b;
}

.stat-box.total-eth-stat {
    border-color: #60a5fa; /* blue */
    border-left: 3px solid #60a5fa;
}

.stat-box.nft-count-stat {
    border-color: #a855f7; /* purple */
    border-left: 3px solid #a855f7;
}

.stat-box.first-tx-stat {
    border-color: #ec4899; /* pink */
    border-left: 3px solid #ec4899;
}

.stat-box.unique-tokens-stat {
    border-color: #14b8a6; /* teal */
    border-left: 3px solid #14b8a6;
}

.transactions-stat .stat-value,
.wallet-age-stat .stat-value,
.contracts-stat .stat-value,
.total-eth-stat .stat-value,
.nft-count-stat .stat-value,
.first-tx-stat .stat-value,
.unique-tokens-stat .stat-value {
    font-family: 'MedievalSharp', cursive;
    font-size: 18px;
    color: var(--text-parchment);
}

.stat-label {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-faded);
    margin-bottom: var(--space-xs);
}

.stat-value.gas-value {
    font-family: 'MedievalSharp', cursive;
    font-size: 18px;
    color: var(--danger);
}

.portfolio-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    margin: var(--space-xs) 0;
}

.portfolio-comparison .dim {
    color: var(--text-dim);
    font-size: 10px;
}

.portfolio-past, .portfolio-now {
    color: var(--text-cream);
}

.portfolio-arrow {
    color: var(--text-dim);
}

.change-value {
    font-family: 'MedievalSharp', cursive;
    font-size: 16px;
    font-weight: 700;
}

.change-value.positive { color: var(--success); }
.change-value.negative { color: var(--danger); }

/* ═══════════════════════════════════════════════════════════════════════════
   CHARACTER CARD - Version A: Collectible
   ═══════════════════════════════════════════════════════════════════════════ */
.character-card {
    position: relative;
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-dark) 100%);
    border: none;
    border-radius: 8px;
    padding: 0;
    width: fit-content; /* Prevent stretching wider than canvas */
    box-shadow:
        0 0 30px rgba(255, 100, 100, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.5);
    --tier-glow-strong: rgba(191, 0, 255, 0.6);
    --tier-glow-soft: rgba(191, 0, 255, 0.3);
    transition: transform var(--transition-normal);
}

/* Holographic shimmer effect */
.character-card::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    background: linear-gradient(90deg,
        #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff,
        #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff
    );
    background-size: 200% 100%;
    border-radius: 8px;
    animation: holographicShift 3s linear infinite;
    opacity: 0.85;
    box-shadow: 0 0 30px 10px var(--tier-glow-strong), inset 0 0 20px var(--tier-glow-soft);
    z-index: -1;
}

.character-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-dark) 100%);
    border-radius: 8px;
    z-index: -1;
}


/* Tier-based border colors - Variation A: Chrome/Silver Metallic */
.character-card.tier-1::before {
    background: linear-gradient(90deg, #a0a0a0, #e8e8e8, #ffffff, #c0c0c0, #a0a0a0, #e8e8e8, #ffffff, #c0c0c0);
    background-size: 200% 100%;
    animation: holographicShift 2s linear infinite;
}
.character-card.tier-1 {
    --tier-glow-strong: rgba(192, 192, 192, 0.6);
    --tier-glow-soft: rgba(192, 192, 192, 0.3);
}
.character-card.tier-2::before {
    background: linear-gradient(90deg, #50ff90, #a0ffcc, #ffffff, #70ffaa, #50ff90, #a0ffcc, #ffffff, #70ffaa);
    background-size: 200% 100%;
    animation: holographicShift 2s linear infinite;
}
.character-card.tier-2 {
    --tier-glow-strong: rgba(112, 255, 170, 0.6);
    --tier-glow-soft: rgba(112, 255, 170, 0.3);
}
.character-card.tier-3::before {
    background: linear-gradient(90deg, #60b0ff, #a0d4ff, #ffffff, #80c0ff, #60b0ff, #a0d4ff, #ffffff, #80c0ff);
    background-size: 200% 100%;
    animation: holographicShift 2s linear infinite;
}
.character-card.tier-3 {
    --tier-glow-strong: rgba(128, 192, 255, 0.6);
    --tier-glow-soft: rgba(128, 192, 255, 0.3);
}
.character-card.tier-4::before {
    background: linear-gradient(90deg, #d080ff, #e8b8ff, #ffffff, #dc9cff, #d080ff, #e8b8ff, #ffffff, #dc9cff);
    background-size: 200% 100%;
    animation: holographicShift 2s linear infinite;
}
.character-card.tier-4 {
    --tier-glow-strong: rgba(220, 156, 255, 0.6);
    --tier-glow-soft: rgba(220, 156, 255, 0.3);
}
.character-card.tier-5::before {
    background: linear-gradient(90deg, #ffa040, #ffc890, #ffffff, #ffb060, #ffa040, #ffc890, #ffffff, #ffb060);
    background-size: 200% 100%;
    animation: holographicShift 2s linear infinite;
}
.character-card.tier-5 {
    --tier-glow-strong: rgba(255, 176, 96, 0.6);
    --tier-glow-soft: rgba(255, 176, 96, 0.3);
}
.character-card.tier-6::before {
    background: linear-gradient(90deg, #ff6060, #ff9090, #ffffff, #ff7878, #ff6060, #ff9090, #ffffff, #ff7878);
    background-size: 200% 100%;
    animation: holographicShift 2s linear infinite;
}
.character-card.tier-6 {
    --tier-glow-strong: rgba(255, 120, 120, 0.6);
    --tier-glow-soft: rgba(255, 120, 120, 0.3);
}
/* tier-7 (whale) keeps the rainbow animation - no override needed */
.character-card.tier-7 {
    --tier-glow-strong: rgba(244, 208, 63, 0.7);
    --tier-glow-soft: rgba(244, 208, 63, 0.35);
}
.character-card.tier-7::before {
    animation: holographicShift 2s linear infinite, auraRainbow 6s linear infinite;
}

/* Rarity label - hidden by default, shown on border hover */
.rarity-label {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 20px;
    background: rgba(15, 15, 26, 0.95);
    border: 2px solid #BF00FF;
    border-radius: 6px;
    color: #BF00FF;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
    box-shadow: 0 0 20px rgba(191, 0, 255, 0.5);
    pointer-events: none;
}

/* Hover glow removed; aura is always on via tier glow vars */

@keyframes holographicShift {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

@keyframes auraRainbow {
    0% {
        box-shadow: 0 0 30px 10px rgba(255, 0, 0, 0.6), inset 0 0 20px rgba(255, 0, 0, 0.3);
    }
    20% {
        box-shadow: 0 0 30px 10px rgba(255, 127, 0, 0.6), inset 0 0 20px rgba(255, 127, 0, 0.3);
    }
    40% {
        box-shadow: 0 0 30px 10px rgba(255, 255, 0, 0.6), inset 0 0 20px rgba(255, 255, 0, 0.3);
    }
    60% {
        box-shadow: 0 0 30px 10px rgba(0, 255, 0, 0.6), inset 0 0 20px rgba(0, 255, 0, 0.3);
    }
    80% {
        box-shadow: 0 0 30px 10px rgba(0, 120, 255, 0.6), inset 0 0 20px rgba(0, 120, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 30px 10px rgba(155, 70, 255, 0.6), inset 0 0 20px rgba(155, 70, 255, 0.3);
    }
}

/* Corner decorations - hidden */
.card-corner {
    display: none;
}

/* Canvas wrapper */
.image-wrapper {
    position: relative;
    display: inline-block;
    background: var(--bg-deep);
}

#displayCanvas {
    display: block;
    border-radius: var(--radius-sm);
}

#overlayCanvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    border-radius: var(--radius-sm);
    /* DEBUG: uncomment to see overlay position */
    /* background: rgba(255, 0, 0, 0.2); */
}

/* ═══════════════════════════════════════════════════════════════════════════
   ITEM RARITY PARTICLES
   ═══════════════════════════════════════════════════════════════════════════ */
.rarity-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.rarity-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

/* Uncommon - faint green wisps */
.particle-uncommon {
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #4ade80 0%, transparent 70%);
    box-shadow: 0 0 6px #4ade80;
    animation: particleFloat 3s ease-in-out infinite;
}

/* Rare - blue sparkles */
.particle-rare {
    width: 5px;
    height: 5px;
    background: radial-gradient(circle, #60a5fa 0%, #3b82f6 50%, transparent 70%);
    box-shadow: 0 0 8px #3b82f6, 0 0 12px #60a5fa;
    animation: particleSparkle 2s ease-in-out infinite;
}

/* Epic - purple swirling */
.particle-epic {
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #c084fc 0%, #a855f7 50%, transparent 70%);
    box-shadow: 0 0 10px #a855f7, 0 0 20px #7c3aed;
    animation: particleSwirl 4s ease-in-out infinite;
}

/* Legendary - golden embers */
.particle-legendary {
    width: 7px;
    height: 7px;
    background: radial-gradient(circle, #fde047 0%, #f59e0b 40%, #d97706 70%, transparent 100%);
    box-shadow: 0 0 12px #f59e0b, 0 0 24px #fbbf24, 0 0 36px rgba(251, 191, 36, 0.5);
    animation: particleEmber 2.5s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    10% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
        transform: translateY(-30px) scale(1);
    }
    90% {
        opacity: 0.4;
    }
}

@keyframes particleSparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: scale(1.2) rotate(90deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.8) rotate(180deg);
    }
    80% {
        opacity: 1;
        transform: scale(1) rotate(270deg);
    }
}

@keyframes particleSwirl {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0) rotate(0deg) scale(0.3);
    }
    25% {
        opacity: 0.9;
        transform: translateY(-20px) translateX(15px) rotate(90deg) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-40px) translateX(0) rotate(180deg) scale(0.8);
    }
    75% {
        opacity: 0.9;
        transform: translateY(-20px) translateX(-15px) rotate(270deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(0) translateX(0) rotate(360deg) scale(0.3);
    }
}

@keyframes particleEmber {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
        filter: brightness(1);
    }
    20% {
        opacity: 1;
        transform: translateY(-10px) scale(1.2);
        filter: brightness(1.5);
    }
    50% {
        opacity: 0.9;
        transform: translateY(-35px) scale(1);
        filter: brightness(1.2);
    }
    80% {
        opacity: 0.6;
        transform: translateY(-50px) scale(0.7);
        filter: brightness(0.8);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.3);
        filter: brightness(0.5);
    }
}

/* Tier info below character */
.tier-info {
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    width: 100%;
    box-sizing: border-box;
}

.tier-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.tier-divider::before,
.tier-divider::after {
    content: '';
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dark));
}

.tier-divider::after {
    background: linear-gradient(90deg, var(--gold-dark), transparent);
}

.tier-label {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    color: var(--text-faded);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tier-name {
    font-family: 'Cinzel Decorative', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--gold-light);
    text-shadow: 0 0 20px var(--gold-glow);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: var(--space-sm);
}

.tier-description {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-style: italic;
    color: var(--text-cream);
    max-width: 350px;
    margin: 0 auto;
    line-height: 1.6;
    min-height: 4.8em;
    max-height: 4.8em;
    overflow: hidden;
}


/* ═══════════════════════════════════════════════════════════════════════════
   INVENTORY PANEL - Diablo 2 Style
   ═══════════════════════════════════════════════════════════════════════════ */
.inventory-panel {
    flex: 0 0 480px;
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-dark) 100%);
    border: 3px solid var(--gold-dark);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-panel);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dark) var(--bg-panel-dark);
}

/* Custom scrollbar for inventory panel (Webkit browsers) */
.inventory-panel::-webkit-scrollbar {
    width: 10px;
}

.inventory-panel::-webkit-scrollbar-track {
    background: var(--bg-panel-dark);
    border-radius: 5px;
}

.inventory-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-primary), var(--gold-dark));
    border-radius: 5px;
    border: 2px solid var(--bg-panel-dark);
}

.inventory-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-light), var(--gold-primary));
}

/* Ornate panel decoration */
.inventory-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.inventory-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-light);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--gold-dark);
    text-shadow: 0 0 10px var(--gold-glow);
}

/* Category sections */
.inventory-category {
    margin-bottom: var(--space-lg);
}

.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: linear-gradient(90deg, rgba(201, 162, 39, 0.1), transparent);
    border-left: 2px solid var(--gold-primary);
}

.category-icon {
    font-size: 14px;
}

.category-label {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-primary);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
}

/* Inventory Slot - Stone carved feel */
.inventory-slot {
    aspect-ratio: 1;
    min-height: 85px;
    background:
        linear-gradient(135deg, var(--stone-dark) 0%, var(--bg-slot) 50%, var(--stone-dark) 100%);
    border: 2px solid var(--stone-mid);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.inventory-slot::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    pointer-events: none;
}

.inventory-slot:hover {
    border-color: var(--gold-primary);
    box-shadow:
        0 0 15px var(--gold-glow),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
    z-index: 20;
    overflow: visible;
}

.inventory-slot.empty {
    cursor: default;
    opacity: 0.5;
}

.inventory-slot.empty:hover {
    border-color: var(--stone-mid);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    transform: none;
}

.inventory-slot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.15s ease;
    /* Transform is set dynamically by JS centerImageContent() */
    /* CSS custom properties --scale, --tx, --ty are set by JS */
}

/* Hover: scale up more while keeping same translate */
.inventory-slot:hover img {
    transform: scale(calc(var(--scale, 2) * 1.8)) translate(var(--tx, 0%), var(--ty, 0%));
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 20px var(--gold-glow));
    z-index: 100;
}

/* Item glow on slot */
.inventory-slot:not(.empty) {
    background:
        radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%),
        linear-gradient(135deg, var(--stone-dark) 0%, var(--bg-slot) 50%, var(--stone-dark) 100%);
}

/* Slot label */
.inventory-slot .slot-label {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    font-family: 'Cinzel', serif;
    font-size: 8px;
    color: var(--text-dim);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.6);
    padding: 1px 2px;
    border-radius: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dragging States */
.inventory-slot.dragging {
    opacity: 0.4;
    cursor: grabbing;
}

.inventory-slot.drag-over {
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

/* Drag ghost */
.drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.9;
    transform: translate(-50%, -50%);
    display: none;
}

.drag-ghost img {
    max-width: 80px;
    max-height: 80px;
    filter: drop-shadow(0 0 15px var(--gold-glow));
}

.drag-ghost.visible {
    display: block;
}

/* Canvas drop zone highlight */
#displayCanvas.drag-over {
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════
   INVENTORY RARITY SYSTEM - Gaming Standard Colored Borders
   ═══════════════════════════════════════════════════════════════════════════ */

/* Rarity Colors (Gaming Standard) */
/* Priority 0: Common - Grey */
/* Priority 1-2: Uncommon - Green */
/* Priority 3-4: Rare - Blue */
/* Priority 5-6: Epic - Purple */
/* Priority 7+: Legendary - Orange with pulse */

/* Common (Priority 0) - Grey border, no hover glow */
.inventory-slot.rarity-common {
    border-color: #9a9a9a;
}

.inventory-slot.rarity-common:hover {
    border-color: #b0b0b0;
}

/* Uncommon (Priority 1-2) - Green border with hover glow */
.inventory-slot.rarity-uncommon {
    border: 2px solid #39ff7f;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        0 0 8px rgba(57, 255, 127, 0.3);
}

.inventory-slot.rarity-uncommon:hover {
    border-color: #39ff7f;
    box-shadow:
        0 0 15px rgba(57, 255, 127, 0.5),
        0 0 30px rgba(57, 255, 127, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

.inventory-slot.rarity-uncommon:hover img {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 20px rgba(57, 255, 127, 0.6));
}

/* Rare (Priority 3-4) - Blue border with hover glow */
.inventory-slot.rarity-rare {
    border: 2px solid #4dabf7;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        0 0 8px rgba(77, 171, 247, 0.3);
}

.inventory-slot.rarity-rare:hover {
    border-color: #4dabf7;
    box-shadow:
        0 0 15px rgba(77, 171, 247, 0.5),
        0 0 30px rgba(77, 171, 247, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

.inventory-slot.rarity-rare:hover img {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 20px rgba(77, 171, 247, 0.6));
}

/* Epic (Priority 5-6) - Purple border with hover glow */
.inventory-slot.rarity-epic {
    border: 2px solid #bf6ee0;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        0 0 10px rgba(191, 110, 224, 0.4);
}

.inventory-slot.rarity-epic:hover {
    border-color: #bf6ee0;
    box-shadow:
        0 0 20px rgba(191, 110, 224, 0.6),
        0 0 35px rgba(191, 110, 224, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

.inventory-slot.rarity-epic:hover img {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 25px rgba(191, 110, 224, 0.7));
}

/* Legendary (Priority 7+) - Orange border with pulse animation */
.inventory-slot.rarity-legendary {
    border: 2px solid #ff9633;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        0 0 12px rgba(255, 150, 51, 0.5);
    animation: legendaryPulse 2s ease-in-out infinite;
}

@keyframes legendaryPulse {
    0%, 100% {
        box-shadow:
            inset 0 2px 4px rgba(0, 0, 0, 0.4),
            inset 0 -1px 0 rgba(255, 255, 255, 0.05),
            0 0 12px rgba(255, 150, 51, 0.5);
    }
    50% {
        box-shadow:
            inset 0 2px 4px rgba(0, 0, 0, 0.4),
            inset 0 -1px 0 rgba(255, 255, 255, 0.05),
            0 0 20px rgba(255, 150, 51, 0.7),
            0 0 30px rgba(255, 150, 51, 0.4);
    }
}

.inventory-slot.rarity-legendary:hover {
    border-color: #ffb366;
    box-shadow:
        0 0 25px rgba(255, 150, 51, 0.7),
        0 0 45px rgba(255, 150, 51, 0.5),
        0 0 60px rgba(255, 150, 51, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
    transform: scale(1.08);
    animation: none;
}

.inventory-slot.rarity-legendary:hover img {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 30px rgba(255, 150, 51, 0.8));
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOOLTIP - Parchment Scroll Style
   ═══════════════════════════════════════════════════════════════════════════ */
.tooltip {
    position: fixed;
    display: none;
    background:
        linear-gradient(180deg, #3d3528 0%, #2d2820 50%, #252018 100%);
    color: var(--text-parchment);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    border: 2px solid var(--gold-dark);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 1000;
    max-width: 380px;
    min-width: 200px;
}

.tooltip.visible {
    display: block;
}

/* Top ornate border */
.tooltip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

/* Bottom ornate border */
.tooltip::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}

.tooltip-name {
    font-family: 'Cinzel Decorative', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--gold-dark);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tooltip-roast {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-style: italic;
    color: var(--text-cream);
    line-height: 1.7;
}

.tooltip-criteria {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    color: var(--eth-purple);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    line-height: 1.5;
}

.tooltip-criteria::before {
    content: '⚔ ';
    opacity: 0.8;
}

.tooltip-simple {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--text-parchment);
}

/* Tooltip Rarity Tier Display */
.tooltip-rarity {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: right;
}

.tooltip-rarity.rarity-common {
    color: #9a9a9a;
}

.tooltip-rarity.rarity-uncommon {
    color: #39ff7f;
    text-shadow: 0 0 8px rgba(57, 255, 127, 0.5);
}

.tooltip-rarity.rarity-rare {
    color: #4dabf7;
    text-shadow: 0 0 8px rgba(77, 171, 247, 0.5);
}

.tooltip-rarity.rarity-epic {
    color: #bf6ee0;
    text-shadow: 0 0 8px rgba(191, 110, 224, 0.5);
}

.tooltip-rarity.rarity-legendary {
    color: #ff9633;
    text-shadow: 0 0 10px rgba(255, 150, 51, 0.6);
    animation: legendaryTextPulse 2s ease-in-out infinite;
}

@keyframes legendaryTextPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; text-shadow: 0 0 15px rgba(255, 150, 51, 0.8); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING INDICATOR
   ═══════════════════════════════════════════════════════════════════════════ */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-panel);
    border: var(--border-gold);
    color: var(--gold-light);
    padding: var(--space-lg) var(--space-2xl);
    font-family: 'Cinzel', serif;
    font-size: 16px;
    box-shadow: var(--shadow-panel);
    z-index: 2000;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FIRST-TIME TOOLTIP HINTS
   ═══════════════════════════════════════════════════════════════════════════ */
.hint-tooltip {
    position: absolute;
    background: var(--bg-panel);
    border: 2px solid var(--gold-primary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    max-width: 250px;
    z-index: 100;
    box-shadow: 0 0 20px var(--gold-glow);
    animation: pulse 2s ease-in-out infinite;
}

.hint-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.hint-tooltip.arrow-left::before {
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: var(--gold-primary);
}

.hint-tooltip.arrow-right::before {
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: var(--gold-primary);
}

.hint-text {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    color: var(--text-cream);
    margin-bottom: var(--space-sm);
}

.hint-dismiss {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    color: var(--text-faded);
    cursor: pointer;
    text-decoration: underline;
}

.hint-dismiss:hover {
    color: var(--gold-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   AMBIENT PARTICLES
   ═══════════════════════════════════════════════════════════════════════════ */
.particles-container {
    display: none; /* Disabled - using fireflies instead */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold-primary);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR STYLING
   ═══════════════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-panel-dark);
    border-left: 1px solid var(--stone-mid);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--stone-mid), var(--stone-dark));
    border: 1px solid var(--gold-dark);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--stone-light), var(--stone-mid));
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - TABLET
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .container {
        gap: var(--space-md);
        padding: 0 var(--space-md) var(--space-lg);
    }

    .inventory-panel {
        flex: 0 0 280px;
    }

    .inventory-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .wallet-header {
        padding: var(--space-sm) var(--space-md);
    }

    .quick-wallet-input {
        width: 200px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        align-items: center;
        padding: 0 var(--space-md) var(--space-lg);
        min-height: auto;
    }

    .wallet-header {
        flex-wrap: wrap;
        gap: var(--space-sm);
        justify-content: center;
    }

    .wallet-info {
        order: 1;
        width: 100%;
        justify-content: center;
    }

    .quick-check-group {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .disconnect-btn {
        order: 2;
    }

    .quick-wallet-input {
        flex: 1;
        max-width: 200px;
    }

    .character-panel {
        width: 100%;
    }

    .wallet-stats {
        flex-direction: column;
        width: 100%;
    }

    .stat-box {
        width: 100%;
    }

    .inventory-panel {
        width: 100%;
        max-width: 400px;
        max-height: none;
    }

    .inventory-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Connect screen mobile */
    .connect-container {
        padding: var(--space-xl) var(--space-md);
    }

    .connect-title {
        font-size: 32px;
        letter-spacing: 4px;
    }

    .connect-title-img {
        max-width: 400px;
    }

    .creature-silhouette {
        width: 140px;
        height: 170px;
    }

    .eth-diamond-3d {
        width: 80px;
        height: 130px;
    }

    .fantasy-btn {
        padding: 14px 32px;
        font-size: 14px;
    }

    .check-wallet-input-group {
        flex-direction: column;
    }

    .check-wallet-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm) var(--space-md);
    }

    .inventory-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tooltip {
        max-width: 280px;
        padding: var(--space-sm) var(--space-md);
    }

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

    .tooltip-roast {
        font-size: 12px;
    }

    .connect-title {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .connect-title-img {
        max-width: 280px;
    }

    .connect-subtitle {
        font-size: 14px;
    }

    .wallet-networth {
        font-size: 18px;
    }

    .tier-name {
        font-size: 22px;
    }

    .tier-description {
        font-size: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */
.text-gold { color: var(--gold-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-faded { color: var(--text-faded); }

.glow-gold { text-shadow: 0 0 20px var(--gold-glow); }
.glow-purple { text-shadow: 0 0 20px var(--eth-purple-glow); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
