:root {
    --background: #121212;
    color-scheme: dark;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --neon-blue: #0066ff;
    --neon-red: #ff0066;
    --electric-blue: #00aaff;
    --crimson-red: #ff3366;
    --dark-bg: #0a0a0a;
    --card-bg: rgba(15, 15, 20, 0.9);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Quality glow colors */
    --default-glow: rgba(0, 0, 0, 0.2);
    --common-glow: rgba(var(--common-rgb), 0.4);
    --restricted-glow: rgba(var(--restricted-rgb), 0.4);
    --classified-glow: rgba(254, 7, 178, 0.4);
    --covert-glow: rgba(var(--covert-rgb), 0.4);
    --exclusive-glow: rgba(var(--exclusive-rgb), 0.4);
    --mythical-glow: rgba(var(--mythical-rgb), 0.4);
    --ultimate-glow: rgba(var(--ultimate-rgb), 0.4);
    --special-glow: rgba(64, 224, 208, 1); /* Updated to light teal green */

    /* Quality RGB for rgba usage */
    --default-rgb: 0, 0, 0;
    --common-rgb: 173, 216, 230;
    --restricted-rgb: 128, 0, 128;
    --classified-rgb: 255, 105, 180; /* Updated to neon pink */
    --covert-rgb: 255, 0, 0;
    --exclusive-rgb: 135, 206, 235;
    --mythical-rgb: 255, 20, 147;
    --ultimate-rgb: 192, 192, 192;
    --special-rgb: 64, 224, 208; /* Updated to light teal green */

    /* Quality solid colors */
    --default-color: #000000;
    --common-color: #add8e6;
    --restricted-color: #800080;
    --classified-color: #fe07b2;
    --covert-color: #ff0000;
    --exclusive-color: #87ceeb;
    --mythical-color: #ff1493;
    --ultimate-color: #c0c0c0;
    --special-color: #40e0d0; /* Updated to light teal green */
}

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

html {
    background-color: #000000;
    overscroll-behavior-y: contain;
    color-scheme: dark only !important;
}

body {
    font-family: ui-sans-serif, system-ui, sans-serif;
    background: radial-gradient(ellipse at center, var(--dark-bg) 0%, #000000 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    overscroll-behavior-y: contain;
}

/* Particles */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0; /* Below item containers (z-index: 10) */
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: clashOrb 12s infinite ease-in-out;
    box-shadow: 0 0 10px currentColor;
}

.particle:nth-child(odd) {
    background: var(--neon-blue);
    color: var(--neon-blue);
    animation-delay: 0s;
}

.particle:nth-child(even) {
    background: var(--neon-red);
    color: var(--neon-red);
    animation-delay: -6s;
}

.particle:nth-child(1) { width: 8px; height: 8px; top: 10%; left: 20%; animation-duration: 15s; }
.particle:nth-child(2) { width: 12px; height: 12px; top: 80%; left: 10%; animation-duration: 18s; }
.particle:nth-child(3) { width: 6px; height: 6px; top: 30%; right: 15%; animation-duration: 20s; }
.particle:nth-child(4) { width: 10px; height: 10px; bottom: 20%; right: 25%; animation-duration: 14s; }
.particle:nth-child(5) { width: 7px; height: 7px; top: 60%; left: 5%; animation-duration: 16s; }
.particle:nth-child(6) { width: 9px; height: 9px; top: 15%; right: 30%; animation-duration: 19s; }
.particle:nth-child(7) { width: 11px; height: 11px; bottom: 50%; left: 35%; animation-duration: 17s; }
.particle:nth-child(8) { width: 5px; height: 5px; top: 45%; right: 5%; animation-duration: 21s; }

@keyframes clashOrb {
    0% { 
        transform: translateY(0px) translateX(0px) scale(1); 
        opacity: 0.6;
        box-shadow: 0 0 10px currentColor;
    }
    25% { 
        transform: translateY(-50px) translateX(30px) scale(1.2); 
        opacity: 0.9;
        box-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
    }
    50% { 
        transform: translateY(-100px) translateX(-20px) scale(0.8); 
        opacity: 0.7;
        box-shadow: 0 0 15px currentColor;
    }
    75% { 
        transform: translateY(-30px) translateX(-40px) scale(1.1); 
        opacity: 0.8;
        box-shadow: 0 0 25px currentColor, 0 0 50px currentColor;
    }
    100% { 
        transform: translateY(0px) translateX(0px) scale(1); 
        opacity: 0.6;
        box-shadow: 0 0 10px currentColor;
    }
}

/* Animated background particles */
.particle {
    position: fixed;
    border-radius: 50%;
    opacity: 0.3;
    animation: float 8s infinite ease-in-out;
    pointer-events: none;
    z-index: 0; /* Below item containers (z-index: 10) */
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.3; }
    25% { transform: translateY(-30px) translateX(15px); opacity: 0.6; }
    50% { transform: translateY(-60px) translateX(-10px); opacity: 0.4; }
    75% { transform: translateY(-30px) translateX(-15px); opacity: 0.2; }
}

/* Header */
.header {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.brand-title {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.navbar {
    display: flex;
    list-style: none;
    gap: 30px;
}

.navbar a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.navbar a:hover,
.navbar a.active {
    color: var(--neon-blue);
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-red));
    transition: width 0.3s ease;
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 100%;
}

.search-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 200px;
    transition: all 0.3s ease;
    padding-left: 15px;
}

.search-input:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.2);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.control-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.control-button:hover {
    background: rgba(0, 102, 255, 0.1);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.control-button.active {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-red));
    color: #fff;
    border-color: transparent;
}

/* Filter Controls */
.filter-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin: 20px auto;
    max-width: 1400px;
    margin-left: 20px;
    margin-right: 20px;
    backdrop-filter: blur(20px);
    display: none;
    animation: slideDown 0.3s ease;
    position: relative;
    z-index: 200;
}

.filter-panel.show {
    display: block;
}

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

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 32px 10px 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    min-height: 40px;
    line-height: 1.2;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%230066ff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

.filter-select:hover {
    border-color: var(--neon-blue);
    background-color: rgba(255, 255, 255, 0.1);
}

.filter-select:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
}

.filter-select option {
    background: #1a1a1a;
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 10px;
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

/* Sort Controls */
.sort-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 20px;
    margin: 20px auto;
    max-width: 1400px;
    margin-left: 20px;
    margin-right: 20px;
    backdrop-filter: blur(20px);
    display: none;
    animation: slideDown 0.3s ease;
}

.sort-panel.show {
    display: block;
}

.sort-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sort-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sort-button:hover {
    background: rgba(0, 102, 255, 0.1);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.sort-button.active {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-red));
    color: #fff;
    border-color: transparent;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* Item Grid and Skeleton */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-grid.loaded {
    opacity: 1;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.skeleton-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    height: 200px;
    display: flex;
    gap: 20px;
    animation: pulse 1.5s infinite;
}

.skeleton-image {
    width: 160px;
    height: 160px;
    background: linear-gradient(90deg, #1a1a1a 25%, #222222 50%, #1a1a1a 75%);
    border-radius: 12px;
    background-size: 200% 100%;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.skeleton-text {
    background: linear-gradient(90deg, #1a1a1a 25%, #222222 50%, #1a1a1a 75%);
    height: 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    background-size: 200% 100%;
    animation: pulse 1.5s infinite;
}

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

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

/* Quality-based hover effects */
.item-card.default:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 5px 15px var(--default-glow);
    border-color: #000000;
    animation: defaultPulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 2px #ffffff;
}

@keyframes defaultPulse {
    0%, 100% { box-shadow: 0 5px 15px var(--default-glow); }
    50% { box-shadow: 0 7px 20px rgba(0, 0, 0, 0.25); }
}

.item-card.common:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px var(--common-glow);
    border-color: var(--common-glow);
    animation: commonPulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 2px #ffffff, 0 15px 35px var(--common-glow);
}

@keyframes commonPulse {
    0%, 100% { box-shadow: 0 15px 35px var(--common-glow); }
    50% { box-shadow: 0 20px 40px var(--common-glow); }
}

.item-card.restricted:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px var(--restricted-glow);
    border-color: var(--restricted-glow);
    animation: restrictedPulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 2px #ffffff, 0 15px 35px var(--restricted-glow);
}

@keyframes restrictedPulse {
    0%, 100% { box-shadow: 0 15px 35px var(--restricted-glow); }
    50% { box-shadow: 0 20px 40px var(--restricted-glow); }
}

.item-card.classified:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px var(--classified-glow);
    border-color: var(--classified-glow);
    animation: classifiedPulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 2px #ffffff, 0 15px 35px var(--classified-glow);
}

@keyframes classifiedPulse {
    0%, 100% { box-shadow: 0 15px 35px var(--classified-glow); }
    50% { box-shadow: 0 20px 40px var(--classified-glow); }
}

.item-card.covert:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px var(--covert-glow);
    border-color: var(--covert-glow);
    animation: covertPulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 2px #ffffff, 0 15px 35px var(--covert-glow);
}

@keyframes covertPulse {
    0%, 100% { box-shadow: 0 15px 35px var(--covert-glow); }
    50% { box-shadow: 0 20px 40px var(--covert-glow); }
}

.item-card.exclusive:hover {
    transform: translateY(-12px) scale(1.05) rotateY(3deg) rotateX(3deg);
    box-shadow: 0 25px 50px var(--exclusive-glow), 0 0 30px rgba(var(--exclusive-rgb), 0.4), inset 0 0 20px rgba(var(--exclusive-rgb), 0.1);
    border-color: rgb(var(--exclusive-rgb));
    animation: exclusiveFlame 1.2s ease-in-out infinite;
    box-shadow: 0 0 0 2px #ffffff, 0 25px 50px var(--exclusive-glow), 0 0 30px rgba(var(--exclusive-rgb), 0.4), inset 0 0 20px rgba(var(--exclusive-rgb), 0.1);
}

@keyframes exclusiveFlame {
    0%, 100% { box-shadow: 0 25px 50px var(--exclusive-glow), 0 0 30px rgba(var(--exclusive-rgb), 0.4), inset 0 0 20px rgba(var(--exclusive-rgb), 0.1); filter: brightness(1); }
    25% { box-shadow: 0 30px 60px rgba(var(--exclusive-rgb), 0.7), 0 0 40px rgba(var(--exclusive-rgb), 0.6), inset 0 0 25px rgba(var(--exclusive-rgb), 0.2); filter: brightness(1.1); }
    75% { box-shadow: 0 28px 55px rgba(var(--exclusive-rgb), 0.6), 0 0 35px rgba(var(--exclusive-rgb), 0.5), inset 0 0 22px rgba(var(--exclusive-rgb), 0.15); filter: brightness(1.05); }
}

.item-card.mythical:hover {
    transform: translateY(-12px) scale(1.05) rotateY(3deg) rotateX(3deg);
    box-shadow: 0 25px 50px var(--mythical-glow), 0 0 30px rgba(var(--mythical-rgb), 0.4), inset 0 0 20px rgba(var(--mythical-rgb), 0.1);
    border-color: rgb(var(--mythical-rgb));
    animation: mythicalFlame 1.2s ease-in-out infinite;
    box-shadow: 0 0 0 2px #ffffff, 0 25px 50px var(--mythical-glow), 0 0 30px rgba(var(--mythical-rgb), 0.4), inset 0 0 20px rgba(var(--mythical-rgb), 0.1);
}

@keyframes mythicalFlame {
    0%, 100% { box-shadow: 0 25px 50px var(--mythical-glow), 0 0 30px rgba(var(--mythical-rgb), 0.4), inset 0 0 20px rgba(var(--mythical-rgb), 0.1); filter: brightness(1); }
    25% { box-shadow: 0 30px 60px rgba(var(--mythical-rgb), 0.7), 0 0 40px rgba(var(--mythical-rgb), 0.6), inset 0 0 25px rgba(var(--mythical-rgb), 0.2); filter: brightness(1.1); }
    75% { box-shadow: 0 28px 55px rgba(var(--mythical-rgb), 0.6), 0 0 35px rgba(var(--mythical-rgb), 0.5), inset 0 0 22px rgba(var(--mythical-rgb), 0.15); filter: brightness(1.05); }
}

.item-card.ultimate:hover {
    transform: translateY(-12px) scale(1.05) rotateY(3deg) rotateX(3deg);
    box-shadow: 0 25px 50px var(--ultimate-glow), 0 0 30px rgba(var(--ultimate-rgb), 0.4), inset 0 0 20px rgba(var(--ultimate-rgb), 0.1);
    border-color: rgb(var(--ultimate-rgb));
    animation: ultimateFlame 1.2s ease-in-out infinite;
    box-shadow: 0 0 0 2px #ffffff, 0 25px 50px var(--ultimate-glow), 0 0 30px rgba(var(--ultimate-rgb), 0.4), inset 0 0 20px rgba(var(--ultimate-rgb), 0.1);
}

@keyframes ultimateFlame {
    0%, 100% { box-shadow: 0 25px 50px var(--ultimate-glow), 0 0 30px rgba(var(--ultimate-rgb), 0.4), inset 0 0 20px rgba(var(--ultimate-rgb), 0.1); filter: brightness(1); }
    25% { box-shadow: 0 30px 60px rgba(var(--ultimate-rgb), 0.7), 0 0 40px rgba(var(--ultimate-rgb), 0.6), inset 0 0 25px rgba(var(--ultimate-rgb), 0.2); filter: brightness(1.1); }
    75% { box-shadow: 0 28px 55px rgba(var(--ultimate-rgb), 0.6), 0 0 35px rgba(var(--ultimate-rgb), 0.5), inset 0 0 22px rgba(var(--ultimate-rgb), 0.15); filter: brightness(1.05); }
}

.item-card.special:hover {
    transform: translateY(-5px) scale(1.02) rotate(1deg);
    box-shadow: 0 10px 20px var(--special-glow), 0 0 15px rgba(64, 224, 208, 0.2);
    border-color: var(--neon-red);
    animation: specialMystery 3s ease-in-out infinite;
    box-shadow: 0 0 0 2px #ffffff, 0 10px 20px var(--special-glow), 0 0 15px rgba(64, 224, 208, 0.2);
}

@keyframes specialMystery {
    0%, 100% { box-shadow: 0 10px 20px var(--special-glow), 0 0 15px rgba(64, 224, 208, 0.2); filter: brightness(1) hue-rotate(0deg); }
    33% { box-shadow: 0 12px 25px rgba(0, 102, 255, 0.4), 0 0 20px rgba(0, 102, 255, 0.3); filter: brightness(1.1) hue-rotate(60deg); }
    66% { box-shadow: 0 11px 22px rgba(64, 224, 208, 0.35), 0 0 18px rgba(64, 224, 208, 0.25); filter: brightness(1.05) hue-rotate(120deg); }
}

/* Hyped effects */
.item-card.hyped.default:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--default-glow);
    border-radius: 17px;
    z-index: -1;
    animation: hypedBorder 2s linear infinite;
}

.item-card.hyped.common:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--common-glow);
    border-radius: 17px;
    z-index: -1;
    animation: hypedBorder 2s linear infinite;
}

.item-card.hyped.restricted:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--restricted-glow);
    border-radius: 17px;
    z-index: -1;
    animation: hypedBorder 2s linear infinite;
}

.item-card.hyped.classified:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--classified-glow);
    border-radius: 17px;
    z-index: -1;
    animation: hypedBorder 2s linear infinite;
}

.item-card.hyped.covert:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--covert-glow);
    border-radius: 17px;
    z-index: -1;
    animation: hypedBorder 2s linear infinite;
}

.item-card.hyped.exclusive:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--exclusive-glow);
    border-radius: 17px;
    z-index: -1;
    animation: hypedBorder 2s linear infinite;
}

.item-card.hyped.mythical:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--mythical-glow);
    border-radius: 17px;
    z-index: -1;
    animation: hypedBorder 2s linear infinite;
}

.item-card.hyped.ultimate:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--ultimate-glow);
    border-radius: 17px;
    z-index: -1;
    animation: hypedBorder 2s linear infinite;
}

.item-card.hyped.special:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--special-glow);
    border-radius: 17px;
    z-index: -1;
    animation: hypedBorder 2s linear infinite;
}

@keyframes hypedBorder {
    0% { transform: rotate(0deg) scale(1); opacity: 0.3; }
    50% { transform: rotate(180deg) scale(1.02); opacity: 0.6; }
    100% { transform: rotate(360deg) scale(1); opacity: 0.3; }
}

/* Sweep effects */
.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.05), transparent);
    transition: left 0.5s ease;
}

.item-card:hover::before {
    left: 100%;
}

.item-card.default::before { background: linear-gradient(90deg, transparent, rgba(var(--default-rgb), 0.1), transparent); }
.item-card.common::before { background: linear-gradient(90deg, transparent, rgba(var(--common-rgb), 0.1), transparent); }
.item-card.restricted::before { background: linear-gradient(90deg, transparent, rgba(var(--restricted-rgb), 0.15), transparent); }
.item-card.classified::before { background: linear-gradient(90deg, transparent, rgba(var(--classified-rgb), 0.15), rgba(var(--classified-rgb), 0.1), transparent); }
.item-card.covert::before { background: linear-gradient(90deg, transparent, rgba(var(--covert-rgb), 0.2), rgba(var(--covert-rgb), 0.15), transparent); }
.item-card.exclusive::before { background: linear-gradient(90deg, transparent, rgba(var(--exclusive-rgb), 0.2), transparent); }
.item-card.mythical::before { background: linear-gradient(90deg, transparent, rgba(var(--mythical-rgb), 0.25), rgba(var(--mythical-rgb), 0.2), rgba(var(--mythical-rgb), 0.15), transparent); }
.item-card.ultimate::before { background: linear-gradient(90deg, transparent, rgba(var(--ultimate-rgb), 0.2), transparent); }
.item-card.special::before { background: linear-gradient(90deg, transparent, rgba(var(--special-rgb), 0.1), rgba(var(--special-rgb), 0.05), transparent); }

/* Image hover effects */
.item-image-container:hover .item-image {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(1.2) saturate(1.4) contrast(1.1);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.item-image-container .item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
    opacity: 0;
}

.item-image-container .item-image.loaded {
    opacity: 1;
}

.item-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.item-type-label {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.item-name {
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: font-size 0.3s ease;
    font-size: 20px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.item-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    height: 200px;
    display: flex;
    gap: 20px;
    z-index: 10; /* Above particles (z-index: 0) */
}

.item-card:hover {
    box-shadow: 0 0 0 2px #ffffff;
}

.item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 160px;
}

.item-image-container {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

.item-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--neon-blue);
    color: #000;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.item-status.rising { background: var(--electric-blue); }
.item-status.lowering { background: var(--neon-red); }
.item-status.dead { background: #666; color: #fff; }
.item-status.new { background: linear-gradient(45deg, var(--neon-blue), var(--neon-red)); animation: statusPulse 2s ease-in-out infinite; }

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

.item-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    min-height: 60px; /* Fixed height for consistency */
}

.item-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-grow: 1;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    word-wrap: break-word;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
}

.quality-default { color: var(--default-color); }
.quality-common { color: var(--common-color); }
.quality-restricted { color: var(--restricted-color); }
.quality-classified { color: var(--classified-color); }
.quality-covert { color: var(--covert-color); }
.quality-exclusive { background: linear-gradient(45deg, #87ceeb, #ff69b4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.quality-mythical { background: linear-gradient(45deg, #ff1493, #ff0000); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.quality-ultimate { background: linear-gradient(45deg, #c0c0c0, #808080); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.quality-special { color: var(--special-color); }

.item-origin {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 8px;
    opacity: 0.8;
}

.item-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    margin-top: auto; /* Pins to bottom */
}

.item-not-tradeable {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    margin-top: auto; /* Pins to bottom */
}

.item-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #2adb91;
}

.coin-icon {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.3)); /* Smaller yellow glow */
    background: none;
}

.item-demand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.demand-stars {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.9rem;
    letter-spacing: 1px;
    font-weight: bold;
}

.demand-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.copies-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    position: absolute;
    bottom: 8px;
    right: 8px;
    backdrop-filter: blur(10px);
}

.early-variant-sticker {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #C0C0C0; /* Plain silver color */
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0;
    border: none;
    background: none;
    z-index: 2;
    pointer-events: none;
    text-transform: uppercase;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 40px 0;
}

.pagination-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-button:hover:not(:disabled) {
    background: rgba(0, 102, 255, 0.1);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.pagination-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--neon-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container { flex-direction: column; gap: 15px; }
    .navbar { gap: 20px; }
    .search-controls { width: 100%; justify-content: center; }
    .search-input { min-width: 150px; flex: 1; }
    .item-grid { grid-template-columns: 1fr; gap: 20px; }
    .filter-grid { grid-template-columns: 1fr; }
    .sort-buttons { justify-content: center; }
}

@media (max-width: 480px) {
    .main-content { padding: 15px; }
    .brand-title { font-size: 1.5rem; }
    .navbar { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .filter-select { padding: 8px 28px 8px 10px; background-position: right 10px center; background-size: 10px; }

    /* --- NEW MOBILE CARD STYLES --- */
    .item-card {
        flex-direction: column; /* Stacks the image and content vertically */
        height: auto;           /* Allows the card to grow in height as needed */
        padding: 15px;
    }

    .item-image-container {
        width: 100%;            /* Makes the image container span the full card width */
        height: 180px;          /* Sets a fixed height for the image on mobile */
        margin-bottom: 15px;    /* Adds some space between the image and the content below */
    }

    .item-content {
        min-height: auto;       /* Resets the minimum height for the new vertical layout */
    }

    .item-name {
        font-size: 1.1rem;      /* Adjust font size for better readability on small screens */
    }
}

/* Visually Hidden Class for Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Unusual Effects */
.unusual-icon {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    border: 2px solid transparent; /* ADDED: This reserves space for the border */
    box-sizing: border-box; /* ADDED: Ensures border is included in the total width/height */
}

.unusual-icon:hover {
    border-color: gold; /* CHANGED: Was 'background', now targets the border */
    transform: scale(1.1);
}

.unusual-icon.active {
    background: rgba(255, 215, 0, 1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    border-color: gold; /* OPTIONAL: Makes the border yellow in the active state too */
}

.unusual-icon img {
    width: 16px;
    height: 16px;
}

/* === FOOTER STYLES (Blue/Red Theme) === */
.site-footer {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(10, 10, 15, 0.98) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 80px;
    position: relative;
    overflow: hidden;
    width: 100%;
    line-height: normal; /* Fix for inherited line-height from body */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 60px 0 40px;
    text-align: left;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: rgba(0, 102, 255, 0.1);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.2);
}

.footer-section {
    min-width: 0;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-red));
    border-radius: 1px;
}

.footer-links {
    list-style: none;
    padding-left: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--neon-blue);
    transform: translateX(4px);
}

.footer-links a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--neon-blue);
    transition: width 0.3s ease;
}

.footer-links a:hover::before {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 25px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0;
}

.footer-badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-badge {
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.2);
    color: var(--neon-blue);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.footer-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.footer-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.footer-particle:nth-child(1) {
    width: 4px;
    height: 4px;
    top: 20%;
    left: 10%;
    background: var(--neon-blue);
    animation: footer-float-1 8s infinite ease-in-out;
}

.footer-particle:nth-child(2) {
    width: 2px;
    height: 2px;
    top: 60%;
    right: 20%;
    background: var(--neon-red);
    animation: footer-float-2 10s infinite ease-in-out;
}

.footer-particle:nth-child(3) {
    width: 3px;
    height: 3px;
    bottom: 30%;
    left: 70%;
    background: var(--electric-blue);
    animation: footer-float-3 12s infinite ease-in-out;
}

@keyframes footer-float-1 {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.1; }
    50% { transform: translateY(-20px) translateX(15px); opacity: 0.3; }
}

@keyframes footer-float-2 {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.1; }
    50% { transform: translateY(15px) translateX(-10px); opacity: 0.2; }
}

@keyframes footer-float-3 {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.1; }
    50% { transform: translateY(-10px) translateX(-20px); opacity: 0.25; }
}

/* Responsive Design for Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 0 30px;
        text-align: center;
        justify-items: center;
    }
    .footer-brand {
        display深的: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-bottom-content {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

.long-word-break {
  word-break: break-all;
}