.mod-stimcpsearch {
    max-width: 1100px;
    margin: 40px auto;
    font-family: Arial, sans-serif;
    position: relative;
}

.stimcp-label {
    font-size: 18px;
    margin-bottom: 12px;
    color: #333;
}

.stimcp-search {
    display: flex;
    gap: 16px;
}

.stimcp-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
}

#stimcp-input {
    width: 100%;
    padding: 14px 40px 14px 16px;
    font-size: 16px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    outline: none;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#stimcp-input:focus {
    border-color: #338ADB;
}

#stimcp-input.error {
    border-color: #e53935;
}


#stimcp-button {
    padding: 0 28px;
    font-size: 16px;
    background: #338ADB;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#stimcp-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    width: 10px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
    text-decoration: none;
}

#stimcp-clear:hover {
    color: #D60000;
}

#stimcp-clear.show {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    pointer-events: auto;
}

#stimcp-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    overflow: hidden;
    transition: all 0.25s ease;
}

#stimcp-dropdown.scroll {
    overflow-y: auto;
}

#stimcp-dropdown.active {
    max-height: 70vh;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#stimcp-results {
    margin-top: 30px;
}

.stimcp-loading {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #555;
}

.stimcp-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #cfe3fb;
    border-top-color: #338ADB;
    border-radius: 50%;
    animation: stimcp-spin 0.7s linear infinite;
}

@keyframes stimcp-spin {
    to {
        transform: rotate(360deg);
    }
}

.stimcp-empty {
    padding: 14px 16px;
    font-size: 14px;
    color: #666;
}

.stimcp-empty {
    color: #999;
}

.stimcp-content {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.stimcp-content.show {
    opacity: 1;
    transform: translateY(0);
}

.stimcp-item {
    display: block;
    padding: 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-weight: 400;
    text-decoration: none;
    color: inherit;
    opacity: 0;
    transform: translateY(6px);
    animation: fadeItem 0.25s ease forwards;
}

.stimcp-item:visited,
.stimcp-item:active,
.stimcp-item:focus {
    color: inherit;
    text-decoration: none;
}

.stimcp-item:last-child {
    border-bottom: none;
}

.stimcp-item:hover {
    background: #f5f7fb;
    border-radius: 6px;
    text-decoration: none;
}

@keyframes fadeItem {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stimcp-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stimcp-title {
    font-size: 18px;
    color: #338ADB;
    font-weight: 600;
    text-decoration: none;
}

.stimcp-item:hover .stimcp-title {
    text-decoration: underline;
}

.stimcp-badges {
    display: flex;
    gap: 6px;
}

.stimcp-category {
    background: #e5e7eb;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
    color: #555;
}

.stimcp-platform {
    background: #eef2ff;
    color: #4f46e5;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.stimcp-desc {
    margin-top: 6px;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.stimcp-pagination {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
}

.stimcp-pagination button {
    padding: 6px 10px;
    border: 1px solid #ddd;
    background: #fff;
    color: #338ADB;
    cursor: pointer;
    border-radius: 4px;
}

.stimcp-pagination button.active {
    background: #338ADB;
    color: #fff;
    border-color: #338ADB;
}

.stimcp-popular {
    margin-top: 12px;
    font-size: 14px;
    color: #6b7280;
}

.stimcp-popular a {
    color: #338ADB;
    text-decoration: none;
    cursor: pointer;
}

.stimcp-popular a:hover {
    text-decoration: underline;
}


@media (max-width: 1100px) {

    .stimcp-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .stimcp-badges {
        flex-wrap: wrap;
    }

    .stimcp-badges span {
        white-space: nowrap;
    }

}

@media (max-width: 600px) {
    .stimcp-item {
        padding: 16px 8px;
    }
}

@media (max-width: 480px) {

    .stimcp-search {
        flex-direction: column;
        gap: 10px;
    }

    #stimcp-button {
        width: 100%;
        height: 44px;
    }

    #stimcp-input {
        padding: 12px 40px 12px 14px;
    }

    #stimcp-dropdown {
        display: none !important;
    }

    .stimcp-pagination {
        justify-content: center;
        align-items: center;
        width: 100%;
    }

}