* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; font-weight: 600; }
body { font-family: 'Inter', sans-serif; font-weight: 600; background: #0a0a0a; color: #ffffff; padding-top: 80px; line-height: 1.6; }
.calculator-container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.header-section { text-align: center; margin: 1rem 0 2rem 0; }
.main-title { font-size: 1.8rem; font-weight: 600; color: #ffffff; margin-bottom: 0.5rem; }
.description { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; max-width: 600px; margin: 0 auto; }

.toggle-buttons {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    margin: 0 auto 2rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    width: 300px;
    box-shadow: 0 0 40px rgba(80, 72, 229, 0.3), 0 0 80px rgba(80, 72, 229, 0.15), 0 0 120px rgba(80, 72, 229, 0.08);
}

.toggle-btn {
    flex: 1;
    padding: 0.6rem 1.2rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    border-radius: 8px;
}

.toggle-btn.active {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(80, 72, 229, 0.8), 0 0 30px rgba(80, 72, 229, 0.4);
}

.toggle-buttons::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: linear-gradient(135deg, #5048E5 0%, #4338CA 100%);
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 
        0 4px 15px rgba(80, 72, 229, 0.4),
        0 0 20px rgba(80, 72, 229, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.toggle-buttons.mutation-active::before {
    transform: translateX(calc(100%));
    box-shadow: 
        0 4px 15px rgba(80, 72, 229, 0.5),
        0 0 25px rgba(80, 72, 229, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.content {
    position: relative;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

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

.trading-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin: 2rem 0;
    justify-content: center;
    align-items: start;
}

.trade-section {
    background: rgba(13, 13, 13, 0.8);
    border: 1px solid rgba(21, 21, 21, 0.8);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.section-header h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.item-slot {
    aspect-ratio: 1;
    background: #111111;
    border: none;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 80px;
}

.item-slot:hover {
    background: rgba(80, 72, 229, 0.05);
    transform: translateY(-2px);
}

.item-slot.filled {
    background: rgba(80, 72, 229, 0.1);
    border: 2px solid #5048E5;
}

.item-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    width: 100%;
}

.item-image-bg {
    width: 50px;
    height: 50px;
    background: #1a1a1a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.item-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-name {
    font-size: 0.75rem;
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.item-stats {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
    font-size: 0.7rem;
}

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

.stat-label {
    color: rgba(255, 255, 255, 0.7);
}

.stat-value {
    color: #5048E5;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.value-icon {
    width: 12px;
    height: 12px;
}

.remove-item {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #ff4757;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.value-display {
    text-align: center;
    padding: 1rem;
    background: transparent;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-section {
    margin: 3rem 0 2rem 0;
}

.form button {
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.6);
}

.form {
    --timing: 0.3s;
    --width-of-input: 100%;
    --height-of-input: 40px;
    --border-height: 2px;
    --input-bg: #000;
    --border-color: #5048E5;
    --border-radius: 12px;
    --after-border-radius: 1px;
    position: relative;
    width: var(--width-of-input);
    height: var(--height-of-input);
    display: flex;
    align-items: center;
    padding-inline: 0.8em;
    border-radius: var(--border-radius);
    transition: border-radius 0.5s ease;
    background: var(--input-bg);
    border: 1px solid #151515;
    margin-bottom: 1rem;
}

.input {
    font-size: 0.9rem;
    background-color: transparent;
    width: 100%;
    height: 100%;
    padding-inline: 0.5em;
    padding-block: 0.7em;
    border: none;
    color: #fff;
    font-weight: 500;
}

.input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form:before {
    content: "";
    position: absolute;
    background: var(--border-color);
    transform: scaleX(0);
    transform-origin: center;
    width: 100%;
    height: var(--border-height);
    left: 0;
    bottom: 0;
    border-radius: 1px;
    transition: transform var(--timing) ease;
}

.form:focus-within {
    border-radius: var(--after-border-radius);
    border-color: #5048E5;
}

.input:focus {
    outline: none;
}

.form:focus-within:before {
    transform: scale(1);
}

.reset {
    border: none;
    background: none;
    opacity: 0;
    visibility: hidden;
    color: rgba(255, 255, 255, 0.6);
}

.input:not(:placeholder-shown) ~ .reset {
    opacity: 1;
    visibility: visible;
}

.form svg {
    width: 17px;
    margin-top: 3px;
}

.search-controls {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.form {
    flex: 1;
}

.select {
    width: fit-content;
    cursor: pointer;
    position: relative;
    transition: 300ms;
    color: white;
    overflow: visible;
    flex: 0 0 120px;
    min-width: 120px;
}

.selected {
    background-color: #000;
    padding: 0.7rem 1rem;
    margin-bottom: 0;
    border-radius: 12px;
    position: relative;
    z-index: 49;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    border: 1px solid #151515;
    height: 40px;
    box-sizing: border-box;
}

.arrow {
    position: relative;
    right: 0px;
    height: 10px;
    transform: rotate(-90deg);
    width: 25px;
    fill: white;
    z-index: 100000;
    transition: 300ms;
}

.options {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    padding: 5px;
    background-color: #000;
    position: absolute;
    top: -100px;
    opacity: 0;
    transition: 300ms;
    width: 100%;
    z-index: 50;
    border: 1px solid #151515;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.select:hover > .options {
    opacity: 1;
    top: 100%;
    pointer-events: auto;
}

.selected:hover + .options {
    opacity: 1;
    top: 100%;
    pointer-events: auto;
}

.select:hover > .selected .arrow {
    transform: rotate(0deg);
}

.option {
    border-radius: 5px;
    padding: 0.5rem;
    transition: 300ms;
    background-color: #000;
    width: 100%;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
}

.option:hover {
    background-color: #111;
}

.options input[type="radio"] {
    display: none;
}

.options label {
    display: inline-block;
    cursor: pointer;
}

.options label::before {
    content: attr(data-txt);
}

.options input[type="radio"]:checked + label {
    display: none;
}

.select:has(.options input[type="radio"]#all-type:checked) .selected::before {
    content: attr(data-all);
}

.select:has(.options input[type="radio"]#crops-type:checked) .selected::before {
    content: attr(data-crops);
}

.select:has(.options input[type="radio"]#pets-type:checked) .selected::before {
    content: attr(data-pets);
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pagination {
    display: flex;
    gap: 0.5rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid rgba(21, 21, 21, 0.8);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.page-btn:hover,
.page-btn.active {
    background: #5048E5;
    border-color: #5048E5;
    box-shadow: 0 4px 16px rgba(80, 72, 229, 0.3);
}

.favorites-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.toggle-switch {
    width: 40px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-switch.active {
    background: #5048E5;
    border-color: #5048E5;
}

.toggle-slider {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(20px);
}

.items-display {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.display-item-card {
    background: rgba(13, 13, 13, 0.8);
    border: 1px solid rgba(21, 21, 21, 0.8);
    border-radius: 16px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.display-item-card:hover {
    border-color: #5048E5;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(80, 72, 229, 0.2);
}

.display-item-image-bg {
    width: 80px;
    height: 80px;
    background: #1a1a1a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem auto;
}

.display-item-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
}

.display-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.display-item-name {
    font-size: 0.85rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.display-item-stats {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.display-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    padding: 0 0.5rem;
}

.display-stat-label {
    color: rgba(255, 255, 255, 0.7);
}

.display-stat-value {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.display-stat-value.value {
    color: #5048E5;
}

.display-stat-value.demand {
    color: rgba(255, 255, 255, 0.6);
}

.display-value-icon {
    width: 14px;
    height: 14px;
}

#mutation-frame {
    background: #0a0a0a;
    border-radius: 12px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .calculator-container { padding: 1rem; }
    .trading-sections { grid-template-columns: 1fr; gap: 1.5rem; }
    .items-display { grid-template-columns: repeat(3, 1fr); }
    .pagination-container { flex-direction: column; gap: 1rem; }
    .toggle-buttons { width: 250px; }
    #mutation-frame { min-height: 600px; }
}