.psu-calculator {
    border-radius: 24px;
    padding: 32px;
    background: linear-gradient(145deg, #f8fafc, #ffffff);
    box-shadow: 0 25px 55px rgba(15, 23, 42, 0.15);
}

.psu-calculator__form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.psu-calculator__layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 24px;
    align-items: start;
}

.psu-calculator__fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    min-height: 420px;
}

.psu-field {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.psu-field__label {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.psu-field__label-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.psu-field__icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: #e0e7ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4338ca;
}

.psu-field__icon svg {
    width: 16px;
    height: 16px;
}

.psu-field__icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.psu-field__label small {
    font-weight: 500;
    color: #94a3b8;
}

.psu-field--stack {
    gap: 14px;
}

.psu-field__control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.psu-field__select {
    width: 100%;
    border: 1px solid #cbd5f5;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    background: #f8fafc;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.psu-field__select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.psu-calculator__controls {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    align-items: center;
    min-height: 64px;
}

.psu-calculator__filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.psu-calculator__toolbar {
    margin-top: 20px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.3);
}

.psu-calculator__filter label {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.psu-calculator__submit,
.psu-calculator__sort {
    border: none;
    border-radius: 14px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.psu-calculator__submit {
    background: linear-gradient(120deg, #00b3bc, #009fa7 40%, #00cdd7 60%, #007f86);
    color: #fff;
    box-shadow: 0 12px 20px rgba(0, 159, 167, 0.35);
    background-size: 220% 100%;
    animation: psu-submit-shimmer 2.5s linear infinite;
}

.psu-calculator__sort {
    background: #fff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.psu-calculator__submit:hover,
.psu-calculator__sort:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.15);
}

@keyframes psu-submit-shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: 0 0;
    }
}

.psu-calculator__results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 20px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 18px;
}

.psu-calculator__results > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.psu-calculator__results span {
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.7);
    white-space: nowrap;
    word-break: keep-all;
}

.psu-calculator__label-tip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.psu-tip {
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.psu-tip:focus,
.psu-tip:hover {
    background: rgba(255, 255, 255, 0.35);
    outline: none;
}

.psu-tip::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: #0f172a;
    color: #e2e8f0;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    max-width: min(240px, calc(100vw - 48px));
    width: max-content;
    text-align: left;
    line-height: 1.4;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
    z-index: 15;
}

.psu-tip:focus::after,
.psu-tip:hover::after {
    opacity: 1;
}

.psu-calculator__results strong {
    display: block;
    font-size: 32px;
    margin-top: 6px;
}

.psu-calculator__recommendations {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.psu-card {
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.psu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 45px rgba(15, 23, 42, 0.16);
}

.psu-card__media {
    display: block;
    border-radius: 16px;
    background: #f8fafc;
    padding: 16px;
}

.psu-card__media img {
    width: 100%;
    height: 180px;
    object-fit: contain;
}

.psu-card__title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.4;
}

.psu-card__meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #475569;
}

.psu-card__price {
    font-size: 22px;
    font-weight: 700;
    color: #16a34a;
}

.psu-card__link {
    text-decoration: none;
    background: #dc2626;
    color: #fff;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.psu-card__link:hover {
    background: #b91c1c;
}

.psu-calculator__results-actions {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.psu-calculator__results-actions .psu-calculator__submit {
    width: 100%;
}

.psu-calculator__feedback {
    margin-top: 16px;
    font-size: 15px;
    color: #334155;
}

@media (max-width: 960px) {
    .psu-calculator {
        padding-bottom: 150px;
    }

    .psu-calculator__layout {
        grid-template-columns: 1fr;
    }

    .psu-calculator__results {
        position: relative;
        margin-top: 12px;
        border-radius: 20px;
    }

    .psu-calculator__results.is-sticky {
        position: fixed;
        bottom: 16px;
        left: 16px;
        right: 16px;
        z-index: 30;
        padding-bottom: 28px;
        box-shadow: 0 25px 50px rgba(15, 23, 42, 0.35);
    }

    .psu-calculator__results strong {
        font-size: 26px;
    }
}

@media (max-width: 640px) {
    .psu-calculator {
        padding: 20px;
    }

    .psu-calculator__controls {
        flex-direction: column;
        align-items: stretch;
    }

    .psu-calculator__results {
        padding: 24px;
    }

    .psu-tip::after {
        left: auto;
        right: 0;
        transform: none;
        max-width: calc(100vw - 40px);
    }
}
