.container {
    margin: 20px;
    gap: 20px;
    display: flex;
}

.input-container {
    align-self: flex-start;
    position: relative;
    border-radius: 15px;
    min-width: 256px;
    max-width: 256px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.8);
    background: #13161b;
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(.75rem, 1vw, 1.75rem);
}

.input-container h3 {
    color: #edf0f1;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    font-weight: 700;
    text-align: left;
    width: 100%;
    background: none;
}

.input-container p {
    color: #b0b0b0;
    font-size: clamp(0.8rem, 1vw, 1rem);
    font-weight: 500;
    text-align: left;
    width: 100%;
    margin-bottom: clamp(1rem, 1.5vw, 2rem);
    background: none;
}

.input-container input {
    width: 80%;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 8px;
    border: none;
    background: #0d0e12;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.input-container input::placeholder {
    color: #b0b0b0;
}

.input-container input:focus {
    outline: none;
    border: 1px solid #EB4A57;
    background: #0d0e12;
    color: #fff;
}

#generate-button {
    width: clamp(6rem, 20%, 10rem);
    padding: clamp(0.5rem, 0.8vh, 1rem) clamp(0.5rem, 1vw, 1.5rem);
    font-size: clamp(0.9rem, 1vw, 1.2rem);
    font-weight: 600;
    color: #edf0f1;
    border: none;
    border-radius: 8px;
    margin-top: 12px;
    background: var(--primary-accent);
    cursor: pointer;
    transition: all 0.3s ease;
}

#generate-button:hover {
    background: var(--primary-accent-dark);
    transform: scale(1.05);
}

#counter {
    font-weight: 600;
    color: #ff6347;
    background: none;
}

#added-axies {
    width: 100%;
    background: none;
    border-radius: 10px;
    padding: clamp(0.5rem, 0.6vw, 1rem);
}

.remove-btn {
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: clamp(0.2rem, 0.5vw, 0.5rem);
}

.remove-btn i {
    font-size: clamp(1rem, 1.2vw, 1.5rem);
    color: #666;
}

.remove-btn:hover i {
    color: var(--primary-accent);
}

#clear-all-button {
    display: none;
    background: var(--primary-accent);
    border-radius: 25px;
    padding: clamp(0.5rem, 1vw, 1.5rem);
    cursor: pointer;
    color: #fff;
    font-weight: bold;
    border: none;
    font-size: clamp(0.9rem, 1vw, 1.2rem);
    transition: all 0.3s ease;
}

#clear-all-button:hover {
    background: var(--primary-accent-dark);
    transform: scale(1.05);
}

.marketplace-filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.locked-filters {
    opacity: 0.3;
    pointer-events: none;
    user-select: none;
    filter: grayscale(100%);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.filters-header {
    color: #edf0f1;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-accent);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.clear-single-filter {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
    line-height: 1;
}

.clear-single-filter:hover {
    color: #ff4757;
}

.filter-label {
    color: #edf0f1;
    font-size: 14px;
    font-weight: 600;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-input {
    flex: 1;
    padding: 8px 12px;
    background: #0d0e12;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #edf0f1;
    font-size: 13px;
    transition: all 0.3s ease;
    width: 100%;
}

.price-input:focus {
    outline: none;
    border-color: #EB4A57;
}

.price-input::placeholder {
    color: #666;
}

.price-separator {
    color: #666;
    font-weight: 600;
}

.collection-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.collection-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.collection-filter-item:hover {
    background: rgba(235, 74, 87, 0.05);
    border-color: rgba(235, 74, 87, 0.2);
}

.collection-filter-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.collection-filter-icon:not([src]) {
    display: none;
}

.collection-filter-name {
    flex: 1;
    color: #edf0f1;
    font-size: 13px;
    font-weight: 500;
}

.collection-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #EB4A57;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.apply-filters-btn,
.clear-filters-btn,
.clear-search-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.apply-filters-btn {
    background: linear-gradient(135deg, #EB4A57, #DC143C);
    color: white;
}

.apply-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(235, 74, 87, 0.4);
}

.clear-filters-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #edf0f1;
}

.clear-filters-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.marketplace-results-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    margin-bottom: 16px;
}

.marketplace-results-header h3 {
    color: #edf0f1;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.filtered-count {
    color: #888;
    font-size: 14px;
    font-weight: 500;
}

.clear-search-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #edf0f1;
}

@media screen and (max-width: 768px) {
    .price-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .price-separator {
        display: none;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .collection-filter-name {
        font-size: 12px;
    }
}

.filter-label-with-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.filter-value-display {
    color: #EB4A57;
    font-size: 13px;
    font-weight: 700;
}

.slider-container {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
}

.range-slider {
    position: absolute;
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
}

.range-slider::-webkit-slider-track {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #EB4A57 0%, #DC143C 100%);
    border-radius: 3px;
}

.range-slider::-moz-range-track {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #EB4A57 0%, #DC143C 100%);
    border-radius: 3px;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #edf0f1;
    border: 2px solid #EB4A57;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #edf0f1;
    border: 2px solid #EB4A57;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    background: #EB4A57;
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(235, 74, 87, 0.6);
}

.range-slider::-moz-range-thumb:hover {
    background: #EB4A57;
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(235, 74, 87, 0.6);
}

.range-slider:first-child {
    z-index: 1;
}

.range-slider:last-child {
    z-index: 2;
}

#large-container {
    align-self: flex-start;
    display: flex;
    flex-grow: 1;
    width: 100%;
    max-width: 100%;
    min-height: 1250px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.8);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem;
    height: auto;
    background: #13161b;
}

.search-builder {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
}

.builder-columns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
    margin-bottom: 20px;
}

.builder-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 15px;
}

.center-col {
    flex: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

#axie-preview-image {
    width: 100%;
    max-width: 384px;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

#search-results {
    width: 100%;
}

.level-badge-container {
    position: relative;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    top: -4px;
}

.level-progress-circle {
    position: absolute;
    transform: rotate(-90deg);
}

.level-progress-circle {
    width: 50px;
    height: 50px;
}

.level-progress-circle .progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 4;
}

.level-progress-circle .progress-fill {
    fill: none;
    stroke: #EB4A57;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}

.level-text {
    position: absolute;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.collection-badge-with-count {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 2px 2px;
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border: 2px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.collection-badge-with-count:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(235, 74, 87, 0.5);
}

.collection-mystic { border-color: #7B36AA; background: #7B36AA; }
.collection-origin { border-color: #B72C19; background: #B72C19; }
.collection-agamogenesis { border-color: #E12F64; background: #E12F64; }
.collection-meocorp { border-color: #282C34; background: #282C34; }
.collection-meocorpii { border-color: #282C34; background: #282C34; }
.collection-xmas { border-color: #17760E; background: #17760E; }
.collection-japan { border-color: #84502B; background: #84502B; }
.collection-shiny { border-color: #007FA8; background: #007FA8; }
.collection-summer { border-color: #00976E; background: #00976E; }
.collection-nightmare { border-color: #8A0093; background: #8A0093; }

.collection-icon-container {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.collection-icon-small {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.collection-count-text {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    min-width: 18px;
    text-align: center;
}

.collection-text-fallback {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.collection-agamogenesis {
    animation: agamogenesis-glow 2s ease-in-out infinite;
}

.collection-origin {
    animation: origin-glow 2s ease-in-out infinite;
}

.collection-mystic {
    animation: mystic-glow 2s ease-in-out infinite;
}

@keyframes mystic-glow {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(123, 54, 170, 0.5);
    }
    50% {
        box-shadow: 0 2px 10px rgba(123, 54, 170, 0.8), 0 0 15px rgba(123, 54, 170, 0.4);
    }
}

@keyframes origin-glow {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(183, 44, 25, 0.5);
    }
    50% {
        box-shadow: 0 2px 10px rgba(183, 44, 25, 0.8), 0 0 15px rgba(183, 44, 25, 0.4);
    }
}

@keyframes agamogenesis-glow {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(255, 105, 180, 0.5);
    }
    50% {
        box-shadow: 0 2px 10px rgba(255, 105, 180, 0.8), 0 0 15px rgba(255, 105, 180, 0.4);
    }
}

.stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0;
    transition: all 0.3s ease;
    min-width: 32px;
}

.stat-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.stat-value {
    font-size: 12px;
    font-weight: 700;
    color: #edf0f1;
    text-align: center;
}

.no-axies-message,
.loading-message,
.no-morphs-message {
    text-align: center;
    font-size: clamp(1.1rem, 1.3vw, 1.5rem);
    color: #666;
    padding: 40px;
    font-weight: 500;
}

.no-morphs-message {
    padding: 20px;
    font-size: clamp(0.95rem, 1.1vw, 1.2rem);
    color: #555;
}

.filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.filter-item:last-child {
    margin-bottom: 0;
}

.filter-item label {
    color: #b0b0b0;
    font-size: clamp(0.85rem, 1vw, 1rem);
    font-weight: 500;
    flex: 1;
}

.filter-input-number {
    width: 80px;
    padding: 6px 12px;
    font-size: clamp(0.9rem, 1vw, 1.1rem);
    border: 1px solid #333;
    border-radius: 8px;
    background-color: #1a1a1a;
    color: #edf0f1;
    text-align: center;
    transition: all 0.3s ease;
}

.filter-input-number:focus {
    outline: none;
    border-color: var(--primary-accent);
    background-color: #242424;
    box-shadow: 0 0 8px rgba(235, 74, 87, 0.3);
}

.filter-input-number::-webkit-inner-spin-button,
.filter-input-number::-webkit-outer-spin-button {
    opacity: 0.5;
}

.part-selectors {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.part-selector-item {
    cursor: pointer;
}

.part-selector-item label {
    color: #edf0f1;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.part-selected {
    padding: 10px 12px;
    background: #0d0e12;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-height: 40px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.part-selected:hover {
    border-color: #EB4A57;
    background: rgba(235, 74, 87, 0.05);
}

.part-placeholder {
    color: #666;
    font-size: 13px;
}

.part-selected-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.part-selected-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.part-selected-name {
    color: #edf0f1;
    font-size: 13px;
    font-weight: 500;
}

.part-search-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.part-search-input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #0D0E12;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.3s;
}

.part-search-input:focus {
    outline: none;
    border-color: #00d4ff;
    border: 1px solid #EB4A57;
}

.part-search-input::placeholder {
    color: #888;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}

.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 16px;
}

.class-selector {
    margin-bottom: 16px;
}

.class-selector label {
    color: #edf0f1;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.class-selector select {
    width: 100%;
    padding: 10px 12px;
    background: #0d0e12;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #edf0f1;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.class-selector select:focus {
    outline: none;
    border-color: #EB4A57;
}

.count-input {
    margin-bottom: 16px;
}

.count-input label {
    color: #edf0f1;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.count-input input {
    width: 100%;
    padding: 10px 12px;
    background: #0d0e12;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #edf0f1;
    font-size: 13px;
    transition: all 0.3s ease;
}

.count-input input:focus {
    outline: none;
    border-color: #EB4A57;
}

.search-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #EB4A57, #DC143C);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(235, 74, 87, 0.4);
}

.search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.part-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.part-selector-modal-content {
    background: #13161B;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 32px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #EB4A57;
}

#modal-part-title {
    color: #edf0f1;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.part-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.part-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #0d0e12;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.part-grid-item:hover {
    border-color: #EB4A57;
    background: rgba(235, 74, 87, 0.05);
    transform: translateY(-2px);
}

.part-grid-item.selected {
    border-color: #EB4A57;
    background: rgba(235, 74, 87, 0.1);
}

.part-grid-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 8px;
}

.part-grid-name {
    color: #edf0f1;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
}

.marketplace-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.marketplace-axie-card {
    background: #0d0e12;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.marketplace-axie-card:hover {
    border-color: #EB4A57;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(235, 74, 87, 0.3);
}

.marketplace-axie-info {
    display: flex;
    flex-direction: column;
    top: -30px;
    gap: 8px;
}

.marketplace-axie-id {
    color: #EB4A57;
    font-size: 14px;
    font-weight: 700;
}

.marketplace-axie-class {
    color: #edf0f1;
    font-size: 13px;
    font-weight: 600;
}

.marketplace-axie-price {
    color: #4cff88;
    font-size: 12px;
    font-weight: 600;
}

.marketplace-axie-parts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.marketplace-part-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 10px;
    color: #888;
}

.marketplace-part-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.marketplace-image-container {
    position: relative;
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
}

.marketplace-axie-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marketplace-axie-image {
    position: absolute;
    width: 110%;
    height: auto;
    max-width: none;
    object-fit: contain;
    top: 64%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.marketplace-left-badges {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: absolute;
    top: 3px;
    left: 0;
    z-index: 1;
    align-items: center;
}

.marketplace-left-badges .level-badge-container {
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
}

.marketplace-left-badges .level-progress-circle {
    width: 40px;
    height: 40px;
}

.marketplace-left-badges .level-text {
    font-size: 16px;
}

.marketplace-left-badges .collection-badge-with-count {
    width: 22px;
    height: 22px;
    padding: 2px;
}

.marketplace-left-badges .collection-icon-container {
    width: 12px;
    height: 12px;
}

.marketplace-left-badges .collection-count-text {
    font-size: 11px;
}

.marketplace-right-badges {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    align-items: center;
}

.marketplace-right-badges .stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px;
    border-radius: 8px;
    min-width: 32px;
    transition: all 0.3s ease;
}

.marketplace-right-badges .stat-badge:hover {
    background: rgba(13, 14, 18, 0.8);
    transform: scale(1.05);
}

.marketplace-right-badges .stat-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.marketplace-right-badges .stat-value {
    font-size: 11px;
    font-weight: 700;
    color: #edf0f1;
    text-align: center;
}

.marketplace-right-badges > :first-child {
    margin-bottom: 6px;
}

.marketplace-match-info {
    color: #4cff88;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(76, 255, 136, 0.3);
}

.marketplace-class-crest {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 5;
    pointer-events: none;
}

.sliding-panel-wrapper {
    position: relative;
}

.sliding-panel-toggle {
    display: none;
}

@media screen and (max-width: 768px) {
    .builder-columns {
        flex-wrap: wrap;
        gap: 12px;
    }

    .center-col {
        order: -1;
        width: 100%;
        flex: unset;
        min-height: 180px;
    }

    #axie-preview-image {
        max-width: 220px;
        margin: 0 auto;
        display: block;
    }

    .left-col,
    .right-col {
        flex: 1;
        min-width: 0;
        gap: 10px;
    }

    .part-selector-item label {
        font-size: 12px;
    }

    .part-selected {
        padding: 8px 10px;
        min-height: 36px;
    }

    .class-selector select,
    .count-input input {
        font-size: 12px;
        padding: 8px 10px;
    }

    .marketplace-image-container {
        height: 160px;
    }
    
    .marketplace-axie-image {
        width: 130%;
    }
    
    .marketplace-class-crest {
        width: 28px;
        height: 28px;
    }
    
    .marketplace-left-badges .level-badge-container {
        width: 36px;
        height: 36px;
    }
    
    .marketplace-left-badges .level-progress-circle {
        width: 36px;
        height: 36px;
    }
    
    .marketplace-left-badges .level-text {
        font-size: 14px;
    }
    
    .marketplace-right-badges .stat-icon {
        width: 16px;
        height: 16px;
    }
    
    .marketplace-right-badges .stat-value {
        font-size: 10px;
    }

    .sliding-panel-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        max-width: 85%;
        height: 100%;
        z-index: 1003;
        display: flex;
        align-items: center;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        will-change: transform;
    }
    
    .sliding-panel-wrapper.active {
        transform: translateX(0);
    }

    .sliding-panel-wrapper .input-container {
        width: 100%;
        height: 100%;
        min-width: unset;
        max-width: unset;
        border-radius: 0;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
        border: none;
        border-right: 1px solid rgba(235, 74, 87, 0.2);
        padding: 20px;
        padding-top: 32px;
        overflow-y: auto;
    }

    .sliding-panel-toggle {
        display: flex;
        position: absolute;
        right: -40px;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 60px;
        background: #13161B;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-left: none;
        color: #EB4A57;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
        z-index: 1;
    }

    .sliding-panel-toggle i {
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        will-change: transform;
        transform: rotate(180deg);
    }
    
    .sliding-panel-wrapper.active .sliding-panel-toggle i {
        transform: rotate(0deg);
    }

    .panel-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 1002;
        opacity: 0;
        visibility: hidden;
        will-change: opacity;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .panel-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media screen and (max-width: 480px) {
    .marketplace-image-container {
        height: 140px;
    }
    
    .marketplace-axie-image {
        width: 240px;
    }
    
    .marketplace-class-crest {
        width: 24px;
        height: 24px;
    }
    
    .marketplace-left-badges .level-badge-container {
        width: 32px;
        height: 32px;
    }
    
    .marketplace-left-badges .level-progress-circle {
        width: 32px;
        height: 32px;
    }
    
    .marketplace-left-badges .level-text {
        font-size: 13px;
    }
    
    .marketplace-left-badges .collection-badge-with-count {
        width: 24px;
        height: 24px;
    }
    
    .marketplace-left-badges .collection-icon-container {
        width: 10px;
        height: 10px;
    }
    
    .marketplace-right-badges .stat-icon {
        width: 14px;
        height: 14px;
    }
    
    .marketplace-right-badges .stat-value {
        font-size: 9px;
    }
}
/* ---- Axie Comparison Popup ---- */
.axie-comparison-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
    padding: 16px;
}

.axie-comparison-modal {
    background: #13161b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 24px 24px;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.axie-comparison-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 1;
}
.axie-comparison-close:hover { color: #EB4A57; }

.axie-comparison-title {
    color: #edf0f1;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-right: 40px;
}

/* Two axie images */
.axie-comparison-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.axie-comparison-axie-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #0d0e12;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px 12px 12px;
}

.axie-comparison-axie-label {
    color: #edf0f1;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.axie-comparison-axie-img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}

.axie-comparison-price {
    color: #4cff88;
    font-size: 13px;
    font-weight: 700;
}

/* Parts table */
.axie-comparison-parts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.axie-comparison-parts-header {
    display: grid;
    grid-template-columns: 36px 1fr 1fr 90px;
    gap: 10px;
    padding: 6px 10px;
    color: #666;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.axie-comparison-part-row {
    display: grid;
    grid-template-columns: 36px 1fr 1fr 90px;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.axie-comparison-part-row.part-match {
    background: rgba(76, 255, 136, 0.06);
    border-color: rgba(76, 255, 136, 0.2);
}

.axie-comparison-part-row.part-morph {
    background: rgba(235, 74, 87, 0.05);
    border-color: rgba(235, 74, 87, 0.15);
}

.axie-comparison-part-icon-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.axie-comparison-part-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.axie-comparison-part-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #edf0f1;
    font-size: 13px;
    font-weight: 500;
}

.axie-comparison-part-thumb {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.axie-comparison-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.status-match, .status-morph {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.status-match {
    background: rgba(76, 255, 136, 0.15);
    color: #4cff88;
}

.status-morph {
    background: rgba(235, 74, 87, 0.15);
    color: #EB4A57;
}

/* Footer */
.axie-comparison-footer {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.axie-comparison-mkt-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #EB4A57, #DC143C);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.axie-comparison-mkt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(235, 74, 87, 0.5);
}

/* Click hint in results header */
.click-hint {
    color: #555;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    white-space: nowrap;
}

.click-hint i {
    font-size: 11px;
}

@media screen and (max-width: 520px) {
    .axie-comparison-images {
        grid-template-columns: 1fr 1fr;
    }
    .axie-comparison-axie-img {
        width: 90px;
        height: 90px;
    }
    .axie-comparison-parts-header,
    .axie-comparison-part-row {
        grid-template-columns: 28px 1fr 1fr 70px;
        gap: 6px;
    }
    .axie-comparison-part-name {
        font-size: 11px;
    }
    .status-match, .status-morph {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* Class badge inside comparison popup */
.axie-comparison-class-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #edf0f1;
}

.axie-comparison-class-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}